diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-06-26 22:58:01 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-06-26 22:58:01 +0000 |
commit | ef970c10918dde1e84b8e14a28dc7cf0a93c7c95 (patch) | |
tree | 9030dbe1b196dfd09c06d08e7b17b228bc241988 /utils/TableGen | |
parent | 494f8c6cfaa7443bc708f6006c70f37ca30ac765 (diff) | |
download | external_llvm-ef970c10918dde1e84b8e14a28dc7cf0a93c7c95.zip external_llvm-ef970c10918dde1e84b8e14a28dc7cf0a93c7c95.tar.gz external_llvm-ef970c10918dde1e84b8e14a28dc7cf0a93c7c95.tar.bz2 |
TableGen: AsmMatcher diagnostics preference detail.
Don't override a custom diagnostic w/ a generic InvalidOperand, all else
being equal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index fb8d704..f5e094e 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -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"; |