[clang] [CIR] Fix 'vague' linkage globals. (PR #228586)
Kunal Dubey via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 6 09:53:19 PDT 2026
================
@@ -357,10 +357,10 @@ void CIRGenModule::emitCXXSpecialVarDeclInit(const VarDecl *varDecl,
scope.setAsGlobalInit();
builder.setInsertionPointToStart(block);
mlir::Value getGlobal = builder.createGetGlobal(addr, varDecl->getTLSKind());
- // If we're initializing a static local with a guard variable, set the flag
- // that indicates that.
+ // If we're initializing a guarded variable, set the flag that indicates
+ // that.
getGlobal.getDefiningOp<cir::GetGlobalOp>().setStaticLocal(
- addr.getStaticLocalGuard().has_value());
+ addr.getDynamicInitGuard().has_value());
----------------
xakep8 wrote:
Same as above
https://github.com/llvm/llvm-project/pull/228586
More information about the cfe-commits
mailing list