diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-17 22:14:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-17 22:14:20 +0000 |
commit | 57e5a702d0e3c49c67208bf07212c878d34e73ca (patch) | |
tree | 7f1193edb1e2722319262e6f62b62fc3d66c161d /tools | |
parent | e533cefbc091ee21199fd8c884bce8586d8a4f2e (diff) | |
download | external_llvm-57e5a702d0e3c49c67208bf07212c878d34e73ca.zip external_llvm-57e5a702d0e3c49c67208bf07212c878d34e73ca.tar.gz external_llvm-57e5a702d0e3c49c67208bf07212c878d34e73ca.tar.bz2 |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bugpoint/CodeGeneratorBug.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/bugpoint/CodeGeneratorBug.cpp b/tools/bugpoint/CodeGeneratorBug.cpp index dec9cae..72ea91a 100644 --- a/tools/bugpoint/CodeGeneratorBug.cpp +++ b/tools/bugpoint/CodeGeneratorBug.cpp @@ -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); |