[ValueMapper] Range-loopify to improve readability. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266350 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Davide Italiano 2016-04-14 18:07:32 +00:00
parent 26f23b1dfa
commit 1252a8cee3

View File

@ -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!");