diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-20 18:32:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-20 18:32:31 +0000 |
commit | 7c6d9d9eaca381cdeba24640ffcdce297851feb1 (patch) | |
tree | 3224c484bf7e4c0c988080a94539127f4dfb6ecb /llvm/lib | |
parent | b251c3d727f00183c8091030949bee7a05a3b87c (diff) | |
download | bcm5719-llvm-7c6d9d9eaca381cdeba24640ffcdce297851feb1.tar.gz bcm5719-llvm-7c6d9d9eaca381cdeba24640ffcdce297851feb1.zip |
Fix minor bugs
llvm-svn: 4778
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 154a082b3aa..29c7aaa0374 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -117,9 +117,9 @@ Function *CloneFunction(const Function *F, // 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... |