this if can now be an assert.
authorChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 21:25:43 +0000 (21:25 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 Sep 2010 21:25:43 +0000 (21:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113173 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/AsmMatcherEmitter.cpp

index ef71cf3938d08948a098bc4a83bf2c366d336b98..b9953711cf71f4c2d750ebec0307c39a22c4b449 100644 (file)
@@ -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) {