mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
This mega patch converts us from using Function::a{iterator|begin|end} to
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -60,13 +60,13 @@ bool llvm::InlineFunction(CallSite CS) {
|
||||
{ // Scope to destroy ValueMap after cloning.
|
||||
// Calculate the vector of arguments to pass into the function cloner...
|
||||
std::map<const Value*, Value*> ValueMap;
|
||||
assert(std::distance(CalledFunc->abegin(), CalledFunc->aend()) ==
|
||||
assert(std::distance(CalledFunc->arg_begin(), CalledFunc->arg_end()) ==
|
||||
std::distance(CS.arg_begin(), CS.arg_end()) &&
|
||||
"No varargs calls can be inlined!");
|
||||
|
||||
CallSite::arg_iterator AI = CS.arg_begin();
|
||||
for (Function::const_aiterator I = CalledFunc->abegin(),
|
||||
E = CalledFunc->aend(); I != E; ++I, ++AI)
|
||||
for (Function::const_arg_iterator I = CalledFunc->arg_begin(),
|
||||
E = CalledFunc->arg_end(); I != E; ++I, ++AI)
|
||||
ValueMap[I] = *AI;
|
||||
|
||||
// Clone the entire body of the callee into the caller.
|
||||
|
Reference in New Issue
Block a user