Commit ff5e8964 authored by Daniel Paoliello's avatar Daniel Paoliello Committed by Xun Li
Browse files

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
parent 6ed3083a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1535,6 +1535,7 @@ static void rewritePHIs(BasicBlock &BB) {
    for (BasicBlock *Pred : Preds) {
      if (CatchSwitchInst *CS =
              dyn_cast<CatchSwitchInst>(Pred->getTerminator())) {
        (void)CS;
        // CleanupPad with a CatchSwitch predecessor: therefore this is an
        // unwind destination that needs to be handle specially.
        assert(CS->getUnwindDest() == &BB);