mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-22 04:05:05 +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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260840 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6f603acaaa
commit
487820cc86
@ -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