diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-02-03 17:57:29 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-02-20 21:18:48 -0500 |
commit | 6880d6aa1e6e96579bbff89712efd813489cc828 (patch) | |
tree | f2156d5a5c168bf28ee569a62a74b51adf74dac9 /compiler/GHC/CmmToLlvm/Base.hs | |
parent | 74ad75e87317196c600dfabc61aee1b87d95c214 (diff) | |
download | haskell-6880d6aa1e6e96579bbff89712efd813489cc828.tar.gz |
Disentangle DynFlags and SDoc
Remove several uses of `sdocWithDynFlags`. The remaining ones are mostly
CodeGen related (e.g. depend on target platform constants) and will be
fixed separately.
Metric Decrease:
T12425
T9961
WWRec
T1969
T14683
Diffstat (limited to 'compiler/GHC/CmmToLlvm/Base.hs')
-rw-r--r-- | compiler/GHC/CmmToLlvm/Base.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/GHC/CmmToLlvm/Base.hs b/compiler/GHC/CmmToLlvm/Base.hs index c0bd742840..5cfef04029 100644 --- a/compiler/GHC/CmmToLlvm/Base.hs +++ b/compiler/GHC/CmmToLlvm/Base.hs @@ -506,7 +506,9 @@ strCLabel_llvm :: CLabel -> LlvmM LMString strCLabel_llvm lbl = do dflags <- getDynFlags let sdoc = pprCLabel dflags lbl - str = Outp.renderWithStyle dflags sdoc (Outp.mkCodeStyle Outp.CStyle) + str = Outp.renderWithStyle + (initSDocContext dflags (Outp.mkCodeStyle Outp.CStyle)) + sdoc return (fsLit str) strDisplayName_llvm :: CLabel -> LlvmM LMString @@ -515,7 +517,7 @@ strDisplayName_llvm lbl = do let sdoc = pprCLabel dflags lbl depth = Outp.PartWay 1 style = Outp.mkUserStyle dflags Outp.reallyAlwaysQualify depth - str = Outp.renderWithStyle dflags sdoc style + str = Outp.renderWithStyle (initSDocContext dflags style) sdoc return (fsLit (dropInfoSuffix str)) dropInfoSuffix :: String -> String @@ -532,7 +534,7 @@ strProcedureName_llvm lbl = do let sdoc = pprCLabel dflags lbl depth = Outp.PartWay 1 style = Outp.mkUserStyle dflags Outp.neverQualify depth - str = Outp.renderWithStyle dflags sdoc style + str = Outp.renderWithStyle (initSDocContext dflags style) sdoc return (fsLit str) -- ---------------------------------------------------------------------------- |