[PATCH] D94456: Fix unused variable in CoroFrame.cpp when building Release with GCC 10
Daniel Paoliello via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 14:47:28 PST 2021
dpaoliello created this revision.
dpaoliello added reviewers: lbenes, lxfind.
Herald added a subscriber: hiraditya.
dpaoliello requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D94456
Files:
llvm/lib/Transforms/Coroutines/CoroFrame.cpp
Index: llvm/lib/Transforms/Coroutines/CoroFrame.cpp
===================================================================
--- llvm/lib/Transforms/Coroutines/CoroFrame.cpp
+++ llvm/lib/Transforms/Coroutines/CoroFrame.cpp
@@ -1526,6 +1526,7 @@
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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94456.315941.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210111/a21dd39f/attachment.bin>
More information about the llvm-commits
mailing list