[llvm] r338654 - Add maybe-unused attribute to a variable.

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 1 16:46:48 PDT 2018


Author: nickdesaulniers
Date: Wed Aug  1 16:46:48 2018
New Revision: 338654

URL: http://llvm.org/viewvc/llvm-project?rev=338654&view=rev
Log:
Add maybe-unused attribute to a variable.

Summary:
Mark a variable as maybe-unused to prevent a -Wunused-but-set-variable
warning in optimized builds where asserts are removed.Test/first commit
to check setup and understand patch submission process.

Reviewers: srhines, pirama, dblaikie

Reviewed By: dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D49756

Modified:
    llvm/trunk/lib/IR/SafepointIRVerifier.cpp

Modified: llvm/trunk/lib/IR/SafepointIRVerifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/SafepointIRVerifier.cpp?rev=338654&r1=338653&r2=338654&view=diff
==============================================================================
--- llvm/trunk/lib/IR/SafepointIRVerifier.cpp (original)
+++ llvm/trunk/lib/IR/SafepointIRVerifier.cpp Wed Aug  1 16:46:48 2018
@@ -92,6 +92,7 @@ public:
         Listed = true;
       }
     }
+    (void)Listed;
     assert(Listed && "basic block is not found among incoming blocks");
     return false;
   }




More information about the llvm-commits mailing list