X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FcodeGen%2FCgHpc.hs;h=3d300eda53d2279bc8b2f2f79f74049dfc758763;hp=768a307e3a9daad1e4f4e432f7c6301623a62664;hb=7854ec4b11e117f8514553890851d14a66690fbb;hpb=176fa33f17dd78355cc572e006d2ab26898e2c69 diff --git a/compiler/codeGen/CgHpc.hs b/compiler/codeGen/CgHpc.hs index 768a307..3d300ed 100644 --- a/compiler/codeGen/CgHpc.hs +++ b/compiler/codeGen/CgHpc.hs @@ -1,10 +1,3 @@ -{-# OPTIONS -w #-} --- The above warning supression flag is a temporary kludge. --- While working on this module you are encouraged to remove it and fix --- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings --- for details - ----------------------------------------------------------------------------- -- -- Code generation for coverage @@ -26,10 +19,10 @@ import ForeignCall import ClosureInfo import FastString import HscTypes -import Char -import StaticFlags -import PackageConfig +import Panic +import BasicTypes +import Data.Char import Data.Word cgTickBox :: Module -> Int -> Code @@ -65,7 +58,7 @@ hpcTable this_mod (HpcInfo hpc_tickCount _) = do else packageIdString (modulePackageId this_mod) ++ "/" ++ module_name_str -hpcTable this_mod (NoHpcInfo {}) = error "TODO: impossible" +hpcTable _ (NoHpcInfo {}) = error "TODO: impossible" initHpc :: Module -> HpcInfo -> Code initHpc this_mod (HpcInfo tickCount hashNo) @@ -74,7 +67,7 @@ initHpc this_mod (HpcInfo tickCount hashNo) PlayRisky [CmmHinted id NoHint] (CmmCallee - (CmmLit $ CmmLabel $ mkForeignLabel mod_alloc Nothing False) + (CmmLit $ CmmLabel $ mkForeignLabel mod_alloc Nothing ForeignLabelInThisPackage IsFunction) CCallConv ) [ CmmHinted (mkLblExpr mkHpcModuleNameLabel) AddrHint @@ -89,4 +82,5 @@ initHpc this_mod (HpcInfo tickCount hashNo) where word32 i = CmmLit (CmmInt (fromIntegral (fromIntegral i :: Word32)) W32) mod_alloc = mkFastString "hs_hpc_module" +initHpc _ (NoHpcInfo {}) = panic "initHpc: NoHpcInfo"