mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 18:24:34 +00:00
Fix minor bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4778 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -117,9 +117,9 @@ Function *CloneFunction(const Function *F,
|
|||||||
// Loop over the arguments, copying the names of the mapped arguments over...
|
// Loop over the arguments, copying the names of the mapped arguments over...
|
||||||
Function::aiterator DestI = NewF->abegin();
|
Function::aiterator DestI = NewF->abegin();
|
||||||
for (Function::const_aiterator I = F->abegin(), E = F->aend(); I != E; ++I)
|
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...
|
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...
|
std::vector<ReturnInst*> Returns; // Ignore returns cloned...
|
||||||
|
Reference in New Issue
Block a user