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

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 2 12:12:00 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:

Please see the discourse thread: https://discourse.llvm.org/t/changing-tablegen-getallderiveddefinitions-to-return-arrayref-const-record/80586/5

Changing all backends to use const in a single go will be too large a change, so this is a way to stage it. Over time, all backends should move to const variant, and then the non-const ones can be deleted. 

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


More information about the llvm-commits mailing list