[llvm-commits] [llvm-gcc-4.2] r85466 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Mike Stump mrs at apple.com
Wed Oct 28 19:00:17 PDT 2009


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?




More information about the llvm-commits mailing list