summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-06 21:25:43 +0000
committerChris Lattner <sabre@nondot.org>2010-09-06 21:25:43 +0000
commit44b0daad44791ff249a0bc533a5e58e978c2ca31 (patch)
tree0d222f9e1bef4a0f06234db7e5c384d8ba1489e5 /utils
parent80db4e51d2a44bc623b5892bed2351406890b9aa (diff)
downloadllvm-44b0daad44791ff249a0bc533a5e58e978c2ca31.tar.gz
llvm-44b0daad44791ff249a0bc533a5e58e978c2ca31.tar.bz2
llvm-44b0daad44791ff249a0bc533a5e58e978c2ca31.tar.xz
this if can now be an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113173 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/AsmMatcherEmitter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp
index ef71cf3938..b9953711cf 100644
--- a/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/utils/TableGen/AsmMatcherEmitter.cpp
@@ -1723,8 +1723,8 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
<< "*ie = MnemonicRange.second;\n";
OS << " it != ie; ++it) {\n";
- OS << " // Instruction mneumonic must match.\n";
- OS << " if (Mnemonic != it->Mnemonic) continue;\n";
+ OS << " // equal_range guarantees that instruction mneumonic matches.\n";
+ OS << " assert(Mnemonic == it->Mnemonic);\n";
// Emit check that the subclasses match.
for (unsigned i = 0; i != MaxNumOperands; ++i) {