From 78f3c72e8948087352788997a70854dee613352c Mon Sep 17 00:00:00 2001 From: Stefano Cianciulli Date: Tue, 16 May 2023 10:32:54 +0000 Subject: Use C++17's [[maybe_unused]] attribute in ART Bug: 169680875 Test: mmm art Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235 --- compiler/common_compiler_test.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'compiler/common_compiler_test.cc') diff --git a/compiler/common_compiler_test.cc b/compiler/common_compiler_test.cc index 442b96e5fa..a37f516759 100644 --- a/compiler/common_compiler_test.cc +++ b/compiler/common_compiler_test.cc @@ -133,9 +133,9 @@ class CommonCompilerTestImpl::OneCompiledMethodStorage final : public CompiledCo CompiledMethod* CreateCompiledMethod(InstructionSet instruction_set, ArrayRef code, ArrayRef stack_map, - ArrayRef cfi ATTRIBUTE_UNUSED, + [[maybe_unused]] ArrayRef cfi, ArrayRef patches, - bool is_intrinsic ATTRIBUTE_UNUSED) override { + [[maybe_unused]] bool is_intrinsic) override { // Supports only one method at a time. CHECK_EQ(instruction_set_, InstructionSet::kNone); CHECK_NE(instruction_set, InstructionSet::kNone); @@ -150,15 +150,15 @@ class CommonCompilerTestImpl::OneCompiledMethodStorage final : public CompiledCo return reinterpret_cast(this); } - ArrayRef GetThunkCode(const linker::LinkerPatch& patch ATTRIBUTE_UNUSED, - /*out*/ std::string* debug_name ATTRIBUTE_UNUSED) override { + ArrayRef GetThunkCode([[maybe_unused]] const linker::LinkerPatch& patch, + [[maybe_unused]] /*out*/ std::string* debug_name) override { LOG(FATAL) << "Unsupported."; UNREACHABLE(); } - void SetThunkCode(const linker::LinkerPatch& patch ATTRIBUTE_UNUSED, - ArrayRef code ATTRIBUTE_UNUSED, - const std::string& debug_name ATTRIBUTE_UNUSED) override { + void SetThunkCode([[maybe_unused]] const linker::LinkerPatch& patch, + [[maybe_unused]] ArrayRef code, + [[maybe_unused]] const std::string& debug_name) override { LOG(FATAL) << "Unsupported."; UNREACHABLE(); } -- cgit v1.2.3-59-g8ed1b