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

Mike Stump mrs at apple.com
Tue Oct 27 12:59:28 PDT 2009


On Oct 26, 2009, at 5:53 PM, Eric Christopher wrote:
> Author: echristo
> Date: Mon Oct 26 19:53:46 2009
> New Revision: 85190
>
> URL: http://llvm.org/viewvc/llvm-project?rev=85190&view=rev
> Log:
> Use new objectsize intrinsic for object size checking instead of
> folding to "don't know" immediately.

> +    const Type* Ty[3];
> +    Ty[0] = ConvertType(TREE_TYPE(exp));
> +    Ty[1] = Type::getInt8PtrTy(Context);
> +    Ty[2] = Type::getInt32Ty(Context);
> +
> +    Result = Builder.CreateCall(Intrinsic::getDeclaration(TheModule,
> +							  Intrinsic::objectsize,
> +							  Ty,
> +							  1),

Given that there is a 1 here, you don't need Ty[1], nor Ty[2] above.



More information about the llvm-commits mailing list