[clang] [CIR] Implement static-local-tls lowering (PR #194059)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 24 14:49:23 PDT 2026
================
@@ -3814,8 +3814,7 @@ def CIR_FuncOp : CIR_Op<"func", [
def CIR_LocalInitOp : CIR_Op<"local_init", [
DeclareOpInterfaceMethods<SymbolUserOpInterface>, NoRegionArguments,
- ParentOneOf<["cir::FuncOp"]>,
- HasAtMostOneOfAttrs<["tls", "static_local"]>
+ ParentOneOf<["cir::FuncOp"]>
----------------
andykaylor wrote:
It was near the top of my mind because @Andres-Salamanca had a similar situation in a recent review where I incorrectly suggested using `ParentOf`. You can handle it in a custom verifier with `if (!getOperation()->getParentOfType<cir::FuncOp>())`. If there's a way to do this from the op declaration, I'm not aware of it.
https://github.com/llvm/llvm-project/pull/194059
More information about the cfe-commits
mailing list