X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FMkZipCfg.hs;h=9b9989c465f95d4396f6f463aad8524eed98e4b9;hb=1241c26f3552a2037263769e5ef7fa68d9f3be36;hp=385b41d5b9e7159b81e049a1fcfba3794052df52;hpb=0967b989b62abe69e0cd74ac563dbde200f7f3c5;p=ghc-hetmet.git diff --git a/compiler/cmm/MkZipCfg.hs b/compiler/cmm/MkZipCfg.hs index 385b41d..9b9989c 100644 --- a/compiler/cmm/MkZipCfg.hs +++ b/compiler/cmm/MkZipCfg.hs @@ -1,5 +1,4 @@ {-# LANGUAGE ScopedTypeVariables #-} -{-# OPTIONS -Wall -fno-warn-name-shadowing #-} module MkZipCfg ( AGraph, (<*>), emptyAGraph, withFreshLabel, withUnique , mkMiddle, mkMiddles, mkLast, mkZTail, mkBranch, mkLabel, mkIfThenElse, mkWhileDo @@ -321,11 +320,16 @@ mkWhileDo cbranch body = note_this_code_becomes_unreachable :: (Monad m, LastNode l, Outputable middle, Outputable l) => ZTail middle l -> m () +#ifdef DEBUG note_this_code_becomes_unreachable = u where u (ZLast LastExit) = return () u (ZLast (LastOther l)) | isBranchNode l = return () -- Note [Branch follows branch] u tail = fail ("unreachable code: " ++ showSDoc (ppr tail)) +#else +note_this_code_becomes_unreachable _ = return () +#endif + {- Note [Branch follows branch] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~