[llvm] r322541 - [CodeGen][NFC] Correct case for printSubRegIdx
Francis Visoiu Mistrih via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 16 02:53:11 PST 2018
Author: thegameg
Date: Tue Jan 16 02:53:11 2018
New Revision: 322541
URL: http://llvm.org/viewvc/llvm-project?rev=322541&view=rev
Log:
[CodeGen][NFC] Correct case for printSubRegIdx
Modified:
llvm/trunk/include/llvm/CodeGen/MachineOperand.h
llvm/trunk/lib/CodeGen/MIRPrinter.cpp
llvm/trunk/lib/CodeGen/MachineInstr.cpp
llvm/trunk/lib/CodeGen/MachineOperand.cpp
llvm/trunk/unittests/CodeGen/MachineOperandTest.cpp
Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=322541&r1=322540&r2=322541&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Tue Jan 16 02:53:11 2018
@@ -238,7 +238,7 @@ public:
/// MO_Immediate operands can also be subreg idices. If it's the case, the
/// subreg index name will be printed. MachineInstr::isOperandSubregIdx can be
/// called to check this.
- static void printSubregIdx(raw_ostream &OS, uint64_t Index,
+ static void printSubRegIdx(raw_ostream &OS, uint64_t Index,
const TargetRegisterInfo *TRI);
/// Print operand target flags.
Modified: llvm/trunk/lib/CodeGen/MIRPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRPrinter.cpp?rev=322541&r1=322540&r2=322541&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MIRPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRPrinter.cpp Tue Jan 16 02:53:11 2018
@@ -744,7 +744,7 @@ void MIPrinter::print(const MachineInstr
case MachineOperand::MO_Immediate:
if (MI.isOperandSubregIdx(OpIdx)) {
MachineOperand::printTargetFlags(OS, Op);
- MachineOperand::printSubregIdx(OS, Op.getImm(), TRI);
+ MachineOperand::printSubRegIdx(OS, Op.getImm(), TRI);
break;
}
LLVM_FALLTHROUGH;
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=322541&r1=322540&r2=322541&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Jan 16 02:53:11 2018
@@ -1397,7 +1397,7 @@ void MachineInstr::print(raw_ostream &OS
LLT TypeToPrint = MRI ? getTypeToPrint(i, PrintedTypes, *MRI) : LLT{};
unsigned TiedOperandIdx = getTiedOperandIdx(i);
if (MO.isImm() && isOperandSubregIdx(i))
- MachineOperand::printSubregIdx(OS, MO.getImm(), TRI);
+ MachineOperand::printSubRegIdx(OS, MO.getImm(), TRI);
else
MO.print(OS, MST, TypeToPrint, /*PrintDef=*/true,
ShouldPrintRegisterTies, TiedOperandIdx, TRI, IntrinsicInfo);
Modified: llvm/trunk/lib/CodeGen/MachineOperand.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineOperand.cpp?rev=322541&r1=322540&r2=322541&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineOperand.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineOperand.cpp Tue Jan 16 02:53:11 2018
@@ -440,7 +440,7 @@ static void printIRBlockReference(raw_os
OS << "<unknown>";
}
-void MachineOperand::printSubregIdx(raw_ostream &OS, uint64_t Index,
+void MachineOperand::printSubRegIdx(raw_ostream &OS, uint64_t Index,
const TargetRegisterInfo *TRI) {
OS << "%subreg.";
if (TRI)
Modified: llvm/trunk/unittests/CodeGen/MachineOperandTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CodeGen/MachineOperandTest.cpp?rev=322541&r1=322540&r2=322541&view=diff
==============================================================================
--- llvm/trunk/unittests/CodeGen/MachineOperandTest.cpp (original)
+++ llvm/trunk/unittests/CodeGen/MachineOperandTest.cpp Tue Jan 16 02:53:11 2018
@@ -119,7 +119,7 @@ TEST(MachineOperandTest, PrintSubRegInde
std::string str;
raw_string_ostream OS(str);
ModuleSlotTracker DummyMST(nullptr);
- MachineOperand::printSubregIdx(OS, MO.getImm(), nullptr);
+ MachineOperand::printSubRegIdx(OS, MO.getImm(), nullptr);
ASSERT_TRUE(OS.str() == "%subreg.3");
}
More information about the llvm-commits
mailing list