Commit 630379c1 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Pass DynFlags down to printForC and printForAsm

parent 667c5779
......@@ -71,7 +71,7 @@ pprCs dflags cmms
writeCs :: DynFlags -> Handle -> [RawCmmGroup] -> IO ()
writeCs dflags handle cmms
= printForC handle (pprCs dflags cmms)
= printForC dflags handle (pprCs dflags cmms)
-- --------------------------------------------------------------------------
-- Now do some real work
......
......@@ -48,6 +48,7 @@ import CLabel
import PprCmmExpr
import Cmm
import DynFlags
import Outputable
import Platform
import FastString
......@@ -67,8 +68,9 @@ pprCmms platform cmms = pprCode CStyle (vcat (intersperse separator $ map (pprPl
separator = space $$ ptext (sLit "-------------------") $$ space
writeCmms :: (PlatformOutputable info, PlatformOutputable g)
=> Platform -> Handle -> [GenCmmGroup CmmStatics info g] -> IO ()
writeCmms platform handle cmms = printForC handle (pprCmms platform cmms)
=> DynFlags -> Handle -> [GenCmmGroup CmmStatics info g] -> IO ()
writeCmms dflags handle cmms = printForC dflags handle (pprCmms platform cmms)
where platform = targetPlatform dflags
-----------------------------------------------------------------------------
......
......@@ -340,13 +340,13 @@ printForUserPartWay _ handle d unqual doc
(runSDoc doc (initSDocContext (mkUserStyle unqual (PartWay d))))
-- printForC, printForAsm do what they sound like
printForC :: Handle -> SDoc -> IO ()
printForC handle doc =
printForC :: DynFlags -> Handle -> SDoc -> IO ()
printForC _ handle doc =
Pretty.printDoc LeftMode handle
(runSDoc doc (initSDocContext (PprCode CStyle)))
printForAsm :: Handle -> SDoc -> IO ()
printForAsm handle doc =
printForAsm :: DynFlags -> Handle -> SDoc -> IO ()
printForAsm _ handle doc =
Pretty.printDoc LeftMode handle
(runSDoc doc (initSDocContext (PprCode AsmStyle)))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment