[commit: ghc] master: Fix bug in LLVM code generator (cb8935d)

git at git.haskell.org git at git.haskell.org
Thu Nov 14 02:04:14 UTC 2013


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

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

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

commit cb8935d2b39ab1c8913152679828ac11f98bf424
Author: Ben Lippmeier <benl at ouroborus.net>
Date:   Wed Nov 6 13:05:52 2013 +1100

    Fix bug in LLVM code generator
    
    The bitcast operation always needs a type for the source.


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

cb8935d2b39ab1c8913152679828ac11f98bf424
 compiler/llvmGen/Llvm/PpLlvm.hs |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/compiler/llvmGen/Llvm/PpLlvm.hs b/compiler/llvmGen/Llvm/PpLlvm.hs
index fca1a7c..b8343ce 100644
--- a/compiler/llvmGen/Llvm/PpLlvm.hs
+++ b/compiler/llvmGen/Llvm/PpLlvm.hs
@@ -344,7 +344,11 @@ ppStore val dst
 
 
 ppCast :: LlvmCastOp -> LlvmVar -> LlvmType -> SDoc
-ppCast op from to = ppr op <+> ppr from <+> text "to" <+> ppr to
+ppCast op from to 
+    =   ppr op 
+    <+> ppr (getVarType from) <+> ppName from
+    <+> text "to" 
+    <+> ppr to
 
 
 ppMalloc :: LlvmType -> Int -> SDoc



More information about the ghc-commits mailing list