[clang] [CIR] Implement the 'rest' of the TLS Model types (PR #215380)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 11 11:50:47 PDT 2026


================
@@ -144,6 +144,10 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &mlirContext,
                                              cgo.OptimizationLevel,
                                              cgo.OptimizeSize));
 
+  theModule->setAttr(
----------------
erichkeane wrote:

C/OpenCL both support Thread-local storage as well?  So we need it in any TU that C or C++.  I can definitely suppress it if it isn't `GeneralDynamic` (LoweringPrepare defaults it just to be flexible for the purposes of not forcing us to write them when we hand-write .cir files), but it didn't really seem all that valuable to save 1 attribute per TU? 

So it seems worth it to just emit it every time to me? 

Name change is not a problem.

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


More information about the cfe-commits mailing list