Use 'final' and 'override' specifiers directly in ART.
Remove all uses of macros 'FINAL' and 'OVERRIDE' and replace them with
'final' and 'override' specifiers. Remove all definitions of these
macros as well, which were located in these files:
- libartbase/base/macros.h
- test/913-heaps/heaps.cc
- test/ti-agent/ti_macros.h
ART is now using C++14; the 'final' and 'override' specifiers have
been introduced in C++11.
Test: mmma art
Change-Id: I256c7758155a71a2940ef2574925a44076feeebf
diff --git a/openjdkjvmti/ti_stack.cc b/openjdkjvmti/ti_stack.cc
index 318d98d..b6969af 100644
--- a/openjdkjvmti/ti_stack.cc
+++ b/openjdkjvmti/ti_stack.cc
@@ -128,7 +128,7 @@
start_result(0),
stop_result(0) {}
- void Run(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
auto frames_fn = [&](jvmtiFrameInfo info) {
frames.push_back(info);
};
@@ -195,7 +195,7 @@
DCHECK_GE(start_input, 0u);
}
- void Run(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
auto frames_fn = [&](jvmtiFrameInfo info) {
frame_buffer[index] = info;
++index;
@@ -287,7 +287,7 @@
GetAllStackTracesVectorClosure(size_t stop, Data* data_)
: barrier(0), stop_input(stop), data(data_) {}
- void Run(art::Thread* thread) OVERRIDE
+ void Run(art::Thread* thread) override
REQUIRES_SHARED(art::Locks::mutator_lock_)
REQUIRES(!data->mutex) {
art::Thread* self = art::Thread::Current();
@@ -678,7 +678,7 @@
public:
GetFrameCountClosure() : count(0) {}
- void Run(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
GetFrameCountVisitor visitor(self);
visitor.WalkStack(false);
@@ -759,7 +759,7 @@
public:
explicit GetLocationClosure(size_t n_in) : n(n_in), method(nullptr), dex_pc(0) {}
- void Run(art::Thread* self) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* self) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
GetLocationVisitor visitor(self, n);
visitor.WalkStack(false);
@@ -842,7 +842,7 @@
delete context_;
}
- bool VisitFrame() OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ bool VisitFrame() override REQUIRES_SHARED(art::Locks::mutator_lock_) {
art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
if (!GetMethod()->IsRuntimeMethod()) {
art::Monitor::VisitLocks(this, AppendOwnedMonitors, this);
@@ -867,7 +867,7 @@
}
void VisitRoot(art::mirror::Object* obj, const art::RootInfo& info ATTRIBUTE_UNUSED)
- OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ override REQUIRES_SHARED(art::Locks::mutator_lock_) {
for (const art::Handle<art::mirror::Object>& m : monitors) {
if (m.Get() == obj) {
return;
@@ -889,7 +889,7 @@
explicit MonitorInfoClosure(Fn handle_results)
: err_(OK), handle_results_(handle_results) {}
- void Run(art::Thread* target) OVERRIDE REQUIRES_SHARED(art::Locks::mutator_lock_) {
+ void Run(art::Thread* target) override REQUIRES_SHARED(art::Locks::mutator_lock_) {
art::Locks::mutator_lock_->AssertSharedHeld(art::Thread::Current());
// Find the monitors on the stack.
MonitorVisitor visitor(target);