mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 13:27:52 +00:00
[TableGen] Remove constant string argument from a method that's only called once. We can just hardcode the string inside. There already other things that make the method not reusable. NFC
llvm-svn: 260840
This commit is contained in:
parent
83293a2122
commit
57d60e7e70
@ -64,7 +64,7 @@ class SubtargetEmitter {
|
||||
CodeGenSchedModels &SchedModels;
|
||||
std::string Target;
|
||||
|
||||
void Enumeration(raw_ostream &OS, const char *ClassName);
|
||||
void Enumeration(raw_ostream &OS);
|
||||
unsigned FeatureKeyValues(raw_ostream &OS);
|
||||
unsigned CPUKeyValues(raw_ostream &OS);
|
||||
void FormItineraryStageString(const std::string &Names,
|
||||
@ -112,10 +112,10 @@ public:
|
||||
//
|
||||
// Enumeration - Emit the specified class as an enumeration.
|
||||
//
|
||||
void SubtargetEmitter::Enumeration(raw_ostream &OS,
|
||||
const char *ClassName) {
|
||||
void SubtargetEmitter::Enumeration(raw_ostream &OS) {
|
||||
// Get all records of class and sort
|
||||
std::vector<Record*> DefList = Records.getAllDerivedDefinitions(ClassName);
|
||||
std::vector<Record*> DefList =
|
||||
Records.getAllDerivedDefinitions("SubtargetFeature");
|
||||
std::sort(DefList.begin(), DefList.end(), LessRecord());
|
||||
|
||||
unsigned N = DefList.size();
|
||||
@ -1379,7 +1379,7 @@ void SubtargetEmitter::run(raw_ostream &OS) {
|
||||
OS << "#undef GET_SUBTARGETINFO_ENUM\n";
|
||||
|
||||
OS << "namespace llvm {\n";
|
||||
Enumeration(OS, "SubtargetFeature");
|
||||
Enumeration(OS);
|
||||
OS << "} // end llvm namespace\n";
|
||||
OS << "#endif // GET_SUBTARGETINFO_ENUM\n\n";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user