[llvm-commits] [dragonegg] r135472 - /dragonegg/trunk/src/Convert.cpp

Tobias Grosser tobias at grosser.es
Tue Jul 19 05:19:37 PDT 2011


On 07/19/2011 01:29 PM, Jay Foad wrote:
>> Did you compile test these changes?
>
> Yes. I got no errors in Convert.cpp, compiling with GCC 4.5.2 on
> Ubuntu Natty x86_64.

I have the same.

>> I had the to use the following to make
>> the calls with a single element work:
>>
>> -  Result = Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Id,&Ty,
>> 1),
>> +  Result = Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Id,
>> + makeArrayRef(&Ty, 1)),
>
> That's ugly. Why doesn't the implicit conversion from Type * to
> ArrayRef<Type *>  work?

OK. It seems I got it wrong. I used

Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Id, &Ty)

whereas you used

Builder.CreateCall(Intrinsic::getDeclaration(TheModule, Id, Ty)
                                                             ^^

This makes the difference. Your code compiles for me without any problems.


Tobi



More information about the llvm-commits mailing list