[clang] [clang][TableGen] Migrate Builtins emitter to use const RecordKeeper (PR #108195)

Rahul Joshi via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 11 04:53:10 PDT 2024


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

Migrate Builtins emitter to use const RecordKeeper.


>From 903b02c1656c5bacfa0d97da83584876fa1f2999 Mon Sep 17 00:00:00 2001
From: Rahul Joshi <rjoshi at nvidia.com>
Date: Wed, 11 Sep 2024 04:51:40 -0700
Subject: [PATCH] [clang][TableGen] Migrate Builtins emitter to use const
 RecordKeeper

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

diff --git a/clang/utils/TableGen/ClangBuiltinsEmitter.cpp b/clang/utils/TableGen/ClangBuiltinsEmitter.cpp
index 94f12a08164fdc..4ae7600a392b8f 100644
--- a/clang/utils/TableGen/ClangBuiltinsEmitter.cpp
+++ b/clang/utils/TableGen/ClangBuiltinsEmitter.cpp
@@ -345,7 +345,7 @@ void EmitBuiltin(llvm::raw_ostream &OS, const Record *Builtin) {
 }
 } // namespace
 
-void clang::EmitClangBuiltins(llvm::RecordKeeper &Records,
+void clang::EmitClangBuiltins(const llvm::RecordKeeper &Records,
                               llvm::raw_ostream &OS) {
   emitSourceFileHeader("List of builtins that Clang recognizes", OS);
 
diff --git a/clang/utils/TableGen/TableGenBackends.h b/clang/utils/TableGen/TableGenBackends.h
index 3a424c9c91fe71..35cc04d6ef31f4 100644
--- a/clang/utils/TableGen/TableGenBackends.h
+++ b/clang/utils/TableGen/TableGenBackends.h
@@ -73,7 +73,8 @@ void EmitClangAttrNodeTraverse(llvm::RecordKeeper &Records,
                                llvm::raw_ostream &OS);
 void EmitClangAttrDocTable(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
 
-void EmitClangBuiltins(llvm::RecordKeeper &Records, llvm::raw_ostream &OS);
+void EmitClangBuiltins(const llvm::RecordKeeper &Records,
+                       llvm::raw_ostream &OS);
 
 void EmitClangDiagsDefs(llvm::RecordKeeper &Records, llvm::raw_ostream &OS,
                         const std::string &Component);



More information about the cfe-commits mailing list