diff options
Diffstat (limited to 'compiler/GHC/Driver/CodeOutput.hs')
-rw-r--r-- | compiler/GHC/Driver/CodeOutput.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/GHC/Driver/CodeOutput.hs b/compiler/GHC/Driver/CodeOutput.hs index 4886d5a2ee..2bb30656dd 100644 --- a/compiler/GHC/Driver/CodeOutput.hs +++ b/compiler/GHC/Driver/CodeOutput.hs @@ -138,7 +138,13 @@ outputC dflags filenm cmm_stream packages = hPutStr h ("/* GHC_PACKAGES " ++ unwords pkg_names ++ "\n*/\n") hPutStr h "#include \"Stg.h\"\n" let platform = targetPlatform dflags - writeC = printForC dflags h . cmmToC platform + writeC cmm = do + let doc = cmmToC platform cmm + dumpIfSet_dyn dflags Opt_D_dump_c_backend + "C backend output" + FormatC + doc + printForC dflags h doc Stream.consume cmm_stream writeC {- |