diff options
author | Ben Gamari <ben@smart-cactus.org> | 2015-09-25 18:00:19 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-11-23 17:47:41 +0100 |
commit | 7aaeaf81ea95c36fe1dc4da449cf6092a792fd09 (patch) | |
tree | 79703e6d9db2f81507272d9efd1a5952b17c7924 /compiler/codeGen | |
parent | bb249aa749c82590823855e970bcc1c4d4b23523 (diff) | |
download | haskell-7aaeaf81ea95c36fe1dc4da449cf6092a792fd09.tar.gz |
Support multiple debug output levels
We now only strip block information from DebugBlocks when compiling with
`-g1`, intended to be used when only minimal debug information is
desired. `-g2` is assumed when `-g` is passed without any integer
argument.
Differential Revision: https://phabricator.haskell.org/D1281
Diffstat (limited to 'compiler/codeGen')
-rw-r--r-- | compiler/codeGen/StgCmmMonad.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/codeGen/StgCmmMonad.hs b/compiler/codeGen/StgCmmMonad.hs index 3083bfffc4..7ddbcd6cbc 100644 --- a/compiler/codeGen/StgCmmMonad.hs +++ b/compiler/codeGen/StgCmmMonad.hs @@ -576,7 +576,7 @@ getTickScope = do tickScope :: FCode a -> FCode a tickScope code = do info <- getInfoDown - if not (gopt Opt_Debug (cgd_dflags info)) then code else do + if debugLevel (cgd_dflags info) == 0 then code else do u <- newUnique let scope' = SubScope u (cgd_tick_scope info) withInfoDown code info{ cgd_tick_scope = scope' } @@ -729,7 +729,7 @@ emitTick = emitCgStmt . CgStmt . CmmTick emitUnwind :: GlobalReg -> CmmExpr -> FCode () emitUnwind g e = do dflags <- getDynFlags - when (gopt Opt_Debug dflags) $ + when (debugLevel dflags > 0) $ emitCgStmt $ CgStmt $ CmmUnwind g e emitAssign :: CmmReg -> CmmExpr -> FCode () |