diff options
author | 2019-03-24 02:47:16 -0700 | |
---|---|---|
committer | 2019-03-29 18:18:00 +0000 | |
commit | 39402548017c99f9b33afaa851f412371013e911 (patch) | |
tree | 80c4d53cb7ae12ab9f4800cb358e53d5109593da /compiler | |
parent | 2fde9bdc252e209d722f83410f2ced42ab73e8a4 (diff) |
Modernise code to use override specifier
Generated by clang-tidy, with IgnoreDestructors option enabled.
Test: m checkbuild
Bug: 116509795
Change-Id: I5dafa10c2cf605165581b8cf7dd2633ed101ed65
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/optimizing/codegen_test_utils.h | 2 | ||||
-rw-r--r-- | compiler/optimizing/nodes.h | 4 | ||||
-rw-r--r-- | compiler/optimizing/register_allocator_graph_color.h | 2 | ||||
-rw-r--r-- | compiler/optimizing/scheduler_arm.h | 2 | ||||
-rw-r--r-- | compiler/optimizing/scheduler_arm64.h | 2 | ||||
-rw-r--r-- | compiler/utils/arm/jni_macro_assembler_arm_vixl.h | 2 | ||||
-rw-r--r-- | compiler/utils/arm64/assembler_arm64.h | 2 | ||||
-rw-r--r-- | compiler/utils/mips/assembler_mips.h | 4 | ||||
-rw-r--r-- | compiler/utils/mips64/assembler_mips64.h | 4 | ||||
-rw-r--r-- | compiler/utils/x86_64/jni_macro_assembler_x86_64.h | 2 |
10 files changed, 13 insertions, 13 deletions
diff --git a/compiler/optimizing/codegen_test_utils.h b/compiler/optimizing/codegen_test_utils.h index 0289e9c4a7..dde39d46f3 100644 --- a/compiler/optimizing/codegen_test_utils.h +++ b/compiler/optimizing/codegen_test_utils.h @@ -176,7 +176,7 @@ class InternalCodeAllocator : public CodeAllocator { 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 4670b3f6ff..fedad0c69a 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -2934,7 +2934,7 @@ class HNullConstant final : public HConstant { 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 @@ class HLoadClass final : public HInstruction { 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 16131e1c71..f0e7e55863 100644 --- a/compiler/optimizing/register_allocator_graph_color.h +++ b/compiler/optimizing/register_allocator_graph_color.h @@ -94,7 +94,7 @@ class RegisterAllocatorGraphColor : public RegisterAllocator { 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 875593bbf0..4c7a3bb4d6 100644 --- a/compiler/optimizing/scheduler_arm.h +++ b/compiler/optimizing/scheduler_arm.h @@ -55,7 +55,7 @@ class SchedulingLatencyVisitorARM : public SchedulingLatencyVisitor { : 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 7f6549dcfe..ba5a743545 100644 --- a/compiler/optimizing/scheduler_arm64.h +++ b/compiler/optimizing/scheduler_arm64.h @@ -58,7 +58,7 @@ static constexpr uint32_t kArm64SIMDTypeConversionInt2FPLatency = 10; 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 674bf12f89..0b1b6d2ba9 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 @@ class ArmVIXLJNIMacroAssembler final // 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 fdecab8251..9e01a70ea9 100644 --- a/compiler/utils/arm64/assembler_arm64.h +++ b/compiler/utils/arm64/assembler_arm64.h @@ -81,7 +81,7 @@ class Arm64Assembler final : public Assembler { 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 69189a49aa..a24071d694 100644 --- a/compiler/utils/mips/assembler_mips.h +++ b/compiler/utils/mips/assembler_mips.h @@ -287,7 +287,7 @@ class MipsAssembler final : public Assembler, public JNIMacroAssembler<PointerSi 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 @@ class MipsAssembler final : public Assembler, public JNIMacroAssembler<PointerSi 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 2f991e92c5..b331cee33d 100644 --- a/compiler/utils/mips64/assembler_mips64.h +++ b/compiler/utils/mips64/assembler_mips64.h @@ -440,7 +440,7 @@ class Mips64Assembler final : public Assembler, public JNIMacroAssembler<Pointer } 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 @@ class Mips64Assembler final : public Assembler, public JNIMacroAssembler<Pointer 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 465ebbe6c3..4c2fd8fc73 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 @@ class X86_64JNIMacroAssembler final : public JNIMacroAssemblerFwd<X86_64Assemble 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, |