Commit d0fc7618 authored by Gabor Greif's avatar Gabor Greif 💬 Committed by Ben Gamari

llvmGen: Eliminate duplicate definition

remove local
parent 35a89778
......@@ -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
......
......@@ -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', [])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment