diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Driver/Pipeline.hs | 2 | ||||
-rw-r--r-- | compiler/main/UpdateCafInfos.hs | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/compiler/GHC/Driver/Pipeline.hs b/compiler/GHC/Driver/Pipeline.hs index b9a32d340d..627efeeb41 100644 --- a/compiler/GHC/Driver/Pipeline.hs +++ b/compiler/GHC/Driver/Pipeline.hs @@ -1197,7 +1197,7 @@ runPhase (HscOut src_flavour mod_name result) _ dflags = do final_iface <- liftIO (mkFullIface hsc_env'{hsc_dflags=iface_dflags} partial_iface (Just caf_infos)) let final_mod_details = {-# SCC updateModDetailsCafInfos #-} - updateModDetailsCafInfos caf_infos mod_details + updateModDetailsCafInfos iface_dflags caf_infos mod_details setIface final_iface final_mod_details -- See Note [Writing interface files] diff --git a/compiler/main/UpdateCafInfos.hs b/compiler/main/UpdateCafInfos.hs index a1287e88c6..dd4881ec6e 100644 --- a/compiler/main/UpdateCafInfos.hs +++ b/compiler/main/UpdateCafInfos.hs @@ -7,6 +7,7 @@ module UpdateCafInfos import GhcPrelude import GHC.Core +import GHC.Driver.Session import GHC.Driver.Types import Id import IdInfo @@ -21,10 +22,16 @@ import Outputable -- | Update CafInfos of all occurences (in rules, unfoldings, class instances) updateModDetailsCafInfos - :: NameSet -- ^ Non-CAFFY names in the module. Names not in this set are CAFFY. + :: DynFlags + -> NameSet -- ^ Non-CAFFY names in the module. Names not in this set are CAFFY. -> ModDetails -- ^ ModDetails to update -> ModDetails -updateModDetailsCafInfos non_cafs mod_details = + +updateModDetailsCafInfos dflags _ mod_details + | gopt Opt_OmitInterfacePragmas dflags + = mod_details + +updateModDetailsCafInfos _ non_cafs mod_details = {- pprTrace "updateModDetailsCafInfos" (text "non_cafs:" <+> ppr non_cafs) $ -} let ModDetails{ md_types = type_env -- for unfoldings |