diff options
author | Gabor Greif <ggreif@gmail.com> | 2018-11-20 14:35:09 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-11-22 16:02:22 -0500 |
commit | d0fc76189b9b709378849d071814342983c3a5df (patch) | |
tree | f70f6c87e9fa6da993e9f2b671fa22a3f2f92d67 /compiler/llvmGen | |
parent | 35a897782b6b0a252da7fdcf4921198ad4e1d96c (diff) | |
download | haskell-d0fc76189b9b709378849d071814342983c3a5df.tar.gz |
llvmGen: Eliminate duplicate definition
remove local
Diffstat (limited to 'compiler/llvmGen')
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/Base.hs | 3 | ||||
-rw-r--r-- | compiler/llvmGen/LlvmCodeGen/Ppr.hs | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs index 6e20da48c1..21b45e5a3b 100644 --- a/compiler/llvmGen/LlvmCodeGen/Base.hs +++ b/compiler/llvmGen/LlvmCodeGen/Base.hs @@ -474,8 +474,7 @@ generateExternDecls = do -- @$def@ suffix, and generate the appropriate alias. aliasify :: LMGlobal -> LlvmM [LMGlobal] aliasify (LMGlobal var val) = do - let i8Ptr = LMPointer (LMInt 8) - LMGlobalVar lbl ty link sect align const = var + let LMGlobalVar lbl ty link sect align const = var defLbl = lbl `appendFS` fsLit "$def" defVar = LMGlobalVar defLbl ty Internal sect align const diff --git a/compiler/llvmGen/LlvmCodeGen/Ppr.hs b/compiler/llvmGen/LlvmCodeGen/Ppr.hs index 2a8340bcf9..c1378aa1fd 100644 --- a/compiler/llvmGen/LlvmCodeGen/Ppr.hs +++ b/compiler/llvmGen/LlvmCodeGen/Ppr.hs @@ -89,7 +89,7 @@ pprLlvmCmmDecl (CmmProc mb_info entry_lbl live (ListGraph blks)) Alias alias = LMGlobal funVar (Just $ LMBitc (LMStaticPointer defVar) - (LMPointer $ LMInt 8)) + i8Ptr) return (ppLlvmGlobal alias $+$ ppLlvmFunction fun', []) |