Skip to content

Commit 556fc5b

Browse files
authored
[Internal] Remove dead fallthrough statement (#7433)
This PR removes a dead fallthrough statement after a switch-statement's case that is terminated by a break; This needs to be removed, because the way linux builds dxc in our internal infrastructure, it errors when a dead fallthrough statement is detected. For context, here is the relevant error: ``` ScalarReplAggregatesHLSL.cpp:2822:9: error: fallthrough annotation in unreachable code [-Werror,-Wimplicit-fallthrough] LLVM_FALLTHROUGH; ^ ... DXC/include/llvm/Support/Compiler.h:224:26: note: expanded from macro 'LLVM_FALLTHROUGH' #define LLVM_FALLTHROUGH [[fallthrough]] ^ 1 error generated. ```
1 parent 6f17379 commit 556fc5b

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/Transforms/Scalar/ScalarReplAggregatesHLSL.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -2819,7 +2819,6 @@ void SROA_Helper::RewriteCall(CallInst *CI) {
28192819
DeadInsts.push_back(CI);
28202820
break;
28212821
}
2822-
LLVM_FALLTHROUGH;
28232822
default:
28242823
// RayQuery this pointer replacement.
28252824
if (OldVal->getType()->isPointerTy() &&

0 commit comments

Comments
 (0)