[LLVMdev] use of CallInst()
Ryan M. Lefever
lefever at crhc.uiuc.edu
Tue Mar 6 21:30:04 PST 2007
Thanks for the help Reid! I frequently look at the online doxygen, but
sometimes its difficult to determine the correct replacement when a
method is removed from LLVM. In this particular case, I knew which new
CallInst constructor to use, I just couldn't figure out the proper syntax.
At any rate, I really appreciate your help!!
Reid Spencer wrote:
> On Tue, 2007-03-06 at 22:44 -0600, Ryan M. Lefever wrote:
>> To create a new CallInst I used to call the following constructor:
>>
>> CallInst(Value *F, const std::vector<Value*> &Par, const std::string
>> &Name = "", Instruction *InsertBefore = 0);
>>
>> However, it seems as though that constructor has been removed. I assume
>> that I'm suppossed to use the following constructor, but I can't figure
>> out what to pass as the Args parameter (the second parameter).
>>
>> CallInst (Value *F, Value *const *Args, unsigned NumArgs, const
>> std::string &Name="", Instruction *InsertBefore=0)
>>
>> Can someone help?
>
> Ryan, I suggest you familiarize yourself with
> http://llvm.org/doxygen/classes.html and look there for help on the new
> API. It is regenerated every night so it should be perpetually up to
> date with CVS HEAD.
>
> Args needs to be an array of the arguments and NumArgs needs to be the
> size of the array. If you have a std::vector then you can just:
>
> new CallInst(F, &ArgVec[0], ArgVec.size(), ...)
>
> Reid.
>
>> Thanks,
>> Ryan
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
--
Ryan M. Lefever [http://www.ews.uiuc.edu/~lefever]
More information about the llvm-dev
mailing list