From bbc6e7edb5fca4a61ac53dd9bce79cb4f0bb3403 Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Fri, 24 Aug 2018 16:58:47 +0100 Subject: 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 --- runtime/quick_exception_handler.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'runtime/quick_exception_handler.cc') diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 7f5717f736..7b92151c66 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -58,7 +58,7 @@ QuickExceptionHandler::QuickExceptionHandler(Thread* self, bool is_deoptimizatio full_fragment_done_(false) {} // Finds catch handler. -class CatchBlockStackVisitor FINAL : public StackVisitor { +class CatchBlockStackVisitor final : public StackVisitor { public: CatchBlockStackVisitor(Thread* self, Context* context, @@ -72,7 +72,7 @@ class CatchBlockStackVisitor FINAL : public StackVisitor { skip_frames_(skip_frames) { } - bool VisitFrame() OVERRIDE REQUIRES_SHARED(Locks::mutator_lock_) { + bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) { ArtMethod* method = GetMethod(); exception_handler_->SetHandlerFrameDepth(GetFrameDepth()); if (method == nullptr) { @@ -350,7 +350,7 @@ void QuickExceptionHandler::SetCatchEnvironmentForOptimizedHandler(StackVisitor* } // Prepares deoptimization. -class DeoptimizeStackVisitor FINAL : public StackVisitor { +class DeoptimizeStackVisitor final : public StackVisitor { public: DeoptimizeStackVisitor(Thread* self, Context* context, @@ -399,7 +399,7 @@ class DeoptimizeStackVisitor FINAL : public StackVisitor { } } - bool VisitFrame() OVERRIDE REQUIRES_SHARED(Locks::mutator_lock_) { + bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) { exception_handler_->SetHandlerFrameDepth(GetFrameDepth()); ArtMethod* method = GetMethod(); if (method == nullptr || single_frame_done_) { @@ -667,14 +667,14 @@ void QuickExceptionHandler::DoLongJump(bool smash_caller_saves) { } // Prints out methods with their type of frame. -class DumpFramesWithTypeStackVisitor FINAL : public StackVisitor { +class DumpFramesWithTypeStackVisitor final : public StackVisitor { public: explicit DumpFramesWithTypeStackVisitor(Thread* self, bool show_details = false) REQUIRES_SHARED(Locks::mutator_lock_) : StackVisitor(self, nullptr, StackVisitor::StackWalkKind::kIncludeInlinedFrames), show_details_(show_details) {} - bool VisitFrame() OVERRIDE REQUIRES_SHARED(Locks::mutator_lock_) { + bool VisitFrame() override REQUIRES_SHARED(Locks::mutator_lock_) { ArtMethod* method = GetMethod(); if (show_details_) { LOG(INFO) << "|> pc = " << std::hex << GetCurrentQuickFramePc(); -- cgit v1.2.3-59-g8ed1b