[llvm-branch-commits] [clang] [CIR] Add CIRGen support for static local variables with non-constant initializers (PR #179827)

Bruno Cardoso Lopes via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 12 15:51:18 PST 2026


================
@@ -1286,5 +1288,44 @@ def CIR_SideEffect : CIR_I32EnumAttr<
   }];
 }
 
+//===----------------------------------------------------------------------===//
+// AST Wrappers
+//===----------------------------------------------------------------------===//
+
+class CIR_AST<string name, string prefix, list<Trait> traits = []>
+    : CIR_Attr<!strconcat("AST", name), !strconcat(prefix, ".ast"), traits> {
+  string clang_name = !strconcat("const clang::", name, " *");
+
+  let summary = !strconcat("Wraps a '", clang_name, "' AST node.");
+  let description = [{
+    Operations optionally refer to this node, they could be available depending
+    on the CIR lowering stage. Whether it's attached to the appropriated
----------------
bcardosolopes wrote:

fixed

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


More information about the llvm-branch-commits mailing list