Displaying 1 result from an estimated 1 matches for "argchange".
Did you mean:
archangel
2011 Dec 13
1
[LLVMdev] Changing the operands in the CallInst
I implement the following function,which gets CallInst * and should perform
the following:
1. Change the value of the argument if condition1 takes place
2. Change the type of the argument if condition2 takes place
3. Add addition argument/s if condition3 takes place
void argChange(CallInst * I)
{
for (unsigned index = 0; index < I->getNumOperands(); ++index) {
do_something_with (I->getOperand(index),condition);
}
}
I think that the 1. can be implemented using I->setOperand(index,newValue)
Can anyone advice me how 2. & 3. could be implemented.
-...