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

Duncan P. N. Exon Smith via llvm-dev llvm-dev at lists.llvm.org
Mon Mar 14 17:05:20 PDT 2016


> On 2016-Mar-14, at 16:41, David Blaikie <dblaikie at gmail.com> wrote:
> 
> Duncan - I assume this is your ilist work?

Yes.  Looks like the rest has been answered by others!

> 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
> 



More information about the llvm-dev mailing list