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 --- compiler/dex/quick_compiler_callbacks.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'compiler/dex/quick_compiler_callbacks.h') diff --git a/compiler/dex/quick_compiler_callbacks.h b/compiler/dex/quick_compiler_callbacks.h index 8a07e9c12c..b7117bd223 100644 --- a/compiler/dex/quick_compiler_callbacks.h +++ b/compiler/dex/quick_compiler_callbacks.h @@ -26,7 +26,7 @@ class CompilerDriver; class DexFile; class VerificationResults; -class QuickCompilerCallbacks FINAL : public CompilerCallbacks { +class QuickCompilerCallbacks final : public CompilerCallbacks { public: explicit QuickCompilerCallbacks(CompilerCallbacks::CallbackMode mode) : CompilerCallbacks(mode), dex_files_(nullptr) {} @@ -34,20 +34,20 @@ class QuickCompilerCallbacks FINAL : public CompilerCallbacks { ~QuickCompilerCallbacks() { } void MethodVerified(verifier::MethodVerifier* verifier) - REQUIRES_SHARED(Locks::mutator_lock_) OVERRIDE; + REQUIRES_SHARED(Locks::mutator_lock_) override; - void ClassRejected(ClassReference ref) OVERRIDE; + void ClassRejected(ClassReference ref) override; // We are running in an environment where we can call patchoat safely so we should. - bool IsRelocationPossible() OVERRIDE { + bool IsRelocationPossible() override { return true; } - verifier::VerifierDeps* GetVerifierDeps() const OVERRIDE { + verifier::VerifierDeps* GetVerifierDeps() const override { return verifier_deps_.get(); } - void SetVerifierDeps(verifier::VerifierDeps* deps) OVERRIDE { + void SetVerifierDeps(verifier::VerifierDeps* deps) override { verifier_deps_.reset(deps); } @@ -55,18 +55,18 @@ class QuickCompilerCallbacks FINAL : public CompilerCallbacks { verification_results_ = verification_results; } - ClassStatus GetPreviousClassState(ClassReference ref) OVERRIDE; + ClassStatus GetPreviousClassState(ClassReference ref) override; void SetDoesClassUnloading(bool does_class_unloading, CompilerDriver* compiler_driver) - OVERRIDE { + override { does_class_unloading_ = does_class_unloading; compiler_driver_ = compiler_driver; DCHECK(!does_class_unloading || compiler_driver_ != nullptr); } - void UpdateClassState(ClassReference ref, ClassStatus state) OVERRIDE; + void UpdateClassState(ClassReference ref, ClassStatus state) override; - bool CanUseOatStatusForVerification(mirror::Class* klass) OVERRIDE + bool CanUseOatStatusForVerification(mirror::Class* klass) override REQUIRES_SHARED(Locks::mutator_lock_); void SetDexFiles(const std::vector* dex_files) { -- cgit v1.2.3-59-g8ed1b