diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-10-26 15:05:27 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-11 03:19:59 -0500 |
commit | 6e23695e7d84aa248e7ca20bdb8d133f9b356548 (patch) | |
tree | c967ccca8144d32c56f323bb4e4ea7e524d3ad02 /compiler/GHC/Cmm/CLabel.hs | |
parent | fcfda909fd7fcf539ff31717ce01a56292abb92f (diff) | |
download | haskell-6e23695e7d84aa248e7ca20bdb8d133f9b356548.tar.gz |
Move this_module into NCGConfig
In various places in the NCG we need the Module currently being
compiled. Let's move this into the environment instead of chewing threw
another register.
Diffstat (limited to 'compiler/GHC/Cmm/CLabel.hs')
-rw-r--r-- | compiler/GHC/Cmm/CLabel.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index 7a3e55dcf9..3d21855ec2 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -1082,8 +1082,8 @@ isLocalCLabel this_mod lbl = -- that data resides in a DLL or not. [Win32 only.] -- @labelDynamic@ returns @True@ if the label is located -- in a DLL, be it a data reference or not. -labelDynamic :: NCGConfig -> Module -> CLabel -> Bool -labelDynamic config this_mod lbl = +labelDynamic :: NCGConfig -> CLabel -> Bool +labelDynamic config lbl = case lbl of -- is the RTS in a DLL or not? RtsLabel _ -> @@ -1136,6 +1136,7 @@ labelDynamic config this_mod lbl = externalDynamicRefs = ncgExternalDynamicRefs config platform = ncgPlatform config os = platformOS platform + this_mod = ncgThisModule config this_unit = toUnitId (moduleUnit this_mod) |