remove a useless anon-ns, make table const.
authorChris Lattner <sabre@nondot.org>
Sat, 8 Aug 2009 19:15:25 +0000 (19:15 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 8 Aug 2009 19:15:25 +0000 (19:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78486 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/AsmMatcherEmitter.cpp

index 97e39e1099220db3fde19dcd4ef41fd4964ec607..2eb5a4b27ba28c8678a91cce46f7512bcebef21c 100644 (file)
@@ -561,9 +561,6 @@ static void ConstructConversionFunctions(CodeGenTarget &Target,
   // 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 @@ static void ConstructConversionFunctions(CodeGenTarget &Target,
   OS << "  NumConversionVariants\n";
   OS << "};\n\n";
   
-  OS << "}\n\n";
-
   OS << CvtOS.str();
 }
 
@@ -818,7 +813,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
   // 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";