[llvm] fbc2d06 - [NFC][SPIRV] Remove useless static_cast (#164239)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 20 07:17:56 PDT 2025
Author: Juan Manuel Martinez CaamaƱo
Date: 2025-10-20T16:17:52+02:00
New Revision: fbc2d06c54d03c97053c79b81ad92aeed252a576
URL: https://github.com/llvm/llvm-project/commit/fbc2d06c54d03c97053c79b81ad92aeed252a576
DIFF: https://github.com/llvm/llvm-project/commit/fbc2d06c54d03c97053c79b81ad92aeed252a576.diff
LOG: [NFC][SPIRV] Remove useless static_cast (#164239)
Added:
Modified:
llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
index 61a0bbef90891..14139c0c7f9cd 100644
--- a/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVModuleAnalysis.cpp
@@ -547,9 +547,9 @@ void SPIRVModuleAnalysis::collectFuncNames(MachineInstr &MI,
if (MI.getOpcode() == SPIRV::OpDecorate) {
// If it's got Import linkage.
auto Dec = MI.getOperand(1).getImm();
- if (Dec == static_cast<unsigned>(SPIRV::Decoration::LinkageAttributes)) {
+ if (Dec == SPIRV::Decoration::LinkageAttributes) {
auto Lnk = MI.getOperand(MI.getNumOperands() - 1).getImm();
- if (Lnk == static_cast<unsigned>(SPIRV::LinkageType::Import)) {
+ if (Lnk == SPIRV::LinkageType::Import) {
// Map imported function name to function ID register.
const Function *ImportedFunc =
F->getParent()->getFunction(getStringImm(MI, 2));
More information about the llvm-commits
mailing list