X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FcodeGen%2FClosureInfo.lhs;h=18734e13aabc4d85544394b55e1dbedb025e60ab;hb=984a288119983912d40a80845c674ee4b83a19ce;hp=9598233d4015affa1e87223034b3600d0d54bd1f;hpb=b01702b5d417de416cd9cff2f730112e08ce00d9;p=ghc-hetmet.git diff --git a/compiler/codeGen/ClosureInfo.lhs b/compiler/codeGen/ClosureInfo.lhs index 9598233..18734e1 100644 --- a/compiler/codeGen/ClosureInfo.lhs +++ b/compiler/codeGen/ClosureInfo.lhs @@ -72,7 +72,6 @@ import Id import IdInfo import DataCon import Name -import OccName import Type import TypeRep import TcType @@ -598,6 +597,10 @@ getCallMethod _ name caf (LFReEntrant _ arity _ _) n_args | otherwise = DirectEntry (enterIdLabel name caf) arity getCallMethod _ _ _ (LFCon con) n_args + | opt_SccProfilingOn -- when profiling, we must always enter + = EnterIt -- a closure when we use it, so that the closure + -- can be recorded as used for LDV profiling. + | otherwise = ASSERT( n_args == 0 ) ReturnCon con