mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-22 11:45:31 -04:00
Remove getArgumentList() in favor of arg_begin(), args(), etc
Users often call getArgumentList().size(), which is a linear way to get the number of function arguments. arg_size(), on the other hand, is constant time. In general, the fact that arguments are stored in an iplist is an implementation detail, so I've removed it from the Function interface and moved all other users to the argument container APIs (arg_begin(), arg_end(), args(), arg_size()). Reviewed By: chandlerc Differential Revision: https://reviews.llvm.org/D31052 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298010 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1603,7 +1603,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI,
|
||||
// matches up the formal to the actual argument values.
|
||||
CallSite::arg_iterator AI = CS.arg_begin();
|
||||
unsigned ArgNo = 0;
|
||||
for (Function::const_arg_iterator I = CalledFunc->arg_begin(),
|
||||
for (Function::arg_iterator I = CalledFunc->arg_begin(),
|
||||
E = CalledFunc->arg_end(); I != E; ++I, ++AI, ++ArgNo) {
|
||||
Value *ActualArg = *AI;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user