From fbe64b65a895a565884a36fa452e5b41ac8bef62 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Tue, 28 Feb 2017 08:48:46 +0000 Subject: [PATCH] [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 llvm-svn: 296449 --- compiler-rt/lib/xray/xray_fdr_logging.cc | 2 +- compiler-rt/lib/xray/xray_inmemory_log.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler-rt/lib/xray/xray_fdr_logging.cc b/compiler-rt/lib/xray/xray_fdr_logging.cc index 44ec8fe4bfa2..6db384519e66 100644 --- a/compiler-rt/lib/xray/xray_fdr_logging.cc +++ b/compiler-rt/lib/xray/xray_fdr_logging.cc @@ -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{ diff --git a/compiler-rt/lib/xray/xray_inmemory_log.cc b/compiler-rt/lib/xray/xray_inmemory_log.cc index da08d3e21013..fd4f54931000 100644 --- a/compiler-rt/lib/xray/xray_inmemory_log.cc +++ b/compiler-rt/lib/xray/xray_inmemory_log.cc @@ -129,7 +129,7 @@ void __xray_InMemoryRawLog(int32_t FuncId, } } -static auto Unused = [] { +static auto UNUSED Unused = [] { if (!probeRequiredCPUFeatures()) { Report("Required CPU features missing for XRay instrumentation, not " "installing instrumentation hooks.\n");