Use C++17's [[maybe_unused]] attribute in ART
Bug: 169680875
Test: mmm art
Change-Id: Ic0cc320891c42b07a2b5520a584d2b62052e7235
diff --git a/compiler/optimizing/code_generator_x86_64.h b/compiler/optimizing/code_generator_x86_64.h
index dff2e79..e1ce3a9 100644
--- a/compiler/optimizing/code_generator_x86_64.h
+++ b/compiler/optimizing/code_generator_x86_64.h
@@ -162,16 +162,16 @@
Location GetFieldIndexLocation() const override {
return Location::RegisterLocation(RDI);
}
- Location GetReturnLocation(DataType::Type type ATTRIBUTE_UNUSED) const override {
+ Location GetReturnLocation([[maybe_unused]] DataType::Type type) const override {
return Location::RegisterLocation(RAX);
}
- Location GetSetValueLocation(DataType::Type type ATTRIBUTE_UNUSED, bool is_instance)
- const override {
+ Location GetSetValueLocation([[maybe_unused]] DataType::Type type,
+ bool is_instance) const override {
return is_instance
? Location::RegisterLocation(RDX)
: Location::RegisterLocation(RSI);
}
- Location GetFpuLocation(DataType::Type type ATTRIBUTE_UNUSED) const override {
+ Location GetFpuLocation([[maybe_unused]] DataType::Type type) const override {
return Location::FpuRegisterLocation(XMM0);
}
@@ -502,9 +502,7 @@
block_labels_ = CommonInitializeLabels<Label>();
}
- bool NeedsTwoRegisters(DataType::Type type ATTRIBUTE_UNUSED) const override {
- return false;
- }
+ bool NeedsTwoRegisters([[maybe_unused]] DataType::Type type) const override { return false; }
// Check if the desired_string_load_kind is supported. If it is, return it,
// otherwise return a fall-back kind that should be used instead.