[PATCH] D49751: Mark a variable as maybe-unused to prevent a -Wunused-by-set-variable warning in optimized builds where asserts are removed.Test/first commit to check setup and understand patch submission process.
Nick Desaulniers via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 24 13:12:50 PDT 2018
nickdesaulniers created this revision.
nickdesaulniers added reviewers: srhines, pirama.
Herald added a subscriber: llvm-commits.
Add maybe-unused attribute to a variable.
Repository:
rL LLVM
https://reviews.llvm.org/D49751
Files:
lib/IR/SafepointIRVerifier.cpp
tools/clang
Index: tools/clang
===================================================================
--- /dev/null
+++ tools/clang
@@ -0,0 +1 @@
+Subproject commit 5857036e6f0e54ff49a0be5627f2576151804a06
Index: lib/IR/SafepointIRVerifier.cpp
===================================================================
--- lib/IR/SafepointIRVerifier.cpp
+++ lib/IR/SafepointIRVerifier.cpp
@@ -84,6 +84,7 @@
bool hasLiveIncomingEdge(const PHINode *PN, const BasicBlock *InBB) const {
assert(!isDeadBlock(InBB) && "block must be live");
const BasicBlock* BB = PN->getParent();
+ [[maybe_unused]]
bool Listed = false;
for (const_pred_iterator PredIt(BB), End(BB, true); PredIt != End; ++PredIt) {
if (InBB == *PredIt) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49751.157111.patch
Type: text/x-patch
Size: 728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180724/d1d8a191/attachment.bin>
More information about the llvm-commits
mailing list