[compiler-rt] r296449 - [XRay] [compiler-rt] [NFC] Annotate unused variables for the compiler.
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 00:48:47 PST 2017
Author: dberris
Date: Tue Feb 28 02:48:46 2017
New Revision: 296449
URL: http://llvm.org/viewvc/llvm-project?rev=296449&view=rev
Log:
[XRay] [compiler-rt] [NFC] Annotate unused variables for the compiler.
Summary:
Use a common definition of a "this variable is unused" annotation for useless
variables only present for their lambda global initializers, to silence gcc's
warning.
Reviewers: dberris
Reviewed By: dberris
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D29860
Modified:
compiler-rt/trunk/lib/xray/xray_fdr_logging.cc
compiler-rt/trunk/lib/xray/xray_inmemory_log.cc
Modified: compiler-rt/trunk/lib/xray/xray_fdr_logging.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_fdr_logging.cc?rev=296449&r1=296448&r2=296449&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_fdr_logging.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_fdr_logging.cc Tue Feb 28 02:48:46 2017
@@ -523,7 +523,7 @@ void fdrLoggingHandleArg0(int32_t FuncId
} // namespace __xray
-static auto Unused = [] {
+static auto UNUSED Unused = [] {
using namespace __xray;
if (flags()->xray_fdr_log) {
XRayLogImpl Impl{
Modified: compiler-rt/trunk/lib/xray/xray_inmemory_log.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_inmemory_log.cc?rev=296449&r1=296448&r2=296449&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_inmemory_log.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_inmemory_log.cc Tue Feb 28 02:48:46 2017
@@ -129,7 +129,7 @@ void __xray_InMemoryRawLog(int32_t FuncI
}
}
-static auto Unused = [] {
+static auto UNUSED Unused = [] {
if (!probeRequiredCPUFeatures()) {
Report("Required CPU features missing for XRay instrumentation, not "
"installing instrumentation hooks.\n");
More information about the llvm-commits
mailing list