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/dex2oat/linker/elf_writer_quick.cc b/dex2oat/linker/elf_writer_quick.cc
index 4e7d636..194a0e1 100644
--- a/dex2oat/linker/elf_writer_quick.cc
+++ b/dex2oat/linker/elf_writer_quick.cc
@@ -94,35 +94,35 @@
};
template <typename ElfTypes>
-class ElfWriterQuick FINAL : public ElfWriter {
+class ElfWriterQuick final : public ElfWriter {
public:
ElfWriterQuick(const CompilerOptions& compiler_options,
File* elf_file);
~ElfWriterQuick();
- void Start() OVERRIDE;
+ void Start() override;
void PrepareDynamicSection(size_t rodata_size,
size_t text_size,
size_t data_bimg_rel_ro_size,
size_t bss_size,
size_t bss_methods_offset,
size_t bss_roots_offset,
- size_t dex_section_size) OVERRIDE;
- void PrepareDebugInfo(const debug::DebugInfo& debug_info) OVERRIDE;
- OutputStream* StartRoData() OVERRIDE;
- void EndRoData(OutputStream* rodata) OVERRIDE;
- OutputStream* StartText() OVERRIDE;
- void EndText(OutputStream* text) OVERRIDE;
- OutputStream* StartDataBimgRelRo() OVERRIDE;
- void EndDataBimgRelRo(OutputStream* data_bimg_rel_ro) OVERRIDE;
- void WriteDynamicSection() OVERRIDE;
- void WriteDebugInfo(const debug::DebugInfo& debug_info) OVERRIDE;
- bool StripDebugInfo() OVERRIDE;
- bool End() OVERRIDE;
+ size_t dex_section_size) override;
+ void PrepareDebugInfo(const debug::DebugInfo& debug_info) override;
+ OutputStream* StartRoData() override;
+ void EndRoData(OutputStream* rodata) override;
+ OutputStream* StartText() override;
+ void EndText(OutputStream* text) override;
+ OutputStream* StartDataBimgRelRo() override;
+ void EndDataBimgRelRo(OutputStream* data_bimg_rel_ro) override;
+ void WriteDynamicSection() override;
+ void WriteDebugInfo(const debug::DebugInfo& debug_info) override;
+ bool StripDebugInfo() override;
+ bool End() override;
- virtual OutputStream* GetStream() OVERRIDE;
+ virtual OutputStream* GetStream() override;
- size_t GetLoadedSize() OVERRIDE;
+ size_t GetLoadedSize() override;
static void EncodeOatPatches(const std::vector<uintptr_t>& locations,
std::vector<uint8_t>* buffer);