diff options
Diffstat (limited to 'lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r-- | lib/Transforms/Utils/ValueMapper.cpp | 4 |
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); } |