summaryrefslogtreecommitdiff
path: root/compiler/GHC/Cmm/Node.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-08-25 16:51:21 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-26 15:06:01 -0400
commitf5e0f086a43c4e830f3fec343917daf3cc24b73a (patch)
tree7d2a3eaad953c8cee9cc5f2275f327c15d17d6e2 /compiler/GHC/Cmm/Node.hs
parent4786acf758ef064d3b79593774d1672e294b0afb (diff)
downloadhaskell-f5e0f086a43c4e830f3fec343917daf3cc24b73a.tar.gz
Remove label style from printing context
Previously, the SDocContext used for code generation contained information whether the labels should use Asm or C style. However, at every individual call site, this is known statically. This removes the parameter to 'PprCode' and replaces every 'pdoc' used to print a label in code style with 'pprCLabel' or 'pprAsmLabel'. The OutputableP instance is now used only for dumps. The output of T15155 changes, it now uses the Asm style (which is faithful to what actually happens).
Diffstat (limited to 'compiler/GHC/Cmm/Node.hs')
-rw-r--r--compiler/GHC/Cmm/Node.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/Cmm/Node.hs b/compiler/GHC/Cmm/Node.hs
index 117ed9747a..24983360c2 100644
--- a/compiler/GHC/Cmm/Node.hs
+++ b/compiler/GHC/Cmm/Node.hs
@@ -508,9 +508,9 @@ pprForeignTarget platform (PrimTarget op)
-- HACK: We're just using a ForeignLabel to get this printed, the label
-- might not really be foreign.
= pdoc platform
- (CmmLabel (mkForeignLabel
+ (mkForeignLabel
(mkFastString (show op))
- Nothing ForeignLabelInThisPackage IsFunction))
+ Nothing ForeignLabelInThisPackage IsFunction)
instance Outputable Convention where
ppr = pprConvention