search for: insertedcast

Displaying 1 result from an estimated 1 matches for "insertedcast".

Did you mean: inserted_at
2010 May 16
1
[LLVMdev] How to access the return value of a CallInst
...t the return value of a call instruction that I inserted during the optimization pass I wrote. I have something like the following: CallInst *InitCall = CallInst::Create(InitFn, Args.begin(), Args.end(), "log_load_addr_ret", LI); CastInst *InsertedCast = CastInst::CreateTruncOrBitCast(InitCall.getCalledValue(), LI->getType(), "return_load", LI); I assume that getCalledValue() will give me the return value of the InitCall CallInst. This compiles fine. But the CastInst cannot be created. The runtime error is : opt: /panfs/pan...