Jared Carlson
2014-Dec-13 20:11 UTC
[LLVMdev] Correct way to access Function ArgumentList?
Hey All, I’m working with Mac OS X 10.10, and everything seems generally fine but when I started working on a FunctionPass I get the following: error: call to deleted constructor of 'Function::ArgumentListType' (aka 'iplist<llvm::Argument>') Function::ArgumentListType argList = f.getArgumentList(); Any pointers as to the correct way access the Arguments of a Function object? From what I saw on the docs it seems like this ought to work... Thanks, Jared -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141213/18be4540/attachment.html>
Justin Bogner
2014-Dec-13 20:21 UTC
[LLVMdev] Correct way to access Function ArgumentList?
Jared Carlson <jared.carlson23 at gmail.com> writes:> I’m working with Mac OS X 10.10, and everything seems generally fine but when > I started working on a FunctionPass I get the following: > > error: call to deleted constructor of > 'Function::ArgumentListType' (aka 'iplist<llvm::Argument>') > Function::ArgumentListType argList = f.getArgumentList(); > > Any pointers as to the correct way access the Arguments of a Function object? > From what I saw on the docs it seems like this ought to work...The above tries to make a copy of the argument list, but the type doesn't allow it. You probably want a reference instead: Function::ArgumentListType &argList = f.getArgumentList();
Jared Carlson
2014-Dec-14 02:24 UTC
[LLVMdev] Correct way to access Function ArgumentList?
Thanks! Worked perfectly> On Dec 13, 2014, at 3:21 PM, Justin Bogner <mail at justinbogner.com> wrote: > > Jared Carlson <jared.carlson23 at gmail.com> writes: >> I’m working with Mac OS X 10.10, and everything seems generally fine but when >> I started working on a FunctionPass I get the following: >> >> error: call to deleted constructor of >> 'Function::ArgumentListType' (aka 'iplist<llvm::Argument>') >> Function::ArgumentListType argList = f.getArgumentList(); >> >> Any pointers as to the correct way access the Arguments of a Function object? >> From what I saw on the docs it seems like this ought to work... > > The above tries to make a copy of the argument list, but the type > doesn't allow it. You probably want a reference instead: > > Function::ArgumentListType &argList = f.getArgumentList();
Apparently Analagous Threads
- Insert CallInst within a function passing same parameters of the calling function.
- Question about an error we're now starting to get on LLVM 3.8.0rc2since
- [LLVMdev] Accessing a function's arguments
- Problem about API difference between LLVM3.5 and LLVM3.9
- [LLVMdev] How to create arguments CallInst