llvm.org GIT mirror llvm / 487820c
[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 Craig Topper 4 years ago
1 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
6363 CodeGenSchedModels &SchedModels;
6464 std::string Target;
6565
66 void Enumeration(raw_ostream &OS, const char *ClassName);
66 void Enumeration(raw_ostream &OS);
6767 unsigned FeatureKeyValues(raw_ostream &OS);
6868 unsigned CPUKeyValues(raw_ostream &OS);
6969 void FormItineraryStageString(const std::string &Names,
111111 //
112112 // Enumeration - Emit the specified class as an enumeration.
113113 //
114 void SubtargetEmitter::Enumeration(raw_ostream &OS,
115 const char *ClassName) {
114 void SubtargetEmitter::Enumeration(raw_ostream &OS) {
116115 // Get all records of class and sort
117 std::vector DefList = Records.getAllDerivedDefinitions(ClassName);
116 std::vector DefList =
117 Records.getAllDerivedDefinitions("SubtargetFeature");
118118 std::sort(DefList.begin(), DefList.end(), LessRecord());
119119
120120 unsigned N = DefList.size();
13781378 OS << "#undef GET_SUBTARGETINFO_ENUM\n";
13791379
13801380 OS << "namespace llvm {\n";
1381 Enumeration(OS, "SubtargetFeature");
1381 Enumeration(OS);
13821382 OS << "} // end llvm namespace\n";
13831383 OS << "#endif // GET_SUBTARGETINFO_ENUM\n\n";
13841384