summaryrefslogtreecommitdiff
path: root/compiler/GHC/CmmToAsm.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-10-26 14:55:47 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-11 03:19:59 -0500
commitfcfda909fd7fcf539ff31717ce01a56292abb92f (patch)
treef7a355ad32e024173d64ec6537195b0e6a1eaa5f /compiler/GHC/CmmToAsm.hs
parent2e63a0fb1bdaecc7916a3cc35dcfd2b2ef37c328 (diff)
downloadhaskell-fcfda909fd7fcf539ff31717ce01a56292abb92f.tar.gz
nativeGen: Make makeImportsDoc take an NCGConfig rather than DynFlags
It appears this was an oversight as there is no reason the full DynFlags is necessary.
Diffstat (limited to 'compiler/GHC/CmmToAsm.hs')
-rw-r--r--compiler/GHC/CmmToAsm.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs
index 09ff24e96f..d051baf782 100644
--- a/compiler/GHC/CmmToAsm.hs
+++ b/compiler/GHC/CmmToAsm.hs
@@ -290,7 +290,7 @@ finishNativeGen dflags config modLoc bufh@(BufHandle _ _ h) us ngs
-- write out the imports
let ctx = ncgAsmContext config
printSDocLn ctx Pretty.LeftMode h
- $ makeImportsDoc dflags (concat (ngs_imports ngs))
+ $ makeImportsDoc config (concat (ngs_imports ngs))
return us'
where
dump_stats = dumpAction dflags (mkDumpStyle alwaysQualify)
@@ -750,8 +750,8 @@ computeUnwinding _ ncgImpl (CmmProc _ _ _ (ListGraph blks)) =
-- | Build a doc for all the imports.
--
-makeImportsDoc :: DynFlags -> [CLabel] -> SDoc
-makeImportsDoc dflags imports
+makeImportsDoc :: NCGConfig -> [CLabel] -> SDoc
+makeImportsDoc config imports
= dyld_stubs imports
$$
-- On recent versions of Darwin, the linker supports
@@ -779,7 +779,6 @@ makeImportsDoc dflags imports
else Outputable.empty)
where
- config = initNCGConfig dflags
platform = ncgPlatform config
-- Generate "symbol stubs" for all external symbols that might