search for: ptr_to_other_func

Displaying 2 results from an estimated 2 matches for "ptr_to_other_func".

2016 Jun 20
3
function call replacement
...4 10) by %call = tail call noalias i8* @other_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...
2016 Jun 21
3
function call replacement
...* @other_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...