summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-08-03 09:33:37 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-08-03 09:33:37 +0000
commit1f379510d8a0ea12c273c72129e7d25643ad2ed7 (patch)
tree062b0bc1b4630252310c46ab214169a139f7e217 /compiler/codeGen
parent447fe8ef99466a175f4e1b3281c7794c67ca698c (diff)
downloadhaskell-1f379510d8a0ea12c273c72129e7d25643ad2ed7.tar.gz
Don't include the package name in a cost centre's module name
This is mainly to restore the old behaviour, but also we shouldn't normally need the package name in a cost centre because only the "main" package normally has cost centres.
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/CgProf.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/codeGen/CgProf.hs b/compiler/codeGen/CgProf.hs
index 9bbf05b90c..daff2f6665 100644
--- a/compiler/codeGen/CgProf.hs
+++ b/compiler/codeGen/CgProf.hs
@@ -43,7 +43,8 @@ import MachOp
import CmmUtils ( zeroCLit, mkIntCLit, mkLblExpr )
import CLabel ( mkCCLabel, mkCCSLabel, mkRtsDataLabel )
-import Module ( pprModule )
+import Module ( moduleNameString )
+import qualified Module ( moduleName ) -- clashes with CgMonad.moduleName
import Id ( Id )
import CostCentre
import StgSyn ( GenStgExpr(..), StgExpr )
@@ -292,7 +293,10 @@ emitCostCentreDecl
-> Code
emitCostCentreDecl cc = do
{ label <- mkStringCLit (costCentreUserName cc)
- ; modl <- mkStringCLit (showSDoc (pprModule (cc_mod cc)))
+ ; modl <- mkStringCLit (moduleNameString (Module.moduleName (cc_mod cc)))
+ -- All cost centres will be in the main package, since we
+ -- don't normally use -auto-all or add SCCs to other packages.
+ -- Hence don't emit the package name in the module here.
; let
lits = [ zero, -- StgInt ccID,
label, -- char *label,