[clang] [clang][TableGen] Change DataCollector to use const RecordKeeper (PR #108203)

Rahul Joshi via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 11 05:13:08 PDT 2024


https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/108203

None

>From 3f98162db22fffbeb5d4c140e83c502aef049f9c Mon Sep 17 00:00:00 2001
From: Rahul Joshi <rjoshi at nvidia.com>
Date: Wed, 11 Sep 2024 05:11:29 -0700
Subject: [PATCH] [clang][TableGen] Change DataCollector to use const
 RecordKeeper

---
 clang/utils/TableGen/ClangDataCollectorsEmitter.cpp | 2 +-
 clang/utils/TableGen/TableGenBackends.h             | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/utils/TableGen/ClangDataCollectorsEmitter.cpp b/clang/utils/TableGen/ClangDataCollectorsEmitter.cpp
index 45082935c1f794..dae6710d752358 100644
--- a/clang/utils/TableGen/ClangDataCollectorsEmitter.cpp
+++ b/clang/utils/TableGen/ClangDataCollectorsEmitter.cpp
@@ -4,7 +4,7 @@
 
 using namespace llvm;
 
-void clang::EmitClangDataCollectors(RecordKeeper &RK, raw_ostream &OS) {
+void clang::EmitClangDataCollectors(const RecordKeeper &RK, raw_ostream &OS) {
   const auto &Defs = RK.getClasses();
   for (const auto &Entry : Defs) {
     Record &R = *Entry.second;
diff --git a/clang/utils/TableGen/TableGenBackends.h b/clang/utils/TableGen/TableGenBackends.h
index 3a424c9c91fe71..6e5508c6f68a5c 100644
--- a/clang/utils/TableGen/TableGenBackends.h
+++ b/clang/utils/TableGen/TableGenBackends.h
@@ -151,7 +151,7 @@ void EmitClangOpenCLBuiltinHeader(llvm::RecordKeeper &Records,
 void EmitClangOpenCLBuiltinTests(llvm::RecordKeeper &Records,
                                  llvm::raw_ostream &OS);
 
-void EmitClangDataCollectors(llvm::RecordKeeper &Records,
+void EmitClangDataCollectors(const llvm::RecordKeeper &Records,
                              llvm::raw_ostream &OS);
 
 void EmitTestPragmaAttributeSupportedAttributes(llvm::RecordKeeper &Records,



More information about the cfe-commits mailing list