summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 1d59cd1a745..2690eed45cd 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -10168,6 +10168,7 @@ ARMAsmParser::FilterNearMisses(SmallVectorImpl<NearMissInfo> &NearMissesIn,
// to only report the widest one.
std::multimap<unsigned, unsigned> OperandMissesSeen;
SmallSet<uint64_t, 4> FeatureMissesSeen;
+ bool ReportedTooFewOperands = false;
// Process the near-misses in reverse order, so that we see more general ones
// first, and so can avoid emitting more specific ones.
@@ -10288,9 +10289,12 @@ ARMAsmParser::FilterNearMisses(SmallVectorImpl<NearMissInfo> &NearMissesIn,
break;
}
case NearMissInfo::NearMissTooFewOperands: {
- SMLoc EndLoc = ((ARMOperand &)*Operands.back()).getEndLoc();
- NearMissesOut.emplace_back(
- NearMissMessage{ EndLoc, StringRef("too few operands for instruction") });
+ if (!ReportedTooFewOperands) {
+ SMLoc EndLoc = ((ARMOperand &)*Operands.back()).getEndLoc();
+ NearMissesOut.emplace_back(NearMissMessage{
+ EndLoc, StringRef("too few operands for instruction")});
+ ReportedTooFewOperands = true;
+ }
break;
}
case NearMissInfo::NoNearMiss:
OpenPOWER on IntegriCloud