mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-06 17:24:34 +00:00
Use arg_iterator and arg_begin and arg_end functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20608 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -624,8 +624,9 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
|||||||
oldMain->getName(), Test);
|
oldMain->getName(), Test);
|
||||||
// Set up and remember the argument list for the main function.
|
// Set up and remember the argument list for the main function.
|
||||||
std::vector<Value*> args;
|
std::vector<Value*> args;
|
||||||
for (Function::aiterator I = newMain->abegin(), E = newMain->aend(),
|
for (Function::arg_iterator
|
||||||
OI = oldMain->abegin(); I != E; ++I, ++OI) {
|
I = newMain->arg_begin(), E = newMain->arg_end(),
|
||||||
|
OI = oldMain->arg_begin(); I != E; ++I, ++OI) {
|
||||||
I->setName(OI->getName()); // Copy argument names from oldMain
|
I->setName(OI->getName()); // Copy argument names from oldMain
|
||||||
args.push_back(I);
|
args.push_back(I);
|
||||||
}
|
}
|
||||||
@ -700,8 +701,8 @@ static void CleanupAndPrepareModules(BugDriver &BD, Module *&Test,
|
|||||||
|
|
||||||
// Save the argument list
|
// Save the argument list
|
||||||
std::vector<Value*> Args;
|
std::vector<Value*> Args;
|
||||||
for (Function::aiterator i = FuncWrapper->abegin(),
|
for (Function::arg_iterator i = FuncWrapper->arg_begin(),
|
||||||
e = FuncWrapper->aend(); i != e; ++i)
|
e = FuncWrapper->arg_end(); i != e; ++i)
|
||||||
Args.push_back(i);
|
Args.push_back(i);
|
||||||
|
|
||||||
// Pass on the arguments to the real function, return its result
|
// Pass on the arguments to the real function, return its result
|
||||||
|
Reference in New Issue
Block a user