Skip to content

Conversation

@jmmartinez
Copy link
Contributor

Internally, hasLocalLinkage is implemented as:

static bool isLocalLinkage(LinkageTypes Linkage) { return isInternalLinkage(Linkage) || isPrivateLinkage(Linkage); }
@jmmartinez jmmartinez requested a review from s-perron October 20, 2025 11:35
@jmmartinez jmmartinez self-assigned this Oct 20, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 20, 2025

@llvm/pr-subscribers-backend-spir-v

Author: Juan Manuel Martinez Caamaño (jmmartinez)

Changes

Internally, hasLocalLinkage is implemented as:

static bool isLocalLinkage(LinkageTypes Linkage) { return isInternalLinkage(Linkage) || isPrivateLinkage(Linkage); }

Full diff: https://github.com/llvm/llvm-project/pull/164236.diff

1 Files Affected:

  • (modified) llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp (+1-1)
diff --git a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp index a0cff4d82b500..0b80b25307cae 100644 --- a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp +++ b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp @@ -4350,7 +4350,7 @@ bool SPIRVInstructionSelector::selectGlobalValue( if (hasInitializer(GlobalVar) && !Init) return true; - bool HasLnkTy = !GV->hasInternalLinkage() && !GV->hasPrivateLinkage() && + bool HasLnkTy = !GV->hasLocalLinkage() && !GV->hasHiddenVisibility(); SPIRV::LinkageType::LinkageType LnkType = GV->isDeclarationForLinker() 
@github-actions
Copy link

github-actions bot commented Oct 20, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@jmmartinez jmmartinez merged commit 66b7d38 into llvm:main Oct 20, 2025
11 checks passed
jmmartinez added a commit that referenced this pull request Oct 20, 2025
…InteralLinkage/PrivateLinkage (#164240) Same as #164236, but I found this one later.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Oct 20, 2025
…on against InteralLinkage/PrivateLinkage (#164240) Same as llvm/llvm-project#164236, but I found this one later.
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
Lukacma pushed a commit to Lukacma/llvm-project that referenced this pull request Oct 29, 2025
…InteralLinkage/PrivateLinkage (llvm#164240) Same as llvm#164236, but I found this one later.
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
…InteralLinkage/PrivateLinkage (llvm#164240) Same as llvm#164236, but I found this one later.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants