Skip to content
GitLab
Menu
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
630379c1
Commit
630379c1
authored
Jun 11, 2012
by
Ian Lynagh
Browse files
Pass DynFlags down to printForC and printForAsm
parent
667c5779
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/cmm/PprC.hs
View file @
630379c1
...
...
@@ -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
...
...
compiler/cmm/PprCmmDecl.hs
View file @
630379c1
...
...
@@ -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
-----------------------------------------------------------------------------
...
...
compiler/utils/Outputable.lhs
View file @
630379c1
...
...
@@ -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)))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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