summaryrefslogtreecommitdiff
path: root/compiler/cmm/CLabel.hs
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2017-02-17 13:14:00 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2017-02-17 13:16:15 +0000
commit8d401e50ce35525dcdc6a21fcf952c3cbf3a72d4 (patch)
treeb437497e10ad09b165beb126cf0b22b161d54804 /compiler/cmm/CLabel.hs
parente52a335d3ae2437f3705baa8c81e3a62ebdd75ab (diff)
downloadhaskell-8d401e50ce35525dcdc6a21fcf952c3cbf3a72d4.tar.gz
Honour -dsuppress-uniques more thoroughly
I found that tests parser/should_compile/DumpRenamedAst and friends were printing uniques, which makes the test fragile. But -dsuppress-uniques made no difference! It turned out that pprName wasn't properly consulting Opt_SuppressUniques. This patch fixes the problem, and updates those three tests to use -dsuppress-uniques
Diffstat (limited to 'compiler/cmm/CLabel.hs')
-rw-r--r--compiler/cmm/CLabel.hs24
1 files changed, 12 insertions, 12 deletions
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index 2f382039be..5f13bed309 100644
--- a/compiler/cmm/CLabel.hs
+++ b/compiler/cmm/CLabel.hs
@@ -1085,14 +1085,14 @@ pprCLabel platform (AsmTempLabel u)
| cGhcWithNativeCodeGen == "YES"
= getPprStyle $ \ sty ->
if asmStyle sty then
- ptext (asmTempLabelPrefix platform) <> pprUnique u
+ ptext (asmTempLabelPrefix platform) <> pprUniqueAlways u
else
- char '_' <> pprUnique u
+ char '_' <> pprUniqueAlways u
pprCLabel platform (AsmTempDerivedLabel l suf)
| cGhcWithNativeCodeGen == "YES"
= ptext (asmTempLabelPrefix platform)
- <> case l of AsmTempLabel u -> pprUnique u
+ <> case l of AsmTempLabel u -> pprUniqueAlways u
_other -> pprCLabel platform l
<> ftext suf
@@ -1110,7 +1110,7 @@ pprCLabel platform (DeadStripPreventer lbl)
pprCLabel _ (StringLitLabel u)
| cGhcWithNativeCodeGen == "YES"
- = pprUnique u <> ptext (sLit "_str")
+ = pprUniqueAlways u <> ptext (sLit "_str")
pprCLabel platform lbl
= getPprStyle $ \ sty ->
@@ -1134,22 +1134,22 @@ pprAsmCLbl _ lbl
pprCLbl :: CLabel -> SDoc
pprCLbl (StringLitLabel u)
- = pprUnique u <> text "_str"
+ = pprUniqueAlways u <> text "_str"
pprCLbl (CaseLabel u CaseReturnPt)
- = hcat [pprUnique u, text "_ret"]
+ = hcat [pprUniqueAlways u, text "_ret"]
pprCLbl (CaseLabel u CaseReturnInfo)
- = hcat [pprUnique u, text "_info"]
+ = hcat [pprUniqueAlways u, text "_info"]
pprCLbl (CaseLabel u (CaseAlt tag))
- = hcat [pprUnique u, pp_cSEP, int tag, text "_alt"]
+ = hcat [pprUniqueAlways u, pp_cSEP, int tag, text "_alt"]
pprCLbl (CaseLabel u CaseDefault)
- = hcat [pprUnique u, text "_dflt"]
+ = hcat [pprUniqueAlways u, text "_dflt"]
pprCLbl (SRTLabel u)
- = pprUnique u <> pp_cSEP <> text "srt"
+ = pprUniqueAlways u <> pp_cSEP <> text "srt"
-pprCLbl (LargeSRTLabel u) = pprUnique u <> pp_cSEP <> text "srtd"
-pprCLbl (LargeBitmapLabel u) = text "b" <> pprUnique u <> pp_cSEP <> text "btm"
+pprCLbl (LargeSRTLabel u) = pprUniqueAlways u <> pp_cSEP <> text "srtd"
+pprCLbl (LargeBitmapLabel u) = text "b" <> pprUniqueAlways u <> pp_cSEP <> text "btm"
-- Some bitsmaps for tuple constructors have a numeric tag (e.g. '7')
-- until that gets resolved we'll just force them to start
-- with a letter so the label will be legal assmbly code.