Displaying 1 result from an estimated 1 matches for "log_load_addr_ret".
2010 May 16
1
[LLVMdev] How to access the return value of a CallInst
Hi all:
I am trying to get 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....