diff options
author | 2023-05-16 10:32:54 +0000 | |
---|---|---|
committer | 2023-05-22 10:36:39 +0000 | |
commit | 78f3c72e8948087352788997a70854dee613352c (patch) | |
tree | 306db3c15bc4b7af149bcf3e07be533e50679b88 /compiler/utils/assembler_test.h | |
parent | dc771261232c2ff702373f396a5a7fe586e2f0a6 (diff) |
Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875
Test: mmm art
Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
Diffstat (limited to 'compiler/utils/assembler_test.h')
-rw-r--r-- | compiler/utils/assembler_test.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/utils/assembler_test.h b/compiler/utils/assembler_test.h index 43438255d2..810c843b7b 100644 --- a/compiler/utils/assembler_test.h +++ b/compiler/utils/assembler_test.h @@ -803,19 +803,19 @@ class AssemblerTest : public AssemblerTestBase { } // Secondary register names are the secondary view on registers, e.g., 32b on 64b systems. - virtual std::string GetSecondaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { + virtual std::string GetSecondaryRegisterName([[maybe_unused]] const Reg& reg) { UNIMPLEMENTED(FATAL) << "Architecture does not support secondary registers"; UNREACHABLE(); } // Tertiary register names are the tertiary view on registers, e.g., 16b on 64b systems. - virtual std::string GetTertiaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { + virtual std::string GetTertiaryRegisterName([[maybe_unused]] const Reg& reg) { UNIMPLEMENTED(FATAL) << "Architecture does not support tertiary registers"; UNREACHABLE(); } // Quaternary register names are the quaternary view on registers, e.g., 8b on 64b systems. - virtual std::string GetQuaternaryRegisterName(const Reg& reg ATTRIBUTE_UNUSED) { + virtual std::string GetQuaternaryRegisterName([[maybe_unused]] const Reg& reg) { UNIMPLEMENTED(FATAL) << "Architecture does not support quaternary registers"; UNREACHABLE(); } @@ -1576,8 +1576,7 @@ class AssemblerTest : public AssemblerTestBase { } // Override this to pad the code with NOPs to a certain size if needed. - virtual void Pad(std::vector<uint8_t>& data ATTRIBUTE_UNUSED) { - } + virtual void Pad([[maybe_unused]] std::vector<uint8_t>& data) {} void DriverWrapper(const std::string& assembly_text, const std::string& test_name) { assembler_->FinalizeCode(); |