Skip to content

Commit 4e88280

Browse files
authored
[NFC][SPIRV] Use hasLocalLinage instead of manual comparison against InteralLinkage/PrivateLinkage (#164240)
Same as llvm/llvm-project#164236, but I found this one later.
1 parent 66b7d38 commit 4e88280

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,7 @@ bool SPIRVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
479479
.addImm(static_cast<uint32_t>(getExecutionModel(*ST, F)))
480480
.addUse(FuncVReg);
481481
addStringImm(F.getName(), MIB);
482-
} else if (F.getLinkage() != GlobalValue::InternalLinkage &&
483-
F.getLinkage() != GlobalValue::PrivateLinkage &&
482+
} else if (!F.hasLocalLinkage() &&
484483
F.getVisibility() != GlobalValue::HiddenVisibility) {
485484
SPIRV::LinkageType::LinkageType LnkTy =
486485
F.isDeclaration()

0 commit comments

Comments
 (0)