[llvm-commits] [llvm] r113173 - /llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp

Chris Lattner sabre at nondot.org
Mon Sep 6 14:25:43 PDT 2010


Author: lattner
Date: Mon Sep  6 16:25:43 2010
New Revision: 113173

URL: http://llvm.org/viewvc/llvm-project?rev=113173&view=rev
Log:
this if can now be an assert.

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=113173&r1=113172&r2=113173&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Mon Sep  6 16:25:43 2010
@@ -1723,8 +1723,8 @@
      << "*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) {





More information about the llvm-commits mailing list