Displaying 2 results from an estimated 2 matches for "call_to_func_inst".
2016 Jun 20
3
function call replacement
...func(i64 10)
I managed to declare other_func correctly but I am having troubles to
understand how I should proceed to do the replacement.
I tried to use ReplaceInstWithInst function as follows:
CallInst *call_to_other_func_inst = IRBuilder.CreateCall(ptr_to_other_func,
args);
ReplaceInstWithInst(call_to_func_inst, newI);
LLVM builds correctly but the instrumentation crashes at optimization time.
I know this isn't the correct way to do it because IRBuilder generates IR
and I just want to have an instance of a CallInst. But I don't see how it
is supposed to be done?
There are methods to create CallI...
2016 Jun 21
3
function call replacement
...e other_func correctly but I am having troubles to
> understand how I should proceed to do the replacement.
>
> I tried to use ReplaceInstWithInst function as follows:
>
> CallInst *call_to_other_func_inst =
> IRBuilder.CreateCall(ptr_to_other_func, args);
> ReplaceInstWithInst(call_to_func_inst, newI);
>
> LLVM builds correctly but the instrumentation crashes at optimization
> time. I know this isn't the correct way to do it because IRBuilder
> generates IR and I just want to have an instance of a CallInst. But I don't
> see how it is supposed to be done?
>
>...