[clang] de7c2f2 - [HLSL] Remove dead code in Type.cpp [NFC] (#146365)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 30 10:31:30 PDT 2025
Author: Steven Perron
Date: 2025-06-30T13:31:27-04:00
New Revision: de7c2f29405ff08a91a34bc0f152cfa1cd0d9801
URL: https://github.com/llvm/llvm-project/commit/de7c2f29405ff08a91a34bc0f152cfa1cd0d9801
DIFF: https://github.com/llvm/llvm-project/commit/de7c2f29405ff08a91a34bc0f152cfa1cd0d9801.diff
LOG: [HLSL] Remove dead code in Type.cpp [NFC] (#146365)
In a case statement for Type::HLSLInlineSpirv, the first statment
returns, and the remaining statement are never executed. This removes
the dead code.
https://github.com/llvm/llvm-project/pull/134034/files/7d8e36944370bc50bd74ce6254f93649bc1f35a8#r2166484730
Added:
Modified:
clang/lib/AST/Type.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp
index 2c1158e8f9b9a..e5a1ab2ff8906 100644
--- a/clang/lib/AST/Type.cpp
+++ b/clang/lib/AST/Type.cpp
@@ -4870,15 +4870,6 @@ LinkageInfo LinkageComputer::computeTypeLinkageInfo(const Type *T) {
->getCanonicalTypeInternal());
case Type::HLSLInlineSpirv:
return LinkageInfo::external();
- {
- const auto *ST = cast<HLSLInlineSpirvType>(T);
- LinkageInfo LV = LinkageInfo::external();
- for (auto &Operand : ST->getOperands()) {
- if (Operand.isConstant() || Operand.isType())
- LV.merge(computeTypeLinkageInfo(Operand.getResultType()));
- }
- return LV;
- }
}
llvm_unreachable("unhandled type class");
More information about the cfe-commits
mailing list