summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/PPC/Ppr.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/nativeGen/PPC/Ppr.hs')
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index c32468628e..1b49a495f5 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -46,21 +46,22 @@ import Data.Bits
-- -----------------------------------------------------------------------------
-- Printing this stuff out
-pprNatCmmDecl :: Platform -> NatCmmDecl CmmStatics Instr -> SDoc
-pprNatCmmDecl _ (CmmData section dats) =
+pprNatCmmDecl :: NatCmmDecl CmmStatics Instr -> SDoc
+pprNatCmmDecl (CmmData section dats) =
pprSectionHeader section $$ pprDatas dats
-- special case for split markers:
-pprNatCmmDecl _ (CmmProc Nothing lbl (ListGraph []))
+pprNatCmmDecl (CmmProc Nothing lbl (ListGraph []))
= pprLabel lbl
-- special case for code without an info table:
-pprNatCmmDecl _ (CmmProc Nothing lbl (ListGraph blocks)) =
+pprNatCmmDecl (CmmProc Nothing lbl (ListGraph blocks)) =
pprSectionHeader Text $$
pprLabel lbl $$ -- blocks guaranteed not null, so label needed
vcat (map pprBasicBlock blocks)
-pprNatCmmDecl platform (CmmProc (Just (Statics info_lbl info)) _entry_lbl (ListGraph blocks)) =
+pprNatCmmDecl (CmmProc (Just (Statics info_lbl info)) _entry_lbl (ListGraph blocks)) =
+ sdocWithPlatform $ \platform ->
pprSectionHeader Text $$
(
(if platformHasSubsectionsViaSymbols platform