1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-03-25 00:35:30 +00:00

Make sure that "newmain" gets names for its arguments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7927 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-08-17 22:14:20 +00:00
parent e533cefbc0
commit 57e5a702d0

@ -357,8 +357,11 @@ bool BugDriver::debugCodeGenerator() {
// Call the old main function and return its result
BasicBlock *BB = new BasicBlock("entry", newMain);
std::vector<Value*> args;
for (Function::aiterator I=newMain->abegin(), E=newMain->aend(); I!=E; ++I)
for (Function::aiterator I = newMain->abegin(), E = newMain->aend(),
OI = oldMain->abegin(); I != E; ++I, ++OI) {
I->setName(OI->getName()); // Copy argument names from oldMain
args.push_back(I);
}
CallInst *call = new CallInst(oldMain, args);
BB->getInstList().push_back(call);