Modernise code to use override specifier

Generated by clang-tidy, with IgnoreDestructors option enabled.

Test: m checkbuild
Bug: 116509795
Change-Id: I5dafa10c2cf605165581b8cf7dd2633ed101ed65
diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h
index 0289e9c..dde39d4 100644
--- a/compiler/optimizing/codegen_test_utils.h
+++ b/compiler/optimizing/codegen_test_utils.h
@@ -176,7 +176,7 @@
  public:
   InternalCodeAllocator() : size_(0) { }
 
-  virtual uint8_t* Allocate(size_t size) {
+  uint8_t* Allocate(size_t size) override {
     size_ = size;
     memory_.reset(new uint8_t[size]);
     return memory_.get();
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 4670b3f..fedad0c 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -2934,7 +2934,7 @@
   size_t ComputeHashCode() const override { return 0; }
 
   // The null constant representation is a 0-bit pattern.
-  virtual bool IsZeroBitPattern() const { return true; }
+  bool IsZeroBitPattern() const override { return true; }
 
   DECLARE_INSTRUCTION(NullConstant);
 
@@ -6316,7 +6316,7 @@
 
   bool CanBeMoved() const override { return true; }
 
-  bool InstructionDataEquals(const HInstruction* other) const;
+  bool InstructionDataEquals(const HInstruction* other) const override;
 
   size_t ComputeHashCode() const override { return type_index_.index_; }
 
diff --git a/compiler/optimizing/register_allocator_graph_color.h b/compiler/optimizing/register_allocator_graph_color.h
index 16131e1..f0e7e55 100644
--- a/compiler/optimizing/register_allocator_graph_color.h
+++ b/compiler/optimizing/register_allocator_graph_color.h
@@ -94,7 +94,7 @@
 
   void AllocateRegisters() override;
 
-  bool Validate(bool log_fatal_on_failure);
+  bool Validate(bool log_fatal_on_failure) override;
 
  private:
   // Collect all intervals and prepare for register allocation.
diff --git a/compiler/optimizing/scheduler_arm.h b/compiler/optimizing/scheduler_arm.h
index 875593b..4c7a3bb 100644
--- a/compiler/optimizing/scheduler_arm.h
+++ b/compiler/optimizing/scheduler_arm.h
@@ -55,7 +55,7 @@
       : codegen_(down_cast<CodeGeneratorARMType*>(codegen)) {}
 
   // Default visitor for instructions not handled specifically below.
-  void VisitInstruction(HInstruction* ATTRIBUTE_UNUSED) {
+  void VisitInstruction(HInstruction* ATTRIBUTE_UNUSED) override {
     last_visited_latency_ = kArmIntegerOpLatency;
   }
 
diff --git a/compiler/optimizing/scheduler_arm64.h b/compiler/optimizing/scheduler_arm64.h
index 7f6549d..ba5a743 100644
--- a/compiler/optimizing/scheduler_arm64.h
+++ b/compiler/optimizing/scheduler_arm64.h
@@ -58,7 +58,7 @@
 class SchedulingLatencyVisitorARM64 : public SchedulingLatencyVisitor {
  public:
   // Default visitor for instructions not handled specifically below.
-  void VisitInstruction(HInstruction* ATTRIBUTE_UNUSED) {
+  void VisitInstruction(HInstruction* ATTRIBUTE_UNUSED) override {
     last_visited_latency_ = kArm64IntegerOpLatency;
   }
 
diff --git a/compiler/utils/arm/jni_macro_assembler_arm_vixl.h b/compiler/utils/arm/jni_macro_assembler_arm_vixl.h
index 674bf12..0b1b6d2 100644
--- a/compiler/utils/arm/jni_macro_assembler_arm_vixl.h
+++ b/compiler/utils/arm/jni_macro_assembler_arm_vixl.h
@@ -188,7 +188,7 @@
 
   // Generate code to check if Thread::Current()->exception_ is non-null
   // and branch to a ExceptionSlowPath if it is.
-  void ExceptionPoll(ManagedRegister scratch, size_t stack_adjust);
+  void ExceptionPoll(ManagedRegister scratch, size_t stack_adjust) override;
 
   // Create a new label that can be used with Jump/Bind calls.
   std::unique_ptr<JNIMacroLabel> CreateLabel() override;
diff --git a/compiler/utils/arm64/assembler_arm64.h b/compiler/utils/arm64/assembler_arm64.h
index fdecab8..9e01a70 100644
--- a/compiler/utils/arm64/assembler_arm64.h
+++ b/compiler/utils/arm64/assembler_arm64.h
@@ -81,7 +81,7 @@
   const uint8_t* CodeBufferBaseAddress() const override;
 
   // Copy instructions out of assembly buffer into the given region of memory.
-  void FinalizeInstructions(const MemoryRegion& region);
+  void FinalizeInstructions(const MemoryRegion& region) override;
 
   void LoadRawPtr(ManagedRegister dest, ManagedRegister base, Offset offs);
 
diff --git a/compiler/utils/mips/assembler_mips.h b/compiler/utils/mips/assembler_mips.h
index 69189a4..a24071d 100644
--- a/compiler/utils/mips/assembler_mips.h
+++ b/compiler/utils/mips/assembler_mips.h
@@ -287,7 +287,7 @@
 
   size_t CodeSize() const override { return Assembler::CodeSize(); }
   size_t CodePosition() override;
-  DebugFrameOpCodeWriterForAssembler& cfi() { return Assembler::cfi(); }
+  DebugFrameOpCodeWriterForAssembler& cfi() override { return Assembler::cfi(); }
 
   virtual ~MipsAssembler() {
     for (auto& branch : branches_) {
@@ -1372,7 +1372,7 @@
   void FinalizeCode() override;
 
   // Emit branches and finalize all instructions.
-  void FinalizeInstructions(const MemoryRegion& region);
+  void FinalizeInstructions(const MemoryRegion& region) override;
 
   // Returns the (always-)current location of a label (can be used in class CodeGeneratorMIPS,
   // must be used instead of MipsLabel::GetPosition()).
diff --git a/compiler/utils/mips64/assembler_mips64.h b/compiler/utils/mips64/assembler_mips64.h
index 2f991e9..b331cee 100644
--- a/compiler/utils/mips64/assembler_mips64.h
+++ b/compiler/utils/mips64/assembler_mips64.h
@@ -440,7 +440,7 @@
   }
 
   size_t CodeSize() const override { return Assembler::CodeSize(); }
-  DebugFrameOpCodeWriterForAssembler& cfi() { return Assembler::cfi(); }
+  DebugFrameOpCodeWriterForAssembler& cfi() override { return Assembler::cfi(); }
 
   // Emit Machine Instructions.
   void Addu(GpuRegister rd, GpuRegister rs, GpuRegister rt);
@@ -1437,7 +1437,7 @@
   void FinalizeCode() override;
 
   // Emit branches and finalize all instructions.
-  void FinalizeInstructions(const MemoryRegion& region);
+  void FinalizeInstructions(const MemoryRegion& region) override;
 
   // Returns the (always-)current location of a label (can be used in class CodeGeneratorMIPS64,
   // must be used instead of Mips64Label::GetPosition()).
diff --git a/compiler/utils/x86_64/jni_macro_assembler_x86_64.h b/compiler/utils/x86_64/jni_macro_assembler_x86_64.h
index 465ebbe..4c2fd8f 100644
--- a/compiler/utils/x86_64/jni_macro_assembler_x86_64.h
+++ b/compiler/utils/x86_64/jni_macro_assembler_x86_64.h
@@ -91,7 +91,7 @@
   void LoadRawPtrFromThread(ManagedRegister dest, ThreadOffset64 offs) override;
 
   // Copying routines
-  void Move(ManagedRegister dest, ManagedRegister src, size_t size);
+  void Move(ManagedRegister dest, ManagedRegister src, size_t size) override;
 
   void CopyRawPtrFromThread(FrameOffset fr_offs,
                             ThreadOffset64 thr_offs,