diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-03-31 18:49:01 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-03 06:26:54 -0400 |
commit | cc2918a0407e1581e824ebd90a1fcbb0637d5744 (patch) | |
tree | 42cdc286b9b2557252f59db47373305c1cfc9c36 /compiler/GHC/CmmToLlvm.hs | |
parent | a485c3c4049fff09e989bfd7d2ba47035c92a69b (diff) | |
download | haskell-cc2918a0407e1581e824ebd90a1fcbb0637d5744.tar.gz |
Refactor CmmStatics
In !2959 we noticed that there was some redundant code (in GHC.Cmm.Utils
and GHC.Cmm.StgToCmm.Utils) used to deal with `CmmStatics` datatype
(before SRT generation) and `RawCmmStatics` datatype (after SRT
generation).
This patch removes this redundant code by using a single GADT for
(Raw)CmmStatics.
Diffstat (limited to 'compiler/GHC/CmmToLlvm.hs')
-rw-r--r-- | compiler/GHC/CmmToLlvm.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/GHC/CmmToLlvm.hs b/compiler/GHC/CmmToLlvm.hs index d89b8e93cf..1ac2a0fa34 100644 --- a/compiler/GHC/CmmToLlvm.hs +++ b/compiler/GHC/CmmToLlvm.hs @@ -121,9 +121,9 @@ llvmGroupLlvmGens cmm = do let split (CmmData s d' ) = return $ Just (s, d') split (CmmProc h l live g) = do -- Set function type - let l' = case mapLookup (g_entry g) h of + let l' = case mapLookup (g_entry g) h :: Maybe RawCmmStatics of Nothing -> l - Just (RawCmmStatics info_lbl _) -> info_lbl + Just (CmmStaticsRaw info_lbl _) -> info_lbl lml <- strCLabel_llvm l' funInsert lml =<< llvmFunTy live return Nothing |