================
@@ -176,6 +177,18 @@ void CIRGenModule::emitGlobalVarDefinition(const
clang::VarDecl *vd,
}
varOp.setInitialValueAttr(initializer);
}
+
+ // Set CIR's linkage type as appropriate.
+ cir::GlobalLinkageKind linkage =
+ getCIRLinkageVarDefinition(vd, /*IsConstant=*/false);
+
+ // Set CIR linkage and DLL storage class.
+ varOp.setLinkage(linkage);
+
+ if (linkage == cir::GlobalLinkageKind::CommonLinkage) {
----------------
andykaylor wrote:
No need for curly braces here. They're omitted for single-line scopes in LLVM's
coding style.
https://github.com/llvm/llvm-project/pull/129072
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits