diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp index a7448785710..f6ff4bc6982 100644 --- a/utils/TableGen/SubtargetEmitter.cpp +++ b/utils/TableGen/SubtargetEmitter.cpp @@ -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 DefList = Records.getAllDerivedDefinitions(ClassName); + std::vector 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";