From 615e374252c634177b3c4b8d12f883a7101da732 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Mon, 6 Dec 2021 17:17:55 -0800 Subject: [PATCH] [NFC][MachineInstr] Rename some vars to conform to coding style --- llvm/include/llvm/CodeGen/MachineInstr.h | 14 +++++++------- llvm/lib/CodeGen/MachineInstr.cpp | 12 ++++++------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h index b7ae1cb..2893e13 100644 --- a/llvm/include/llvm/CodeGen/MachineInstr.h +++ b/llvm/include/llvm/CodeGen/MachineInstr.h @@ -249,7 +249,7 @@ private: PointerSumTypeMember> Info; - DebugLoc debugLoc; // Source line information. + DebugLoc DbgLoc; // Source line information. /// Unique instruction number. Used by DBG_INSTR_REFs to refer to the values /// defined by this instruction. @@ -267,7 +267,7 @@ private: /// This constructor create a MachineInstr and add the implicit operands. /// It reserves space for number of operands specified by /// MCInstrDesc. An explicit DebugLoc is supplied. - MachineInstr(MachineFunction &, const MCInstrDesc &tid, DebugLoc dl, + MachineInstr(MachineFunction &, const MCInstrDesc &TID, DebugLoc DL, bool NoImp = false); // MachineInstrs are pool-allocated and owned by MachineFunction. @@ -415,7 +415,7 @@ public: void unbundleFromSucc(); /// Returns the debug location id of this MachineInstr. - const DebugLoc &getDebugLoc() const { return debugLoc; } + const DebugLoc &getDebugLoc() const { return DbgLoc; } /// Return the operand containing the offset to be used if this DBG_VALUE /// instruction is indirect; will be an invalid register if this value is @@ -1733,13 +1733,13 @@ public: /// Replace the instruction descriptor (thus opcode) of /// the current instruction with a new one. - void setDesc(const MCInstrDesc &tid) { MCID = &tid; } + void setDesc(const MCInstrDesc &TID) { MCID = &TID; } /// Replace current source information with new such. /// Avoid using this, the constructor argument is preferable. - void setDebugLoc(DebugLoc dl) { - debugLoc = std::move(dl); - assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor"); + void setDebugLoc(DebugLoc DL) { + DbgLoc = std::move(DL); + assert(DbgLoc.hasTrivialDestructor() && "Expected trivial destructor"); } /// Erase an operand from an instruction, leaving it with one diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 284edda..85b266a 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -115,10 +115,10 @@ void MachineInstr::addImplicitDefUseOperands(MachineFunction &MF) { /// MachineInstr ctor - This constructor creates a MachineInstr and adds the /// implicit operands. It reserves space for the number of operands specified by /// the MCInstrDesc. -MachineInstr::MachineInstr(MachineFunction &MF, const MCInstrDesc &tid, - DebugLoc dl, bool NoImp) - : MCID(&tid), debugLoc(std::move(dl)), DebugInstrNum(0) { - assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor"); +MachineInstr::MachineInstr(MachineFunction &MF, const MCInstrDesc &TID, + DebugLoc DL, bool NoImp) + : MCID(&TID), DbgLoc(std::move(DL)), DebugInstrNum(0) { + assert(DbgLoc.hasTrivialDestructor() && "Expected trivial destructor"); // Reserve space for the expected number of operands. if (unsigned NumOps = MCID->getNumOperands() + @@ -135,9 +135,9 @@ MachineInstr::MachineInstr(MachineFunction &MF, const MCInstrDesc &tid, /// Does not copy the number from debug instruction numbering, to preserve /// uniqueness. MachineInstr::MachineInstr(MachineFunction &MF, const MachineInstr &MI) - : MCID(&MI.getDesc()), Info(MI.Info), debugLoc(MI.getDebugLoc()), + : MCID(&MI.getDesc()), Info(MI.Info), DbgLoc(MI.getDebugLoc()), DebugInstrNum(0) { - assert(debugLoc.hasTrivialDestructor() && "Expected trivial destructor"); + assert(DbgLoc.hasTrivialDestructor() && "Expected trivial destructor"); CapOperands = OperandCapacity::get(MI.getNumOperands()); Operands = MF.allocateOperandArray(CapOperands); -- 2.7.4