次のコードでは、LLVM 命令のオペランドを置き換えようとしています。しかし、それは機能せず、何も変更されません。これを解決する方法はありますか?
for (OI = insn->op_begin(), OE = insn->op_end(); OI != OE; ++OI)
{
Value *val = *OI;
iter = mapClonedAndOrg.find( val );
if( iter != mapClonedAndOrg.end( ) )
{
// Here I try to replace the operand, to no effect!
val = (Value*)iter->second.PN;
}
}