[LLVMdev] Correct way to access Function ArgumentList?
Justin Bogner
mail at justinbogner.com
Sat Dec 13 12:21:52 PST 2014
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();
More information about the llvm-dev
mailing list