aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/ValueMapper.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-07 21:27:16 +0000
committerChris Lattner <sabre@nondot.org>2002-12-07 21:27:16 +0000
commitac8d4d9d59e8f84f457c9847b2a279edd23c1023 (patch)
tree313f3ead7404410f241b98326e646913c458958f /lib/Transforms/Utils/ValueMapper.cpp
parent342d1826fbbc2b8cd734e6cbc670744469986ff8 (diff)
Fix bug that was bugging bugpoint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r--lib/Transforms/Utils/ValueMapper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/ValueMapper.cpp b/lib/Transforms/Utils/ValueMapper.cpp
index e6ab297428..517a352338 100644
--- a/lib/Transforms/Utils/ValueMapper.cpp
+++ b/lib/Transforms/Utils/ValueMapper.cpp
@@ -33,7 +33,7 @@ Value *MapValue(const Value *V, std::map<const Value*, Value*> &VM) {
for (unsigned j = 0; j != i; ++j)
Values.push_back(cast<Constant>(Vals[j]));
Values.push_back(cast<Constant>(MV));
- for (; i != e; ++i)
+ for (++i; i != e; ++i)
Values.push_back(cast<Constant>(MapValue(Vals[i], VM)));
return VMSlot = ConstantArray::get(CA->getType(), Values);
}
@@ -53,7 +53,7 @@ Value *MapValue(const Value *V, std::map<const Value*, Value*> &VM) {
for (unsigned j = 0; j != i; ++j)
Values.push_back(cast<Constant>(Vals[j]));
Values.push_back(cast<Constant>(MV));
- for (; i != e; ++i)
+ for (++i; i != e; ++i)
Values.push_back(cast<Constant>(MapValue(Vals[i], VM)));
return VMSlot = ConstantStruct::get(CS->getType(), Values);
}