[llvm] 615e374 - [NFC][MachineInstr] Rename some vars to conform to coding style
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 6 17:19:20 PST 2021
Author: Mircea Trofin
Date: 2021-12-06T17:19:11-08:00
New Revision: 615e374252c634177b3c4b8d12f883a7101da732
URL: https://github.com/llvm/llvm-project/commit/615e374252c634177b3c4b8d12f883a7101da732
DIFF: https://github.com/llvm/llvm-project/commit/615e374252c634177b3c4b8d12f883a7101da732.diff
LOG: [NFC][MachineInstr] Rename some vars to conform to coding style
Added:
Modified:
llvm/include/llvm/CodeGen/MachineInstr.h
llvm/lib/CodeGen/MachineInstr.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h
index b7ae1cba04f4e..2893e138a95ca 100644
--- a/llvm/include/llvm/CodeGen/MachineInstr.h
+++ b/llvm/include/llvm/CodeGen/MachineInstr.h
@@ -249,7 +249,7 @@ class MachineInstr
PointerSumTypeMember<EIIK_OutOfLine, ExtraInfo *>>
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 @@ class MachineInstr
/// 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 @@ class MachineInstr
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 @@ class MachineInstr
/// 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 284eddaa03cb6..85b266afceefe 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);
More information about the llvm-commits
mailing list