summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Transforms/Utils/ValueMapper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index 772800c2e61..44efa5d0e8e 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -747,11 +747,11 @@ void llvm::RemapInstruction(Instruction *I, ValueToValueMapTy &VM,
void Mapper::remapInstruction(Instruction *I) {
// Remap operands.
- for (User::op_iterator op = I->op_begin(), E = I->op_end(); op != E; ++op) {
- Value *V = mapValue(*op);
+ for (Use &Op : I->operands()) {
+ Value *V = mapValue(Op);
// If we aren't ignoring missing entries, assert that something happened.
if (V)
- *op = V;
+ Op = V;
else
assert((Flags & RF_IgnoreMissingLocals) &&
"Referenced value not in value map!");
OpenPOWER on IntegriCloud