search for: claesenm

Displaying 5 results from an estimated 5 matches for "claesenm".

Did you mean: claesen
2009 Nov 11
4
[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error
Hi, I'm trying to add function calls in the LLVM IR using the IRBuilder class. I've read both tutorials about functions but I still get assertion errors. I allocate memory for all function arguments and pass them as explained in the tutorial. My code is (this function is supposed to add a call to f in bb at pos): void addCallSite(Function *f, BasicBlock *bb, BasicBlock::iterator pos)
2009 Nov 18
2
[LLVMdev] Strange error using CallInst constructor
Hi, This is probably more of a standard 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 =
2009 Nov 19
0
[LLVMdev] Strange error using CallInst constructor
...39;t random-access. You probably also want to pull the arguments out of the old CallInst, not out of the parameters of the new function. The old CallInst that you're replacing can't see the arguments of a function you've just created. 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...
2009 Nov 11
0
[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error
...l tell you to do that? In general, when I hit one of those assertions, I gdb to it, use "p f->dump()" to see the types of the function's arguments, and use "p Params[i]->dump()" to see the parameter with the bad type. On Wed, Nov 11, 2009 at 7:22 AM, Marc Claesen <claesenm at gmail.com> wrote: > Hi, > > I'm trying to add function calls in the LLVM IR using the IRBuilder > class. I've read both tutorials about functions but I still get > assertion errors. I allocate memory for all function arguments and pass > them as explained in the tuto...
2009 Nov 11
0
[LLVMdev] Adding function call in LLVM IR using IRBuilder causes assertion error
[Please use Reply to All for sending your message to the ml too] Marc Claesen <claesenm at gmail.com> writes: >> Another issue is that I don't see in your code the _values_ you want to >> pass to the called function. Apparently you already have the function >> declaration (Function *f) but you are creating a call to that function, >> and you need the ac...