[llvm-commits] [llvm] r159238 - /llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Jim Grosbach
grosbach at apple.com
Tue Jun 26 15:58:01 PDT 2012
Author: grosbach
Date: Tue Jun 26 17:58:01 2012
New Revision: 159238
URL: http://llvm.org/viewvc/llvm-project?rev=159238&view=rev
Log:
TableGen: AsmMatcher diagnostics preference detail.
Don't override a custom diagnostic w/ a generic InvalidOperand, all else
being equal.
Modified:
llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=159238&r1=159237&r2=159238&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Tue Jun 26 17:58:01 2012
@@ -2663,7 +2663,9 @@
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";
More information about the llvm-commits
mailing list