diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-10-04 17:36:29 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-11 12:51:19 -0400 |
commit | dce9f320ce7275fa97f49abef604abbc3b0f9a9c (patch) | |
tree | 29ab6497c80f83915e62330beca4ce45cf5d9fa9 /compiler/GHC/Cmm | |
parent | 7f0decd5063a853fc8f38a8944b2c91995cd5e48 (diff) | |
download | haskell-dce9f320ce7275fa97f49abef604abbc3b0f9a9c.tar.gz |
CLabel: fix isInfoTableLabel
isInfoTableLabel does not take Cmm info table into account. This patch is required for data section layout of wasm32 NCG to work.
Diffstat (limited to 'compiler/GHC/Cmm')
-rw-r--r-- | compiler/GHC/Cmm/CLabel.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/GHC/Cmm/CLabel.hs b/compiler/GHC/Cmm/CLabel.hs index cf004d02cb..5f2b0eca59 100644 --- a/compiler/GHC/Cmm/CLabel.hs +++ b/compiler/GHC/Cmm/CLabel.hs @@ -108,6 +108,7 @@ module GHC.Cmm.CLabel ( isLocalCLabel, mayRedirectTo, isInfoTableLabel, + isCmmInfoTableLabel, isConInfoTableLabel, isIdLabel, isTickyLabel, @@ -794,8 +795,14 @@ isInfoTableLabel (IdLabel _ _ InfoTable) = True isInfoTableLabel (IdLabel _ _ LocalInfoTable) = True isInfoTableLabel (IdLabel _ _ ConInfoTable {}) = True isInfoTableLabel (IdLabel _ _ BlockInfoTable) = True +isInfoTableLabel (CmmLabel _ _ _ CmmInfo) = True isInfoTableLabel _ = False +-- | Whether label points to an info table defined in Cmm +isCmmInfoTableLabel :: CLabel -> Bool +isCmmInfoTableLabel (CmmLabel _ _ _ CmmInfo) = True +isCmmInfoTableLabel _ = False + -- | Whether label is points to constructor info table isConInfoTableLabel :: CLabel -> Bool isConInfoTableLabel (IdLabel _ _ ConInfoTable {}) = True |