diff options
author | 2023-05-16 10:32:54 +0000 | |
---|---|---|
committer | 2023-05-22 10:36:39 +0000 | |
commit | 78f3c72e8948087352788997a70854dee613352c (patch) | |
tree | 306db3c15bc4b7af149bcf3e07be533e50679b88 /compiler/common_compiler_test.cc | |
parent | dc771261232c2ff702373f396a5a7fe586e2f0a6 (diff) |
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875
Test: mmm art
Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'compiler/common_compiler_test.cc')
-rw-r--r-- | compiler/common_compiler_test.cc | 14 |
1 files changed, 7 insertions, 7 deletions
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<const uint8_t> code, ArrayRef<const uint8_t> stack_map, - ArrayRef<const uint8_t> cfi ATTRIBUTE_UNUSED, + [[maybe_unused]] ArrayRef<const uint8_t> cfi, ArrayRef<const linker::LinkerPatch> 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<CompiledMethod*>(this); } - ArrayRef<const uint8_t> GetThunkCode(const linker::LinkerPatch& patch ATTRIBUTE_UNUSED, - /*out*/ std::string* debug_name ATTRIBUTE_UNUSED) override { + ArrayRef<const uint8_t> 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<const uint8_t> code ATTRIBUTE_UNUSED, - const std::string& debug_name ATTRIBUTE_UNUSED) override { + void SetThunkCode([[maybe_unused]] const linker::LinkerPatch& patch, + [[maybe_unused]] ArrayRef<const uint8_t> code, + [[maybe_unused]] const std::string& debug_name) override { LOG(FATAL) << "Unsupported."; UNREACHABLE(); } |