[LLVMdev] inserting exit function into IR

Frits van Bommel fvbommel at gmail.com
Thu Mar 31 12:58:56 PDT 2011


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)




More information about the llvm-dev mailing list