StringRef Name;
raw_ostream &OS;
};
-} // end anonymous namespace
-
-namespace llvm {
// Generate enum class
void GenerateEnumClass(const std::vector<Record *> &Records, raw_ostream &OS,
return HasDuplicate;
}
+} // namespace
+
// Check consitency of records. Return true if an error has been detected.
// Return false if the records are valid.
bool DirectiveLanguage::HasValidityErrors() const {
return HasDuplicateClausesInDirectives(getDirectives());
}
+namespace llvm {
+
// Generate the declaration section for the enumeration in the directive
// language
void EmitDirectivesDecl(RecordKeeper &Records, raw_ostream &OS) {
OS << "#endif // LLVM_" << DirLang.getName() << "_INC\n";
}
+} // namespace llvm
+
+namespace {
+
// Generate function implementation for get<Enum>Name(StringRef Str)
void GenerateGetName(const std::vector<Record *> &Records, raw_ostream &OS,
StringRef Enum, const DirectiveLanguage &DirLang,
GenerateIsAllowedClause(DirLang, OS);
}
+} // namespace
+
+namespace llvm {
+
// Generate the implemenation section for the enumeration in the directive
// language.
void EmitDirectivesImpl(RecordKeeper &Records, raw_ostream &OS) {
using namespace llvm;
-namespace llvm {
+namespace {
void writeTitle(StringRef Str, raw_ostream &OS, char Kind = '-') {
OS << std::string(Str.size(), Kind) << "\n" << Str << "\n"
return Result;
}
+} // namespace
+
+namespace llvm {
+
void EmitInstrDocs(RecordKeeper &RK, raw_ostream &OS) {
CodeGenDAGPatterns CDP(RK);
CodeGenTarget &Target = CDP.getTargetInfo();