[llvm-dev] LLVM 3.8 change in function argument lists?

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 14 16:41:15 PDT 2016


Duncan - I assume this is your ilist work?

Dibyendu: Iterators are not necessarily pointers, so you can't always
expect to convert an iterator straight to a pointer to the element type in
general.

On Mon, Mar 14, 2016 at 4:38 PM, Dibyendu Majumdar via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi,
>
> I am upgrading my project from 3.7 to 3.8. I find that following code
> used to compile in 3.7 but doesn't in 3.8 and I can't understand why.
>
> llvm::Function *mainFunc = ...;
> auto argiter = mainFunc->arg_begin();
> llvm::Value *arg1 = argiter++;
> arg1->setName("obj");
>
> But if I change the code to following it compiles:
>
> auto argiter = mainFunc->arg_begin();
> llvm::Value *arg1 = &(*argiter);
> arg1->setName("obj");
>
>
> As far as I can tell the first version should have worked as well. Any
> pointers to why the first version is now failing to compile?
>
> Thanks and Regards
> Dibyendu
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160314/d030794b/attachment.html>


More information about the llvm-dev mailing list