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

Eric Christopher echristo at apple.com
Sun Nov 8 10:35:19 PST 2009


On Nov 8, 2009, at 9:10 AM, Duncan Sands wrote:

> Hi Eric,
> 
>> +    Value* Args[] = {
>> +      Emit(Object, 0),
>> +      Emit(ObjTy, 0)
>> +    };
>> +
>> +    // Grab the current return type.
>> +    const Type* Ty;
>> +    Ty = ConvertType(TREE_TYPE(exp));
>> +
>> +    // Manually coerce the arg to the correct pointer type.
>> +    Args[0] = Builder.CreateBitCast(Args[0], Type::getInt8PtrTy(Context));
> 
> Args[1] is required by the LLVM intrinsic to be an i32, but what guarantees
> that it is?

The check above on the tree I believe.

-eric



More information about the llvm-commits mailing list