[clang] [llvm] [mlir] [TableGen] Add const variants of accessors for backend (PR #106658)

Rahul Joshi via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 08:52:07 PDT 2024


================
@@ -189,7 +189,7 @@ static StringRef NormalizeGNUAttrSpelling(StringRef AttrSpelling) {
 
 typedef std::vector<std::pair<std::string, const Record *>> ParsedAttrMap;
 
-static ParsedAttrMap getParsedAttrList(const RecordKeeper &Records,
----------------
jurahul wrote:

I propose the following next steps (once this is committed):

1. We need to send a PSA as current downstream backends may break due to this (fix is easy)
2. I'll work on migrating on of each MLIR. Clang, and may be another LLVM backends to use const.
3. For the rest, we need to chip away. May be we try to recruit volunteers?
4. Before we can deprecate the non-const functions completely, give enough time for downstream backends to change. Maybe this should be a part of the PSA in (1).
5. Delete the non-const functions here, and any other const vs non-const difference we may have introduced during the transition.

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


More information about the cfe-commits mailing list