[clang] [clangl[TableGen] Change Diagnostic Emitter to use const RecordKeeper (PR #108209)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 11 07:55:19 PDT 2024


================
@@ -39,12 +39,13 @@ using namespace llvm;
 
 namespace {
 class DiagGroupParentMap {
-  RecordKeeper &Records;
-  std::map<const Record*, std::vector<Record*> > Mapping;
+  const RecordKeeper &Records;
+  std::map<const Record *, std::vector<const Record *>> Mapping;
+
 public:
-  DiagGroupParentMap(RecordKeeper &records) : Records(records) {
-    std::vector<Record*> DiagGroups
-      = Records.getAllDerivedDefinitions("DiagGroup");
+  DiagGroupParentMap(const RecordKeeper &records) : Records(records) {
+    ArrayRef<const Record *> DiagGroups =
----------------
AaronBallman wrote:

Good catch!

https://github.com/llvm/llvm-project/pull/108209


More information about the cfe-commits mailing list