From ce5c2999d2e356d034fbf1045a2383c0ac24f15f Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Mon, 16 Mar 2020 15:44:15 +0100 Subject: Avoid using sdocWithDynFlags (#17957) Remove one use of `sdocWithDynFlags` from `GHC.CmmToLlvm.llvmCodeGen'` and from `GHC.Driver.CodeOutput.profilingInitCode` --- compiler/GHC/Driver/CodeOutput.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'compiler/GHC/Driver/CodeOutput.hs') diff --git a/compiler/GHC/Driver/CodeOutput.hs b/compiler/GHC/Driver/CodeOutput.hs index f87661846e..3bce0db86d 100644 --- a/compiler/GHC/Driver/CodeOutput.hs +++ b/compiler/GHC/Driver/CodeOutput.hs @@ -277,10 +277,9 @@ outputForeignStubs_help fname doc_str header footer -- module; -- | Generate code to initialise cost centres -profilingInitCode :: Module -> CollectedCCs -> SDoc -profilingInitCode this_mod (local_CCs, singleton_CCSs) - = sdocWithDynFlags $ \dflags -> - if not (gopt Opt_SccProfilingOn dflags) +profilingInitCode :: DynFlags -> Module -> CollectedCCs -> SDoc +profilingInitCode dflags this_mod (local_CCs, singleton_CCSs) + = if not (gopt Opt_SccProfilingOn dflags) then empty else vcat $ map emit_cc_decl local_CCs -- cgit v1.2.1