Displaying 1 result from an estimated 1 matches for "createtruncorbitcast".
2010 May 16
1
[LLVMdev] How to access the return value of a CallInst
...all 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/panasas-01.cs.wisc.edu/scratch/wang/...