[commit: ghc] master: llvmGen: Fix minor correctness issue (d9d1b9b)

git at git.haskell.org git at git.haskell.org
Fri Dec 14 03:00:14 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d9d1b9b00321743611b271da3d427f9ffea00b96/ghc

>---------------------------------------------------------------

commit d9d1b9b00321743611b271da3d427f9ffea00b96
Author: Gabor Greif <ggreif at gmail.com>
Date:   Tue Nov 20 18:18:55 2018 +0100

    llvmGen: Fix minor correctness issue
    
    The alias is of type i8, so its global variable name
    should have type i8*. Anyway we should never deal
    with pointers to (i8*)!


>---------------------------------------------------------------

d9d1b9b00321743611b271da3d427f9ffea00b96
 compiler/llvmGen/LlvmCodeGen/Base.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs
index 21b45e5..e978d6f 100644
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs
@@ -480,7 +480,7 @@ aliasify (LMGlobal var val) = do
         defVar = LMGlobalVar defLbl ty Internal sect align const
 
         defPtrVar = LMGlobalVar defLbl (LMPointer ty) link Nothing Nothing const
-        aliasVar = LMGlobalVar lbl (LMPointer i8Ptr) link Nothing Nothing Alias
+        aliasVar = LMGlobalVar lbl i8Ptr link Nothing Nothing Alias
         aliasVal = LMBitc (LMStaticPointer defPtrVar) i8Ptr
 
     -- we need to mark the $def symbols as used so LLVM doesn't forget which



More information about the ghc-commits mailing list