summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2011-02-02 18:20:55 +0000
committerKevin Enderby <enderby@apple.com>2011-02-02 18:20:55 +0000
commit96f6e379e209ea72d7be722f574cd3a86f15e711 (patch)
tree0ae22474cacb58c6f9e1aa4eb9c8b3646ed570dd
parent2bf67986efa6114df72535085df4337e9208ce6b (diff)
downloadbcm5719-llvm-96f6e379e209ea72d7be722f574cd3a86f15e711.tar.gz
bcm5719-llvm-96f6e379e209ea72d7be722f574cd3a86f15e711.zip
Changed the TableGen created MatchInstructionImpl() setting of ErrorInfo.
The algorithm for identifying which operand is invalid will now always point to some operand and not the mnemonic sometimes. The change is now that ErrorInfo is the index of the highest operand that does not match for any of the matching mnemonics records. And no longer the ~0U value when the mnemonic matches and not every record with a matching mnemonic has the same mismatching operand index. llvm-svn: 124734
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index a04428c4c60..76904de7513 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -2098,10 +2098,8 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
OS << " continue;\n";
OS << " // If this operand is broken for all of the instances of this\n";
OS << " // mnemonic, keep track of it so we can report loc info.\n";
- OS << " if (it == MnemonicRange.first || ErrorInfo == i+1)\n";
+ OS << " if (it == MnemonicRange.first || ErrorInfo <= i+1)\n";
OS << " ErrorInfo = i+1;\n";
- OS << " else\n";
- OS << " ErrorInfo = ~0U;";
OS << " // Otherwise, just reject this instance of the mnemonic.\n";
OS << " OperandsValid = false;\n";
OS << " break;\n";
OpenPOWER on IntegriCloud