Can now modify called_function of CallOrInvokeInstruction

This commit is contained in:
Siu Kwan Lam 2012-11-01 11:41:28 -05:00
commit b9d05bb6fe
4 changed files with 19 additions and 3 deletions

View file

@ -855,6 +855,13 @@ LLVMValueRef LLVMInstGetCalledFunction(LLVMValueRef inst)
return llvm::wrap(CallSite(instp).getCalledFunction());
}
void LLVMInstSetCalledFunction(LLVMValueRef inst, LLVMValueRef fn)
{
using namespace llvm;
Instruction *instp = unwrap<Instruction>(inst);
CallSite(instp).setCalledFunction(unwrap(fn));
}
///* llvm::unwrap a set of `n' wrapped objects starting at `values',
// * into a vector of pointers to llvm::unwrapped objects `out'. */
//template <typename W, typename UW>