Skip to content

Commit bc3dfe7

Browse files
authored
[LLVM][TableGen] Change PrintEnums to use const RecordKeeper (#109200)
Change PrintEnums to use const RecordKeeper. This is a part of effort to have better const correctness in TableGen backends: https://discourse.llvm.org/t/psa-planned-changes-to-tablegen-getallderiveddefinitions-api-potential-downstream-breakages/81089
1 parent 0518b79 commit bc3dfe7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/utils/TableGen/TableGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ static void PrintRecords(const RecordKeeper &Records, raw_ostream &OS) {
4343
OS << Records; // No argument, dump all contents
4444
}
4545

46-
static void PrintEnums(RecordKeeper &Records, raw_ostream &OS) {
47-
for (Record *Rec : Records.getAllDerivedDefinitions(Class))
46+
static void PrintEnums(const RecordKeeper &Records, raw_ostream &OS) {
47+
for (const Record *Rec : Records.getAllDerivedDefinitions(Class))
4848
OS << Rec->getName() << ", ";
4949
OS << "\n";
5050
}

0 commit comments

Comments
 (0)