summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorOliver Stannard <oliver.stannard@arm.com>2017-11-21 15:16:50 +0000
committerOliver Stannard <oliver.stannard@arm.com>2017-11-21 15:16:50 +0000
commit1e73e95f3c82fcfdd9cd817d0b5989b697e4b05d (patch)
tree15054eb396a9bc704d84a233c4a066e3c2879abc /llvm/utils
parent6e94331259069aab6c2d15b4f31fca5bd0b0a1cc (diff)
downloadbcm5719-llvm-1e73e95f3c82fcfdd9cd817d0b5989b697e4b05d.tar.gz
bcm5719-llvm-1e73e95f3c82fcfdd9cd817d0b5989b697e4b05d.zip
[Asm] Improve "too few operands" errors
- We can still emit this error if the actual instruction has two or more operands missing compared to the expected one. - We should only emit this error once per instruction. Differential revision: https://reviews.llvm.org/D36746 llvm-svn: 318770
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index 4fe060b05fa..72fb53053fd 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -3313,7 +3313,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
OS << " DEBUG_WITH_TYPE(\"asm-matcher\", dbgs() << \"recording too-few-operands near miss\\n\");\n";
OS << " OperandNearMiss =\n";
OS << " NearMissInfo::getTooFewOperands(Formal, it->Opcode);\n";
- OS << " } else {\n";
+ OS << " } else if (OperandNearMiss.getKind() != NearMissInfo::NearMissTooFewOperands) {\n";
OS << " // If more than one operand is invalid, give up on this match entry.\n";
OS << " DEBUG_WITH_TYPE(\n";
OS << " \"asm-matcher\",\n";
OpenPOWER on IntegriCloud