[llvm-commits] [llvm-gcc-4.2] r85466 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Eric Christopher
echristo at apple.com
Wed Oct 28 19:02:33 PDT 2009
On Oct 28, 2009, at 7:00 PM, Mike Stump wrote:
> On Oct 28, 2009, at 6:43 PM, Eric Christopher wrote:
>> Author: echristo
>> Date: Wed Oct 28 20:43:46 2009
>> New Revision: 85466
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=85466&view=rev
>> Log:
>> Try #2 of this. Coerce all of the types to what they should be.
>
>> + const Type* Ty[3];
>> + Ty[0] = ConvertType(TREE_TYPE(exp));
>> + Ty[1] = Type::getInt8PtrTy(Context);
>> + Ty[2] = ConvertType(TREE_TYPE(ObjTy));
>> +
>> + // Manually coerce the args to the current types.
>> + Args[0] = Builder.CreateBitCast(Args[0], Ty[1]);
>> + Args[1] = Builder.CreateIntCast(Args[1], Ty[2], "");
>> +
>> + Result = Builder.CreateCall(Intrinsic::getDeclaration(TheModule,
>> + Intrinsic::objectsize,
>> + Ty,
>> + 2),
>> + Args, Args + 2);
>
> Ty[2] isn't used, is it?
>
Yep... it's the type of the object 0, 1, 2, 3.
-eric
More information about the llvm-commits
mailing list