summaryrefslogtreecommitdiff
path: root/unittests/CodeGen/MachineOperandTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/CodeGen/MachineOperandTest.cpp')
-rw-r--r--unittests/CodeGen/MachineOperandTest.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/unittests/CodeGen/MachineOperandTest.cpp b/unittests/CodeGen/MachineOperandTest.cpp
index 78a20b836486..53ec5aed8189 100644
--- a/unittests/CodeGen/MachineOperandTest.cpp
+++ b/unittests/CodeGen/MachineOperandTest.cpp
@@ -80,7 +80,7 @@ TEST(MachineOperandTest, PrintSubReg) {
std::string str;
raw_string_ostream OS(str);
MO.print(OS, /*TRI=*/nullptr, /*IntrinsicInfo=*/nullptr);
- ASSERT_TRUE(OS.str() == "%physreg1.subreg5");
+ ASSERT_TRUE(OS.str() == "$physreg1.subreg5");
}
TEST(MachineOperandTest, PrintCImm) {
@@ -118,8 +118,7 @@ TEST(MachineOperandTest, PrintSubRegIndex) {
// TRI and IntrinsicInfo we can print the operand as a subreg index.
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");
}
@@ -215,7 +214,7 @@ TEST(MachineOperandTest, PrintExternalSymbol) {
{
raw_string_ostream OS(str);
MO.print(OS, /*TRI=*/nullptr, /*IntrinsicInfo=*/nullptr);
- ASSERT_TRUE(OS.str() == "$foo");
+ ASSERT_TRUE(OS.str() == "&foo");
}
str.clear();
@@ -225,7 +224,7 @@ TEST(MachineOperandTest, PrintExternalSymbol) {
{
raw_string_ostream OS(str);
MO.print(OS, /*TRI=*/nullptr, /*IntrinsicInfo=*/nullptr);
- ASSERT_TRUE(OS.str() == "$foo + 12");
+ ASSERT_TRUE(OS.str() == "&foo + 12");
}
str.clear();
@@ -235,7 +234,7 @@ TEST(MachineOperandTest, PrintExternalSymbol) {
{
raw_string_ostream OS(str);
MO.print(OS, /*TRI=*/nullptr, /*IntrinsicInfo=*/nullptr);
- ASSERT_TRUE(OS.str() == "$foo - 12");
+ ASSERT_TRUE(OS.str() == "&foo - 12");
}
}
@@ -296,7 +295,7 @@ TEST(MachineOperandTest, PrintMetadata) {
LLVMContext Ctx;
Module M("MachineOperandMDNodeTest", Ctx);
NamedMDNode *MD = M.getOrInsertNamedMetadata("namedmd");
- ModuleSlotTracker DummyMST(&M);
+ ModuleSlotTracker MST(&M);
Metadata *MDS = MDString::get(Ctx, "foo");
MDNode *Node = MDNode::get(Ctx, MDS);
MD->addOperand(Node);
@@ -312,7 +311,8 @@ TEST(MachineOperandTest, PrintMetadata) {
std::string str;
// Print a MachineOperand containing a metadata node.
raw_string_ostream OS(str);
- MO.print(OS, DummyMST, LLT{}, false, false, 0, /*TRI=*/nullptr,
+ MO.print(OS, MST, LLT{}, /*PrintDef=*/false, /*IsStandalone=*/false,
+ /*ShouldPrintRegisterTies=*/false, 0, /*TRI=*/nullptr,
/*IntrinsicInfo=*/nullptr);
ASSERT_TRUE(OS.str() == "!0");
}