Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
eaffe229
Commit
eaffe229
authored
Sep 11, 2007
by
nr@eecs.harvard.edu
Browse files
check for unreachable code only with -DDEBUG
parent
45cbf5e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/cmm/MkZipCfg.hs
View file @
eaffe229
...
...
@@ -321,11 +321,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]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment