[LLVMdev] inserting exit function into IR

George Baah georgebaah at gmail.com
Thu Mar 31 13:01:02 PDT 2011


Oh, BTW it worked!!

On Thu, Mar 31, 2011 at 4:00 PM, George Baah <georgebaah at gmail.com> wrote:

> Thank you very much guys, I really appreciate your help.
>
> George
>
>
> On Thu, Mar 31, 2011 at 3:58 PM, Frits van Bommel <fvbommel at gmail.com>wrote:
>
>> On Thu, Mar 31, 2011 at 9:57 PM, George Baah <georgebaah at gmail.com>
>> wrote:
>> > I did M.getOrInsertFunction and called the exit function with .
>> >
>> > IRBuilder<> builder = IRBuilder<>(...);
>> >
>> > Value *one = ConstantInt::get(Type::getInt32Ty(M.getContext()),1);
>> >
>> > builder.CreateCall(exitF,one,"tmp4");
>> >
>> > "Instruction has a name, but provides a void value!
>> >   %tmp4 = call void @exit(i32 1)
>> > Broken module found, compilation aborted! "
>>
>> So... don't give the call a name? (just remove the "tmp4" parameter)
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110331/9fe29a35/attachment.html>


More information about the llvm-dev mailing list