summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-07-26 21:24:21 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-07-26 21:24:21 +0200
commit079d294f41b69864c46caf22adc3ba4248e6c649 (patch)
tree8814f16b515d0c7c7d30968487760a56d30dc108
parent2284b2a54df8bc84368ea5b67f137354f2a8bedc (diff)
downloadhaskell-079d294f41b69864c46caf22adc3ba4248e6c649.tar.gz
pprCLabel: simplify
-rw-r--r--compiler/GHC/Cmm/CLabel.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs
index 3cac85c5f0..a09a7777f4 100644
--- a/compiler/GHC/Cmm/CLabel.hs
+++ b/compiler/GHC/Cmm/CLabel.hs
@@ -1409,19 +1409,19 @@ pprCLabel !platform !sty lbl = -- see Note [Bangs in CLabel]
AsmStyle | use_leading_underscores -> pp_cSEP <> doc
_ -> doc
- tempLabelPrefixOrUnderscore :: Platform -> SDoc
- tempLabelPrefixOrUnderscore platform = case sty of
+ tempLabelPrefixOrUnderscore :: SDoc
+ tempLabelPrefixOrUnderscore = case sty of
AsmStyle -> asmTempLabelPrefix platform
CStyle -> char '_'
in case lbl of
LocalBlockLabel u -> case sty of
- AsmStyle -> tempLabelPrefixOrUnderscore platform <> pprUniqueAlways u
- CStyle -> tempLabelPrefixOrUnderscore platform <> text "blk_" <> pprUniqueAlways u
+ AsmStyle -> tempLabelPrefixOrUnderscore <> pprUniqueAlways u
+ CStyle -> tempLabelPrefixOrUnderscore <> text "blk_" <> pprUniqueAlways u
AsmTempLabel u
- -> tempLabelPrefixOrUnderscore platform <> pprUniqueAlways u
+ -> tempLabelPrefixOrUnderscore <> pprUniqueAlways u
AsmTempDerivedLabel l suf
-> asmTempLabelPrefix platform
@@ -1471,7 +1471,7 @@ pprCLabel !platform !sty lbl = -- see Note [Bangs in CLabel]
CStyle -> ppr name <> ppIdFlavor flavor
SRTLabel u
- -> maybe_underscore $ tempLabelPrefixOrUnderscore platform <> pprUniqueAlways u <> pp_cSEP <> text "srt"
+ -> maybe_underscore $ tempLabelPrefixOrUnderscore <> pprUniqueAlways u <> pp_cSEP <> text "srt"
RtsLabel (RtsApFast (NonDetFastString str))
-> maybe_underscore $ ftext str <> text "_fast"
@@ -1511,7 +1511,7 @@ pprCLabel !platform !sty lbl = -- see Note [Bangs in CLabel]
-> maybe_underscore $ text "SLOW_CALL_fast_" <> text pat <> text "_ctr"
LargeBitmapLabel u
- -> maybe_underscore $ tempLabelPrefixOrUnderscore platform
+ -> maybe_underscore $ tempLabelPrefixOrUnderscore
<> char 'b' <> pprUniqueAlways u <> pp_cSEP <> text "btm"
-- Some bitmaps for tuple constructors have a numeric tag (e.g. '7')
-- until that gets resolved we'll just force them to start