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

Chris Lattner sabre at nondot.org
Sat Aug 8 12:15:25 PDT 2009


Author: lattner
Date: Sat Aug  8 14:15:25 2009
New Revision: 78486

URL: http://llvm.org/viewvc/llvm-project?rev=78486&view=rev
Log:
remove a useless anon-ns, make table const.

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=78486&r1=78485&r2=78486&view=diff

==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Sat Aug  8 14:15:25 2009
@@ -561,9 +561,6 @@
   // Start the enum, which we will generate inline.
 
   OS << "// Unified function for converting operants to MCInst instances.\n\n";
-
-  OS << "namespace {\n\n";
-  
   OS << "enum ConversionKind {\n";
   
   for (std::vector<InstructionInfo*>::const_iterator it = Infos.begin(),
@@ -659,8 +656,6 @@
   OS << "  NumConversionVariants\n";
   OS << "};\n\n";
   
-  OS << "}\n\n";
-
   OS << CvtOS.str();
 }
 
@@ -818,7 +813,7 @@
   // order the match kinds appropriately (putting mnemonics last), then we
   // should only end up using a few bits for each class, especially the ones
   // following the mnemonic.
-  OS << "  static struct MatchEntry {\n";
+  OS << "  static const struct MatchEntry {\n";
   OS << "    unsigned Opcode;\n";
   OS << "    ConversionKind ConvertFn;\n";
   OS << "    MatchClassKind Classes[" << MaxNumOperands << "];\n";





More information about the llvm-commits mailing list