[llvm-dev] arg_iterator missing inc/dec operators
Reid Kleckner via llvm-dev
llvm-dev at lists.llvm.org
Wed Mar 22 13:20:21 PDT 2017
On Wed, Mar 22, 2017 at 1:12 PM, Dmitry Babokin <babokin at gmail.com> wrote:
> Correct, I mean exactly this. Though &* is not important in this case.
>
> This code doesn't work anymore, as arg_iterator is defined differently
> now: https://github.com/llvm-mirror/llvm/blob/master/
> include/llvm/IR/Function.h#L57
>
> I get an error when I'm using pre-decrement operator:
> error: expression is not assignable
> --f->arg_end();
>
Today's arg_iterator is now just an Argument*, which is the world's
simplest iterator. The '--f->arg_end()' snippet only compiled before this
change because we used to use fancy ilist iterators which had overloaded
decrement operators.
I don't think we should make a wrapper pointer iterator type just to make
old code like this compile.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170322/1654e3e6/attachment.html>
More information about the llvm-dev
mailing list