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/optimizing/code_generator.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'compiler/optimizing/code_generator.cc') diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index f90f17f8f5..cc8cb8962a 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -288,8 +288,8 @@ uint64_t CodeGenerator::GetJitClassRootIndex(TypeReference type_reference) { return code_generation_data_->GetJitClassRootIndex(type_reference); } -void CodeGenerator::EmitJitRootPatches(uint8_t* code ATTRIBUTE_UNUSED, - const uint8_t* roots_data ATTRIBUTE_UNUSED) { +void CodeGenerator::EmitJitRootPatches([[maybe_unused]] uint8_t* code, + [[maybe_unused]] const uint8_t* roots_data) { DCHECK(code_generation_data_ != nullptr); DCHECK_EQ(code_generation_data_->GetNumberOfJitStringRoots(), 0u); DCHECK_EQ(code_generation_data_->GetNumberOfJitClassRoots(), 0u); @@ -457,18 +457,18 @@ void CodeGenerator::Finalize(CodeAllocator* allocator) { } void CodeGenerator::EmitLinkerPatches( - ArenaVector* linker_patches ATTRIBUTE_UNUSED) { + [[maybe_unused]] ArenaVector* linker_patches) { // No linker patches by default. } -bool CodeGenerator::NeedsThunkCode(const linker::LinkerPatch& patch ATTRIBUTE_UNUSED) const { +bool CodeGenerator::NeedsThunkCode([[maybe_unused]] const linker::LinkerPatch& patch) const { // Code generators that create patches requiring thunk compilation should override this function. return false; } -void CodeGenerator::EmitThunkCode(const linker::LinkerPatch& patch ATTRIBUTE_UNUSED, - /*out*/ ArenaVector* code ATTRIBUTE_UNUSED, - /*out*/ std::string* debug_name ATTRIBUTE_UNUSED) { +void CodeGenerator::EmitThunkCode([[maybe_unused]] const linker::LinkerPatch& patch, + [[maybe_unused]] /*out*/ ArenaVector* code, + [[maybe_unused]] /*out*/ std::string* debug_name) { // Code generators that create patches requiring thunk compilation should override this function. LOG(FATAL) << "Unexpected call to EmitThunkCode()."; } -- cgit v1.2.3-59-g8ed1b