diff options
Diffstat (limited to 'compiler/cmm/CmmLint.hs')
-rw-r--r-- | compiler/cmm/CmmLint.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/cmm/CmmLint.hs b/compiler/cmm/CmmLint.hs index ee53c1b6c7..a99e5a50a8 100644 --- a/compiler/cmm/CmmLint.hs +++ b/compiler/cmm/CmmLint.hs @@ -143,9 +143,9 @@ lintCmmStmt platform labels = lint then return () else cmmLintErr (text "switch scrutinee is not a word: " <> pprPlatform platform e <> text " :: " <> ppr erep) - lint (CmmJump e args) = lintCmmExpr platform e >> mapM_ (lintCmmExpr platform . hintlessCmm) args - lint (CmmReturn ress) = mapM_ (lintCmmExpr platform . hintlessCmm) ress - lint (CmmBranch id) = checkTarget id + lint (CmmJump e) = lintCmmExpr platform e >> return () + lint (CmmReturn) = return () + lint (CmmBranch id) = checkTarget id checkTarget id = if setMember id labels then return () else cmmLintErr (text "Branch to nonexistent id" <+> ppr id) |