From 36b5b862c8ab2f75606e23466a3c758ff6d9358b Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Sat, 29 Aug 2026 00:24:17 +0800 Subject: [CodeGen] Apply LLVM declaration style --- backend/include/rcc/CodeGen/GlobalISel/InstructionSelector.h | 2 +- backend/lib/CodeGen/GlobalISel/LegalizerHelper.cpp | 2 +- backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/include/rcc/CodeGen/GlobalISel/InstructionSelector.h b/backend/include/rcc/CodeGen/GlobalISel/InstructionSelector.h index 70771bb..8e5b56d 100644 --- a/backend/include/rcc/CodeGen/GlobalISel/InstructionSelector.h +++ b/backend/include/rcc/CodeGen/GlobalISel/InstructionSelector.h @@ -14,7 +14,7 @@ class TargetDescription; class InstructionSelector : public GIMatchTableExecutor { public: - virtual ~InstructionSelector() = default; + ~InstructionSelector() override = default; [[nodiscard]] virtual Expected select(MachineInstr &Instruction, MachineFunction &Function, const TargetDescription &Target) const = 0; diff --git a/backend/lib/CodeGen/GlobalISel/LegalizerHelper.cpp b/backend/lib/CodeGen/GlobalISel/LegalizerHelper.cpp index d252a13..8bf6e80 100644 --- a/backend/lib/CodeGen/GlobalISel/LegalizerHelper.cpp +++ b/backend/lib/CodeGen/GlobalISel/LegalizerHelper.cpp @@ -6428,7 +6428,7 @@ Expected LegalizerHelper::libcall(MachineInstr &Instruction) { } const GenericOpcode Generic = static_cast(Instruction.opcode().value()); - auto DestinationOperand = Instruction.operandAt(0); + auto *DestinationOperand = Instruction.operandAt(0); const Register *Destination = DestinationOperand == nullptr ? nullptr : DestinationOperand->getIf(); if (Destination == nullptr || !DestinationOperand->isDef()) { diff --git a/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h b/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h index ba78c52..36d7486 100644 --- a/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h +++ b/backend/lib/Target/RISCV/GISel/RISCVLegalizerInfo.h @@ -7,7 +7,7 @@ namespace rcc { class MachineIRBuilder; -} +} // namespace rcc namespace rcc::riscv { -- cgit v1.2.3