Skip to content

Commit de7c2f2

Browse files
authored
[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
1 parent 407542b commit de7c2f2

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

clang/lib/AST/Type.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4870,15 +4870,6 @@ LinkageInfo LinkageComputer::computeTypeLinkageInfo(const Type *T) {
48704870
->getCanonicalTypeInternal());
48714871
case Type::HLSLInlineSpirv:
48724872
return LinkageInfo::external();
4873-
{
4874-
const auto *ST = cast<HLSLInlineSpirvType>(T);
4875-
LinkageInfo LV = LinkageInfo::external();
4876-
for (auto &Operand : ST->getOperands()) {
4877-
if (Operand.isConstant() || Operand.isType())
4878-
LV.merge(computeTypeLinkageInfo(Operand.getResultType()));
4879-
}
4880-
return LV;
4881-
}
48824873
}
48834874

48844875
llvm_unreachable("unhandled type class");

0 commit comments

Comments
 (0)