Skip to content

Commit 7a5a6fa

Browse files
committed
fix unused variable
The new system doesn't require the casted value, so we had a unused variable warning.
1 parent 9bc8864 commit 7a5a6fa

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

clang/lib/CodeGen/CGHLSLRuntime.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -557,15 +557,13 @@ llvm::Value *
557557
CGHLSLRuntime::emitSystemSemanticLoad(IRBuilder<> &B, llvm::Type *Type,
558558
const clang::DeclaratorDecl *Decl,
559559
SemanticInfo &ActiveSemantic) {
560-
if (HLSLSV_GroupIndexAttr *S =
561-
dyn_cast<HLSLSV_GroupIndexAttr>(ActiveSemantic.Semantic)) {
560+
if (isa<HLSLSV_GroupIndexAttr>(ActiveSemantic.Semantic)) {
562561
llvm::Function *GroupIndex =
563562
CGM.getIntrinsic(getFlattenedThreadIdInGroupIntrinsic());
564563
return B.CreateCall(FunctionCallee(GroupIndex));
565564
}
566565

567-
if (HLSLSV_DispatchThreadIDAttr *S =
568-
dyn_cast<HLSLSV_DispatchThreadIDAttr>(ActiveSemantic.Semantic)) {
566+
if (isa<HLSLSV_DispatchThreadIDAttr>(ActiveSemantic.Semantic)) {
569567
llvm::Intrinsic::ID IntrinID = getThreadIdIntrinsic();
570568
llvm::Function *ThreadIDIntrinsic =
571569
llvm::Intrinsic::isOverloaded(IntrinID)
@@ -574,8 +572,7 @@ CGHLSLRuntime::emitSystemSemanticLoad(IRBuilder<> &B, llvm::Type *Type,
574572
return buildVectorInput(B, ThreadIDIntrinsic, Type);
575573
}
576574

577-
if (HLSLSV_GroupThreadIDAttr *S =
578-
dyn_cast<HLSLSV_GroupThreadIDAttr>(ActiveSemantic.Semantic)) {
575+
if (isa<HLSLSV_GroupThreadIDAttr>(ActiveSemantic.Semantic)) {
579576
llvm::Intrinsic::ID IntrinID = getGroupThreadIdIntrinsic();
580577
llvm::Function *GroupThreadIDIntrinsic =
581578
llvm::Intrinsic::isOverloaded(IntrinID)
@@ -584,8 +581,7 @@ CGHLSLRuntime::emitSystemSemanticLoad(IRBuilder<> &B, llvm::Type *Type,
584581
return buildVectorInput(B, GroupThreadIDIntrinsic, Type);
585582
}
586583

587-
if (HLSLSV_GroupIDAttr *S =
588-
dyn_cast<HLSLSV_GroupIDAttr>(ActiveSemantic.Semantic)) {
584+
if (isa<HLSLSV_GroupIDAttr>(ActiveSemantic.Semantic)) {
589585
llvm::Intrinsic::ID IntrinID = getGroupIdIntrinsic();
590586
llvm::Function *GroupIDIntrinsic =
591587
llvm::Intrinsic::isOverloaded(IntrinID)

0 commit comments

Comments
 (0)