search for: replacebyclone

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

2009 Nov 18
2
[LLVMdev] Strange error using CallInst constructor
...C++ question instead of an actual LLVM question, but here it goes anyway. I'm trying to invoke the following constructor: CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator ArgEnd, const Twine &NameStr, BasicBlock *InsertAtEnd); My code is: using namespace llvm; void replaceByClone(Function *f, CallInst *I){ Function *clone = CloneFunction(f); BasicBlock::iterator ii(I); ReplaceInstWithInst(I->getParent()->getInstList(),ii,CallInst(clone,clone->arg_begin(),clone->arg_end())); } Compiling generates the following error: error: no matching function for call to ‘llv...
2009 Nov 19
0
[LLVMdev] Strange error using CallInst constructor
...ed. On Thu, Nov 19, 2009 at 10:22 AM, Marc Claesen <claesenm at gmail.com> wrote: > Thanks for the reply, I've switched from using the constructor to using > CallInst::Create() but I get another problem which I once again can't solve > ... > > My function is: > void replaceByClone(Function *f, CallInst *I){ >   Function *clone = CloneFunction(f); >   BasicBlock::iterator ii(I); >   CallInst* call = > CallInst::Create(clone,clone->arg_begin(),clone->arg_end()); // this is line > #70 >   ReplaceInstWithInst(I->getParent()->getInstList(),ii,call);...