================
@@ -3765,7 +3765,7 @@ ConstantAddress
CodeGenModule::GetAddrOfTemplateParamObject(
auto *GV = new llvm::GlobalVariable(getModule(), Init->getType(),
/*isConstant=*/true, Linkage, Init,
Name);
setGVProperties(GV, TPO);
- if (supportsCOMDAT())
+ if (supportsCOMDAT() && Linkage == llvm::GlobalValue::LinkOnceODRLinkage)
----------------
resistor wrote:
Linkage is set to either LinkOnceODRLinkage or InternalLinkage a few lines
above this.
https://github.com/llvm/llvm-project/pull/125448
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits