diff options
Diffstat (limited to 'compiler/GHC/Driver/Session.hs')
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index d1c29bc824..2b9eaa1db9 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -39,6 +39,7 @@ module GHC.Driver.Session ( lang_set, DynamicTooState(..), dynamicTooState, setDynamicNow, sccProfilingEnabled, + needSourceNotes, DynFlags(..), outputFile, objectSuf, ways, FlagSpec(..), @@ -4778,6 +4779,11 @@ isBmi2Enabled dflags = case platformArch (targetPlatform dflags) of sccProfilingEnabled :: DynFlags -> Bool sccProfilingEnabled dflags = profileIsProfiling (targetProfile dflags) +-- | Indicate whether we need to generate source notes +needSourceNotes :: DynFlags -> Bool +needSourceNotes dflags = debugLevel dflags > 0 + || gopt Opt_InfoTableMap dflags + -- ----------------------------------------------------------------------------- -- Linker/compiler information |