TableGen: AsmMatcher diagnostics preference detail.

Don't override a custom diagnostic w/ a generic InvalidOperand, all else
being equal.

llvm-svn: 159238
This commit is contained in:
Jim Grosbach 2012-06-26 22:58:01 +00:00
parent e02a1f8cf2
commit 8ccdbd19c8
1 changed files with 3 additions and 1 deletions

View File

@ -2663,7 +2663,9 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
OS << " if (!HadMatchOtherThanPredicate &&\n";
OS << " (it == MnemonicRange.first || ErrorInfo <= i+1)) {\n";
OS << " ErrorInfo = i+1;\n";
OS << " RetCode = Diag;\n";
OS << " // InvalidOperand is the default. Prefer specificity.\n";
OS << " if (Diag != Match_InvalidOperand)\n";
OS << " RetCode = Diag;\n";
OS << " }\n";
OS << " // Otherwise, just reject this instance of the mnemonic.\n";
OS << " OperandsValid = false;\n";