[llvm] r369865 - [TableGen] Correct comments for end of namespace. NFC
Bjorn Pettersson via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 25 03:47:30 PDT 2019
Author: bjope
Date: Sun Aug 25 03:47:30 2019
New Revision: 369865
URL: http://llvm.org/viewvc/llvm-project?rev=369865&view=rev
Log:
[TableGen] Correct comments for end of namespace. NFC
Summary:
Update end-of-namespace comments generated by
tablegen emitters to fulfill the rules setup by
clang-tidy's llvm-namespace-comment checker.
Fixed a few end-of-namespace comments in the
tablegen source code as well.
Reviewers: craig.topper
Reviewed By: craig.topper
Subscribers: craig.topper, stoklund, dschuff, sbc100, jgravelle-google, aheejin, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D66396
Modified:
llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp
llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp
llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp
llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
llvm/trunk/utils/TableGen/InstrDocsEmitter.cpp
llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
llvm/trunk/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp
Modified: llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmMatcherEmitter.cpp Sun Aug 25 03:47:30 2019
@@ -2381,7 +2381,7 @@ static void emitMatchClassEnumeration(Co
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 @@ static void emitCustomOperandParsing(raw
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 @@ void AsmMatcherEmitter::run(raw_ostream
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) {
Modified: llvm/trunk/utils/TableGen/CodeGenMapTable.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenMapTable.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenMapTable.cpp (original)
+++ llvm/trunk/utils/TableGen/CodeGenMapTable.cpp Sun Aug 25 03:47:30 2019
@@ -168,7 +168,7 @@ public:
return ValueCols;
}
};
-} // End anonymous namespace.
+} // end anonymous namespace
//===----------------------------------------------------------------------===//
@@ -226,7 +226,7 @@ public:
void emitMapFuncBody(raw_ostream &OS, unsigned TableSize);
};
-} // End anonymous namespace.
+} // end anonymous namespace
//===----------------------------------------------------------------------===//
@@ -604,8 +604,8 @@ void EmitMapTable(RecordKeeper &Records,
// 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";
}
Modified: llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp (original)
+++ llvm/trunk/utils/TableGen/DAGISelMatcherGen.cpp Sun Aug 25 03:47:30 2019
@@ -141,7 +141,7 @@ namespace {
SmallVectorImpl<unsigned> &ResultOps);
};
-} // end anon namespace.
+} // end anonymous namespace
MatcherGen::MatcherGen(const PatternToMatch &pattern,
const CodeGenDAGPatterns &cgp)
Modified: llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DFAPacketizerEmitter.cpp Sun Aug 25 03:47:30 2019
@@ -628,7 +628,7 @@ void DFA::writeTableAndAPI(raw_ostream &
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 @@ void DFA::writeTableAndAPI(raw_ostream &
<< "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";
}
//
Modified: llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp Sun Aug 25 03:47:30 2019
@@ -153,4 +153,4 @@ void EmitDisassembler(RecordKeeper &Reco
"MCDisassembler::Success", "MCDisassembler::Fail", "");
}
-} // End llvm namespace
+} // end namespace llvm
Modified: llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/FixedLenDecoderEmitter.cpp Sun Aug 25 03:47:30 2019
@@ -2465,7 +2465,7 @@ void FixedLenDecoderEmitter::run(raw_ost
// 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 {
Modified: llvm/trunk/utils/TableGen/InstrDocsEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrDocsEmitter.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/InstrDocsEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/InstrDocsEmitter.cpp Sun Aug 25 03:47:30 2019
@@ -231,4 +231,4 @@ void EmitInstrDocs(RecordKeeper &RK, raw
}
}
-} // end llvm namespace
+} // end namespace llvm
Modified: llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/InstrInfoEmitter.cpp Sun Aug 25 03:47:30 2019
@@ -436,8 +436,8 @@ void InstrInfoEmitter::emitMCIIHelperMet
<< "(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 @@ void InstrInfoEmitter::emitMCIIHelperMet
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 @@ void InstrInfoEmitter::run(raw_ostream &
<< 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 @@ void InstrInfoEmitter::run(raw_ostream &
<< " ~" << 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 @@ void InstrInfoEmitter::run(raw_ostream &
<< " 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 @@ void InstrInfoEmitter::emitEnums(raw_ost
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 @@ void InstrInfoEmitter::emitEnums(raw_ost
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 @@ void EmitInstrInfo(RecordKeeper &RK, raw
EmitMapTable(RK, OS);
}
-} // end llvm namespace
+} // end namespace llvm
Modified: llvm/trunk/utils/TableGen/SubtargetEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/SubtargetEmitter.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/SubtargetEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/SubtargetEmitter.cpp Sun Aug 25 03:47:30 2019
@@ -1728,7 +1728,7 @@ void SubtargetEmitter::emitGenMCSubtarge
<< " 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 @@ void SubtargetEmitter::run(raw_ostream &
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"
Modified: llvm/trunk/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp?rev=369865&r1=369864&r2=369865&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp Sun Aug 25 03:47:30 2019
@@ -167,7 +167,7 @@ void emitWebAssemblyDisassemblerTables(
OS << " },\n";
}
OS << " { 0, nullptr }\n};\n\n";
- OS << "} // End llvm namespace\n";
+ OS << "} // end namespace llvm\n";
}
} // namespace llvm
More information about the llvm-commits
mailing list