diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-12-27 11:36:29 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2021-12-27 11:44:39 +0000 |
commit | ad23af5c39cdaf924747d2d0acb6796055f628fd (patch) | |
tree | 2514e5af64b1c98de5a2511eaeced631c799afe1 /compiler/GHC/Driver/Session.hs | |
parent | b8e4102bd19d86d6a60ee78fba81c9a3b5be2aed (diff) | |
download | haskell-wip/source-notes-change.tar.gz |
Source note changeswip/source-notes-change
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 |