[LLVMdev] error in InsertElementInst

Vasileios Koutsoumpos bkoutsoub at gmail.com
Sun Jul 20 06:22:12 PDT 2014


Hello Tim,

Thanks for the help, just a silly mistake...It works now perfectly!

Regards,
Vasilis

On Jul 20, 2014, at 2:20 PM, Tim Northover <t.p.northover at gmail.com> wrote:

> Hi Vasilis,
> 
> On 20 July 2014 12:57, Vasilis Koutsoumpos <bill_koutsoumpos at hotmail.com> wrote:
>> Do you have any suggestions for these errors?
> 
> It looks like the constructor is private to make sure the type of the
> vector and the overall instruction match up properly. You should use
> InsertElementInst::Create instead (see
> http://llvm.org/docs/doxygen/html/classllvm_1_1InsertElementInst.html).
> 
> Actually, it's usually better to create your instructions using the
> IRBuilder class rather than directly. It handles inserting them into a
> basic block more conveniently, and smooths out some of the differences
> between various instructions (like this one).
> 
> Cheers.
> 
> Tim.
> 





More information about the llvm-dev mailing list