Index: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
@@ -2381,7 +2381,7 @@
   OS << "  NumMatchClassKinds\n";
   OS << "};\n\n";
 
-  OS << "}\n\n";
+  OS << "} // end anonymous namespace\n\n";
 }
 
 /// emitMatchClassDiagStrings - Emit a function to get the diagnostic text to be
@@ -2866,7 +2866,7 @@
   OS << "    }\n";
   OS << "  };\n";
 
-  OS << "} // end anonymous namespace.\n\n";
+  OS << "} // end anonymous namespace\n\n";
 
   OS << "static const OperandMatchEntry OperandMatchTable["
      << Info.OperandMatchInfo.size() << "] = {\n";
@@ -3422,7 +3422,7 @@
   OS << "    }\n";
   OS << "  };\n";
 
-  OS << "} // end anonymous namespace.\n\n";
+  OS << "} // end anonymous namespace\n\n";
 
   unsigned VariantCount = Target.getAsmParserVariantCount();
   for (unsigned VC = 0; VC != VariantCount; ++VC) {
Index: llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
===================================================================
--- llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
+++ llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
@@ -168,7 +168,7 @@
     return ValueCols;
   }
 };
-} // End anonymous namespace.
+} // end anonymous namespace
 
 
 //===----------------------------------------------------------------------===//
@@ -226,7 +226,7 @@
   void emitMapFuncBody(raw_ostream &OS, unsigned TableSize);
 
 };
-} // End anonymous namespace.
+} // end anonymous namespace
 
 
 //===----------------------------------------------------------------------===//
@@ -604,8 +604,8 @@
     // Emit map tables and the functions to query them.
     IMap.emitTablesWithFunc(OS);
   }
-  OS << "} // End " << NameSpace << " namespace\n";
-  OS << "} // End llvm namespace\n";
+  OS << "} // end namespace " << NameSpace << "\n";
+  OS << "} // end namespace llvm\n";
   OS << "#endif // GET_INSTRMAP_INFO\n\n";
 }
 
Index: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp
===================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp
+++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp
@@ -141,7 +141,7 @@
                                         SmallVectorImpl<unsigned> &ResultOps);
     };
 
-} // end anon namespace.
+} // end anonymous namespace
 
 MatcherGen::MatcherGen(const PatternToMatch &pattern,
                        const CodeGenDAGPatterns &cgp)
Index: llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp
+++ llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp
@@ -628,7 +628,7 @@
   OS << "   // states " << (lastState+1) << ":" << numStates << "\n";
 
   OS << "};\n";
-  OS << "} // namespace\n";
+  OS << "} // end namespace llvm\n";
 
   //
   // Emit DFA Packetizer tables if the target is a VLIW machine.
@@ -640,7 +640,7 @@
      << "createDFAPacketizer(const InstrItineraryData *IID) const {\n"
      << "   return new DFAPacketizer(IID, " << TargetName
      << "DFAStateInputTable, " << TargetName << "DFAStateEntryTable);\n}\n\n";
-  OS << "} // End llvm namespace \n";
+  OS << "} // end namespace llvm\n";
 }
 
 //
Index: llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp
+++ llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp
@@ -153,4 +153,4 @@
                       "MCDisassembler::Success", "MCDisassembler::Fail", "");
 }
 
-} // End llvm namespace
+} // end namespace llvm
Index: llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
+++ llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
@@ -2465,7 +2465,7 @@
   // Emit the main entry point for the decoder, decodeInstruction().
   emitDecodeInstruction(OS);
 
-  OS << "\n} // End llvm namespace\n";
+  OS << "\n} // end namespace llvm\n";
 }
 
 namespace llvm {
Index: llvm/trunk/utils/TableGen/InstrDocsEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/InstrDocsEmitter.cpp
+++ llvm/trunk/utils/TableGen/InstrDocsEmitter.cpp
@@ -231,4 +231,4 @@
   }
 }
 
-} // end llvm namespace
+} // end namespace llvm
Index: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
@@ -436,8 +436,8 @@
         << "(const MCInst &MI);\n";
   }
 
-  OS << "\n} // end " << TargetName << "_MC namespace\n";
-  OS << "} // end llvm namespace\n\n";
+  OS << "\n} // end namespace " << TargetName << "_MC\n";
+  OS << "} // end namespace llvm\n\n";
 
   OS << "#endif // GET_INSTRINFO_MC_HELPER_DECLS\n\n";
 
@@ -459,8 +459,8 @@
     OS << "\n}\n\n";
   }
 
-  OS << "} // end " << TargetName << "_MC namespace\n";
-  OS << "} // end llvm namespace\n\n";
+  OS << "} // end namespace " << TargetName << "_MC\n";
+  OS << "} // end namespace llvm\n\n";
 
   OS << "#endif // GET_GENISTRINFO_MC_HELPERS\n";
 }
@@ -576,7 +576,7 @@
      << TargetName << "InstrNameIndices, " << TargetName << "InstrNameData, "
      << NumberedInstructions.size() << ");\n}\n\n";
 
-  OS << "} // end llvm namespace\n";
+  OS << "} // end namespace llvm\n";
 
   OS << "#endif // GET_INSTRINFO_MC_DESC\n\n";
 
@@ -592,7 +592,7 @@
      << "  ~" << ClassName << "() override = default;\n";
 
 
-  OS << "\n};\n} // end llvm namespace\n";
+  OS << "\n};\n} // end namespace llvm\n";
 
   OS << "#endif // GET_INSTRINFO_HEADER\n\n";
 
@@ -620,7 +620,7 @@
      << "  InitMCInstrInfo(" << TargetName << "Insts, " << TargetName
      << "InstrNameIndices, " << TargetName << "InstrNameData, "
      << NumberedInstructions.size() << ");\n}\n";
-  OS << "} // end llvm namespace\n";
+  OS << "} // end namespace llvm\n";
 
   OS << "#endif // GET_INSTRINFO_CTOR_DTOR\n\n";
 
@@ -765,8 +765,8 @@
     OS << "    " << Inst->TheDef->getName() << "\t= " << Num++ << ",\n";
   OS << "    INSTRUCTION_LIST_END = " << Num << "\n";
   OS << "  };\n\n";
-  OS << "} // end " << Namespace << " namespace\n";
-  OS << "} // end llvm namespace\n";
+  OS << "} // end namespace " << Namespace << "\n";
+  OS << "} // end namespace llvm\n";
   OS << "#endif // GET_INSTRINFO_ENUM\n\n";
 
   OS << "#ifdef GET_INSTRINFO_SCHED_ENUM\n";
@@ -780,9 +780,9 @@
     OS << "    " << Class.Name << "\t= " << Num++ << ",\n";
   OS << "    SCHED_LIST_END = " << Num << "\n";
   OS << "  };\n";
-  OS << "} // end Sched namespace\n";
-  OS << "} // end " << Namespace << " namespace\n";
-  OS << "} // end llvm namespace\n";
+  OS << "} // end namespace Sched\n";
+  OS << "} // end namespace " << Namespace << "\n";
+  OS << "} // end namespace llvm\n";
 
   OS << "#endif // GET_INSTRINFO_SCHED_ENUM\n\n";
 }
@@ -794,4 +794,4 @@
   EmitMapTable(RK, OS);
 }
 
-} // end llvm namespace
+} // end namespace llvm
Index: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
+++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
@@ -1728,7 +1728,7 @@
      << "    const MCInst *MI, unsigned CPUID) {\n";
   emitSchedModelHelpersImpl(OS, /* OnlyExpandMCPredicates */ true);
   OS << "}\n";
-  OS << "} // end of namespace " << Target << "_MC\n\n";
+  OS << "} // end namespace " << Target << "_MC\n\n";
 
   OS << "struct " << Target
      << "GenMCSubtargetInfo : public MCSubtargetInfo {\n";
@@ -1858,7 +1858,7 @@
   OS << "namespace " << Target << "_MC {\n"
      << "unsigned resolveVariantSchedClassImpl(unsigned SchedClass,"
      << " const MCInst *MI, unsigned CPUID);\n"
-     << "}\n\n";
+     << "} // end namespace " << Target << "_MC\n\n";
   OS << "struct " << ClassName << " : public TargetSubtargetInfo {\n"
      << "  explicit " << ClassName << "(const Triple &TT, StringRef CPU, "
      << "StringRef FS);\n"
Index: llvm/trunk/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp
+++ llvm/trunk/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp
@@ -167,7 +167,7 @@
     OS << " },\n";
   }
   OS << "  { 0, nullptr }\n};\n\n";
-  OS << "} // End llvm namespace\n";
+  OS << "} // end namespace llvm\n";
 }
 
 } // namespace llvm