summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmBuildInfoTables.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-09-04 13:57:26 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-09-04 13:58:27 +0100
commitbd5354e31c98c489d58ec686dd87d0d2d5e4d622 (patch)
treedb9676904621271e124ff50d52d05fe1e9297fa2 /compiler/cmm/CmmBuildInfoTables.hs
parente6411395563c3d425bc78a78b189b33eb3d3cc07 (diff)
downloadhaskell-bd5354e31c98c489d58ec686dd87d0d2d5e4d622.tar.gz
Fix -split-objs with the new code generator
We need to make the SRT label external and unique when splitting, because it is shared amongst all the functions in the module. Also some SRT-related cleanup.
Diffstat (limited to 'compiler/cmm/CmmBuildInfoTables.hs')
-rw-r--r--compiler/cmm/CmmBuildInfoTables.hs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/cmm/CmmBuildInfoTables.hs b/compiler/cmm/CmmBuildInfoTables.hs
index 309536b963..0cfcc0d5be 100644
--- a/compiler/cmm/CmmBuildInfoTables.hs
+++ b/compiler/cmm/CmmBuildInfoTables.hs
@@ -32,10 +32,9 @@ import Bitmap
import CLabel
import Cmm
import CmmUtils
-import IdInfo
import Data.List
import Maybes
-import Name
+import Module
import Outputable
import SMRep
import UniqSupply
@@ -137,9 +136,9 @@ instance Outputable TopSRT where
<+> ppr elts
<+> ppr eltmap
-emptySRT :: MonadUnique m => m TopSRT
-emptySRT =
- do top_lbl <- getUniqueM >>= \ u -> return $ mkSRTLabel (mkFCallName u "srt") NoCafRefs
+emptySRT :: MonadUnique m => Maybe Module -> m TopSRT
+emptySRT mb_mod =
+ do top_lbl <- getUniqueM >>= \ u -> return $ mkModSRTLabel mb_mod u
return TopSRT { lbl = top_lbl, next_elt = 0, rev_elts = [], elt_map = Map.empty }
cafMember :: TopSRT -> CLabel -> Bool