[CodeGen][NFC] Correct case for printSubRegIdx

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@322541 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Francis Visoiu Mistrih
2018-01-16 10:53:11 +00:00
parent 262e25ddf8
commit 19988dd44d
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -744,7 +744,7 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx,
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;
+1 -1
View File
@@ -1397,7 +1397,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST,
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);
+1 -1
View File
@@ -440,7 +440,7 @@ static void printIRBlockReference(raw_ostream &OS, const BasicBlock &BB,
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)
+1 -1
View File
@@ -119,7 +119,7 @@ TEST(MachineOperandTest, PrintSubRegIndex) {
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");
}