[llvm-commits] CVS: llvm/tools/bugpoint/CodeGeneratorBug.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Aug 17 17:15:01 PDT 2003


Changes in directory llvm/tools/bugpoint:

CodeGeneratorBug.cpp updated: 1.15 -> 1.16

---
Log message:

Make sure that "newmain" gets names for its arguments


---
Diffs of the changes:

Index: llvm/tools/bugpoint/CodeGeneratorBug.cpp
diff -u llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.15 llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.16
--- llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.15	Sun Aug 17 17:08:25 2003
+++ llvm/tools/bugpoint/CodeGeneratorBug.cpp	Sun Aug 17 17:14:20 2003
@@ -357,8 +357,11 @@
     // 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);
     





More information about the llvm-commits mailing list