Tag ForeignCalls with the package they correspond to
[ghc-hetmet.git] / compiler / cmm / ZipCfgCmmRep.hs
index 9aae097..0a494f8 100644 (file)
@@ -484,8 +484,12 @@ ppr_safety Unsafe         = text "unsafe"
 
 ppr_call_target :: MidCallTarget -> SDoc
 ppr_call_target (ForeignTarget fn c) = ppr_fc c <+> ppr_target fn
-ppr_call_target (PrimTarget op) =
-  ppr (CmmLabel (mkForeignLabel (mkFastString (show op)) Nothing False IsFunction))
+ppr_call_target (PrimTarget op) 
+ -- HACK: We're just using a ForeignLabel to get this printed, the label
+ --      might not really be foreign.
+ = ppr (CmmLabel (mkForeignLabel
+                       (mkFastString (show op)) 
+                       Nothing ForeignLabelInThisPackage IsFunction))
 
 ppr_target :: CmmExpr -> SDoc
 ppr_target t@(CmmLit _) = ppr t