Skip to content

Commit ff5e896

Browse files
dpaoliellolxfind
authored andcommitted
Fix unused variable in CoroFrame.cpp when building Release with GCC 10
When building with GCC 10, the following warning is reported: ``` /llvm-project/llvm/lib/Transforms/Coroutines/CoroFrame.cpp:1527:28: warning: unused variable ‘CS’ [-Wunused-variable] 1527 | if (CatchSwitchInst *CS = ``` This change adds a cast to `void` to avoid the warning. Reviewed By: lxfind Differential Revision: https://reviews.llvm.org/D94456
1 parent 6ed3083 commit ff5e896

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Transforms/Coroutines/CoroFrame.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1535,6 +1535,7 @@ static void rewritePHIs(BasicBlock &BB) {
15351535
for (BasicBlock *Pred : Preds) {
15361536
if (CatchSwitchInst *CS =
15371537
dyn_cast<CatchSwitchInst>(Pred->getTerminator())) {
1538+
(void)CS;
15381539
// CleanupPad with a CatchSwitch predecessor: therefore this is an
15391540
// unwind destination that needs to be handle specially.
15401541
assert(CS->getUnwindDest() == &BB);

0 commit comments

Comments
 (0)