Skip to content

Commit 3a14731

Browse files
authored
Merge pull request #11006 from artemcm/FixGVLinkageForClangTarget
[clang] Fix missing target info specifier on Global Variable linkage computation
2 parents 4f10598 + c1cf419 commit 3a14731

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2759,7 +2759,7 @@ void CodeGenModule::SetInternalFunctionAttributes(GlobalDecl GD,
27592759
}
27602760

27612761
static void setLinkageForGV(llvm::GlobalValue *GV, const NamedDecl *ND,
2762-
VersionTuple EnclosingVersion = VersionTuple()) {
2762+
VersionTuple EnclosingVersion) {
27632763
// Set linkage and visibility in case we never see a definition.
27642764
LinkageInfo LV = ND->getLinkageAndVisibility();
27652765
// Don't set internal linkage on declarations.
@@ -5003,7 +5003,7 @@ CodeGenModule::GetOrCreateLLVMGlobal(StringRef MangledName, llvm::Type *Ty,
50035003

50045004
GV->setAlignment(getContext().getDeclAlign(D).getAsAlign());
50055005

5006-
setLinkageForGV(GV, D);
5006+
setLinkageForGV(GV, D, Target.getPlatformMinVersion());
50075007

50085008
if (D->getTLSKind()) {
50095009
if (D->getTLSKind() == VarDecl::TLS_Dynamic)

0 commit comments

Comments
 (0)