[llvm] 4e88280 - [NFC][SPIRV] Use hasLocalLinage instead of manual comparison against InteralLinkage/PrivateLinkage (#164240)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 20 08:55:04 PDT 2025
Author: Juan Manuel Martinez CaamaƱo
Date: 2025-10-20T17:55:01+02:00
New Revision: 4e882805dc8ec7fd80bb1b9e1e533b858decc8fc
URL: https://github.com/llvm/llvm-project/commit/4e882805dc8ec7fd80bb1b9e1e533b858decc8fc
DIFF: https://github.com/llvm/llvm-project/commit/4e882805dc8ec7fd80bb1b9e1e533b858decc8fc.diff
LOG: [NFC][SPIRV] Use hasLocalLinage instead of manual comparison against InteralLinkage/PrivateLinkage (#164240)
Same as https://github.com/llvm/llvm-project/pull/164236, but I found this one later.
Added:
Modified:
llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp b/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
index 1a7c02c676465..9d5f8285f447b 100644
--- a/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp
@@ -479,8 +479,7 @@ bool SPIRVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
.addImm(static_cast<uint32_t>(getExecutionModel(*ST, F)))
.addUse(FuncVReg);
addStringImm(F.getName(), MIB);
- } else if (F.getLinkage() != GlobalValue::InternalLinkage &&
- F.getLinkage() != GlobalValue::PrivateLinkage &&
+ } else if (!F.hasLocalLinkage() &&
F.getVisibility() != GlobalValue::HiddenVisibility) {
SPIRV::LinkageType::LinkageType LnkTy =
F.isDeclaration()
More information about the llvm-commits
mailing list