diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-09-06 21:25:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-09-06 21:25:43 +0000 |
| commit | c4521d1b5f7ca9b96e4ecdbe92cce85d3982b7f1 (patch) | |
| tree | 90b1f5440484f538a72fdd3f7212b9268afecdc2 | |
| parent | 9026ac0edd5a9bcf2a0412534d36a4306164d7d2 (diff) | |
| download | llvm-c4521d1b5f7ca9b96e4ecdbe92cce85d3982b7f1.zip llvm-c4521d1b5f7ca9b96e4ecdbe92cce85d3982b7f1.tar.gz llvm-c4521d1b5f7ca9b96e4ecdbe92cce85d3982b7f1.tar.bz2 | |
this if can now be an assert.
llvm-svn: 113173
| -rw-r--r-- | llvm/utils/TableGen/AsmMatcherEmitter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp index ef71cf3..b995371 100644 --- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp +++ b/llvm/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) { |
