[llvm-dev] LLVM 3.8 change in function argument lists?
Dibyendu Majumdar via llvm-dev
llvm-dev at lists.llvm.org
Mon Mar 14 16:38:17 PDT 2016
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
More information about the llvm-dev
mailing list