[dragonegg] r201123 - Bug 18358 - Update for objectsize intrinsic argument change.

Matt Arsenault Matthew.Arsenault at amd.com
Mon Feb 10 18:45:35 PST 2014


Author: arsenm
Date: Mon Feb 10 20:45:34 2014
New Revision: 201123

URL: http://llvm.org/viewvc/llvm-project?rev=201123&view=rev
Log:
Bug 18358 - Update for objectsize intrinsic argument change.

The pointer type needs to be included in the mangling.

Modified:
    dragonegg/trunk/src/Convert.cpp

Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=201123&r1=201122&r2=201123&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Mon Feb 10 20:45:34 2014
@@ -4423,12 +4423,16 @@ bool TreeToLLVM::EmitBuiltinCall(gimple
     Value *NewTy = ConstantInt::get(Tmp->getType(), val);
 
     Value *Args[] = { EmitMemory(gimple_call_arg(stmt, 0)), NewTy };
+    Type *Int8PtrTy = Type::getInt8PtrTy(Context);
 
     // Grab the current return type.
-    Type *Ty = ConvertType(gimple_call_return_type(stmt));
+    Type *Ty[2] = {
+      ConvertType(gimple_call_return_type(stmt)),
+      Int8PtrTy
+    };
 
     // Manually coerce the arg to the correct pointer type.
-    Args[0] = Builder.CreateBitCast(Args[0], Type::getInt8PtrTy(Context));
+    Args[0] = Builder.CreateBitCast(Args[0], Int8PtrTy);
     Args[1] = Builder.CreateIntCast(Args[1], Type::getInt1Ty(Context),
                                     /*isSigned*/ false);
 





More information about the llvm-commits mailing list