I came across llvm/docs/HistoricalNotes/2002-06-25-MegaPatchInfo.txt, which has this: """ * The Function class now has helper functions for accessing the Arguments list. Instead of having to go through getArgumentList for simple things like iterator over the arguments, now the a*() methods can be used to access them. """
So, it seems like there was a desire to move away from using getArgumentList() all the way back in 2002. I removed getArgumentList() in a follow-up change anyway, so it's not a public member anymore. On Mon, Mar 20, 2017 at 8:54 AM, David Blaikie <dblai...@gmail.com> wrote: > > > On Thu, Mar 16, 2017 at 12:07 PM Reid Kleckner via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> Author: rnk >> Date: Thu Mar 16 13:55:46 2017 >> New Revision: 297975 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=297975&view=rev >> Log: >> Use arg_begin() instead of getArgumentList().begin(), the argument list >> is an implementation detail >> > > Seems like a somewhat strange justification, given that getArgumentList > looks like a public member and probably used pervasively before LLVM moved > towards more iterator-centric interfaces, etc. > > What do you mean by 'an implementation detail' in this context/what > motivated this change? (curious what I'm missing) > > - Dave > > >> >> Modified: >> cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp >> >> Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp >> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ >> CGOpenMPRuntime.cpp?rev=297975&r1=297974&r2=297975&view=diff >> ============================================================ >> ================== >> --- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp (original) >> +++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Thu Mar 16 13:55:46 2017 >> @@ -3780,9 +3780,7 @@ CGOpenMPRuntime::emitTaskInit(CodeGenFun >> // Emit initial values for private copies (if any). >> llvm::Value *TaskPrivatesMap = nullptr; >> auto *TaskPrivatesMapTy = >> - std::next(cast<llvm::Function>(TaskFunction)-> >> getArgumentList().begin(), >> - 3) >> - ->getType(); >> + std::next(cast<llvm::Function>(TaskFunction)->arg_begin(), >> 3)->getType(); >> if (!Privates.empty()) { >> auto FI = std::next(KmpTaskTWithPrivatesQTyRD->field_begin()); >> TaskPrivatesMap = emitTaskPrivateMappingFunction( >> >> >> _______________________________________________ >> cfe-commits mailing list >> cfe-commits@lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >> >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits