summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
index a49334f842e..320211e4169 100644
--- a/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
+++ b/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
@@ -1115,9 +1115,8 @@ bool X86AsmParser::VerifyAndAdjustOperands(OperandVector &OrigOperands,
// Produce warnings only if all the operands passed the adjustment - prevent
// legal cases like "movsd (%rax), %xmm0" mistakenly produce warnings
- for (auto WarningMsg = Warnings.begin(); WarningMsg < Warnings.end();
- ++WarningMsg) {
- Warning((*WarningMsg).first, (*WarningMsg).second);
+ for (auto &WarningMsg : Warnings) {
+ Warning(WarningMsg.first, WarningMsg.second);
}
// Remove old operands
OpenPOWER on IntegriCloud