diff options
Diffstat (limited to 'ghc/compiler/cmm')
| -rw-r--r-- | ghc/compiler/cmm/CLabel.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ghc/compiler/cmm/CLabel.hs b/ghc/compiler/cmm/CLabel.hs index ae470caa84..81f5ecac1d 100644 --- a/ghc/compiler/cmm/CLabel.hs +++ b/ghc/compiler/cmm/CLabel.hs @@ -28,6 +28,7 @@ module CLabel ( mkAltLabel, mkDefaultLabel, mkBitmapLabel, + mkStringLitLabel, mkClosureTblLabel, @@ -136,6 +137,9 @@ data CLabel | AsmTempLabel {-# UNPACK #-} !Unique + | StringLitLabel + {-# UNPACK #-} !Unique + | ModuleInitLabel Module -- the module name String -- its "way" @@ -249,6 +253,7 @@ mkReturnInfoLabel uniq = CaseLabel uniq CaseReturnInfo mkAltLabel uniq tag = CaseLabel uniq (CaseAlt tag) mkDefaultLabel uniq = CaseLabel uniq CaseDefault +mkStringLitLabel = StringLitLabel mkAsmTempLabel = AsmTempLabel mkModuleInitLabel = ModuleInitLabel @@ -351,6 +356,7 @@ needsCDecl (PlainModuleInitLabel _) = True needsCDecl ModuleRegdLabel = False needsCDecl (CaseLabel _ _) = False +needsCDecl (StringLitLabel _) = False needsCDecl (AsmTempLabel _) = False needsCDecl (RtsLabel _) = False needsCDecl (ForeignLabel _ _ _) = False @@ -372,6 +378,7 @@ isAsmTemp _ = False externallyVisibleCLabel :: CLabel -> Bool -- not C "static" externallyVisibleCLabel (CaseLabel _ _) = False +externallyVisibleCLabel (StringLitLabel _) = False externallyVisibleCLabel (AsmTempLabel _) = False externallyVisibleCLabel (ModuleInitLabel _ _)= True externallyVisibleCLabel (PlainModuleInitLabel _)= True @@ -536,6 +543,9 @@ pprAsmCLbl (ForeignLabel fs (Just sz) _) pprAsmCLbl lbl = pprCLbl lbl +pprCLbl (StringLitLabel u) + = pprUnique u <> ptext SLIT("_str") + pprCLbl (CaseLabel u CaseReturnPt) = hcat [pprUnique u, ptext SLIT("_ret")] pprCLbl (CaseLabel u CaseReturnInfo) |
