[llvm-commits] CVS: llvm/lib/Transforms/Utils/CloneFunction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 20 12:33:09 PST 2002
Changes in directory llvm/lib/Transforms/Utils:
CloneFunction.cpp updated: 1.12 -> 1.13
---
Log message:
Fix minor bugs
---
Diffs of the changes:
Index: llvm/lib/Transforms/Utils/CloneFunction.cpp
diff -u llvm/lib/Transforms/Utils/CloneFunction.cpp:1.12 llvm/lib/Transforms/Utils/CloneFunction.cpp:1.13
--- llvm/lib/Transforms/Utils/CloneFunction.cpp:1.12 Tue Nov 19 17:12:53 2002
+++ llvm/lib/Transforms/Utils/CloneFunction.cpp Wed Nov 20 12:32:31 2002
@@ -117,9 +117,9 @@
// Loop over the arguments, copying the names of the mapped arguments over...
Function::aiterator DestI = NewF->abegin();
for (Function::const_aiterator I = F->abegin(), E = F->aend(); I != E; ++I)
- if (ValueMap.count(I)) { // Is this argument preserved?
+ if (ValueMap.count(I) == 0) { // Is this argument preserved?
DestI->setName(I->getName()); // Copy the name over...
- ValueMap[I] = DestI; // Add mapping to ValueMap
+ ValueMap[I] = DestI++; // Add mapping to ValueMap
}
std::vector<ReturnInst*> Returns; // Ignore returns cloned...
More information about the llvm-commits
mailing list