[llvm-branch-commits] [clang] [CIR] Add static_local attribute to GlobalOp and GetGlobalOp (PR #179826)

Bruno Cardoso Lopes via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 10 18:11:19 PST 2026


================
@@ -1854,6 +1854,10 @@ cir::GetGlobalOp::verifySymbolUses(SymbolTableCollection &symbolTable) {
     // be marked with tls bits.
     if (getTls() && !g.getTlsModel())
       return emitOpError("access to global not marked thread local");
+    // Verify that for static local access, the global needs to be marked
+    // static_local.
+    if (getStaticLocal() && !g.getStaticLocal())
----------------
bcardosolopes wrote:

Fixed and added another testcase

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


More information about the llvm-branch-commits mailing list