mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-31 22:25:56 +00:00
llvm-tblgen: Anonymize some functions.
This commit is contained in:
parent
3d0a5bf7de
commit
c45e90cf15
@ -37,9 +37,6 @@ private:
|
||||
StringRef Name;
|
||||
raw_ostream &OS;
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
namespace llvm {
|
||||
|
||||
// Generate enum class
|
||||
void GenerateEnumClass(const std::vector<Record *> &Records, raw_ostream &OS,
|
||||
@ -163,6 +160,8 @@ bool HasDuplicateClausesInDirectives(const std::vector<Record *> &Directives) {
|
||||
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 {
|
||||
@ -174,6 +173,8 @@ 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) {
|
||||
@ -245,6 +246,10 @@ 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,
|
||||
@ -869,6 +874,10 @@ void EmitDirectivesBasicImpl(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) {
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
namespace llvm {
|
||||
namespace {
|
||||
|
||||
void writeTitle(StringRef Str, raw_ostream &OS, char Kind = '-') {
|
||||
OS << std::string(Str.size(), Kind) << "\n" << Str << "\n"
|
||||
@ -55,6 +55,10 @@ std::string escapeForRST(StringRef Str) {
|
||||
return Result;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
namespace llvm {
|
||||
|
||||
void EmitInstrDocs(RecordKeeper &RK, raw_ostream &OS) {
|
||||
CodeGenDAGPatterns CDP(RK);
|
||||
CodeGenTarget &Target = CDP.getTargetInfo();
|
||||
|
Loading…
x
Reference in New Issue
Block a user