[flang-commits] [clang] [flang] [mlir] [CIR][MLIR-LLVM] Add 'thread local mode/model' attribute support (PR #214337)

Tobias Gysi via flang-commits flang-commits at lists.llvm.org
Wed Aug 5 22:16:29 PDT 2026


================
@@ -3663,8 +3663,8 @@ struct GlobalOpConversion : public fir::FIROpConversion<fir::GlobalOp> {
     llvm::ArrayRef<mlir::NamedAttribute> attrs;
     auto g = mlir::LLVM::GlobalOp::create(
         rewriter, loc, tyAttr, isConst, linkage, global.getSymName(), initAttr,
-        0, getGlobalAddressSpace(rewriter), false, false, comdat, attrs,
-        dbgExprs);
+        0, getGlobalAddressSpace(rewriter), false,
+        mlir::LLVM::ThreadLocalMode::NotThreadLocal, comdat, attrs, dbgExprs);
----------------
gysit wrote:

I lean towards having just the new builder that takes the explicit enum value. Having two booleans in sequence is anyways error prone...

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


More information about the flang-commits mailing list