Skip to content

Commit

Permalink
[IR][test] Fix warning in MMRA tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-vh committed Apr 24, 2024
1 parent e1aa162 commit a682f52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/unittests/IR/MemoryModelRelaxationAnnotationsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ TEST(MMRATest, GetMD) {
EXPECT_EQ(MMRAMetadata::getMD(Ctx, {}), nullptr);

MDTuple *SingleMD = MMRAMetadata::getMD(Ctx, {{"foo", "bar"}});
EXPECT_EQ(SingleMD->getNumOperands(), 2);
EXPECT_EQ(SingleMD->getNumOperands(), 2u);
EXPECT_EQ(cast<MDString>(SingleMD->getOperand(0))->getString(), "foo");
EXPECT_EQ(cast<MDString>(SingleMD->getOperand(1))->getString(), "bar");

MDTuple *MultiMD = MMRAMetadata::getMD(Ctx, {{"foo", "bar"}, {"bux", "qux"}});
EXPECT_EQ(MultiMD->getNumOperands(), 2);
EXPECT_EQ(MultiMD->getNumOperands(), 2u);

MDTuple *FooBar = cast<MDTuple>(MultiMD->getOperand(0));
EXPECT_EQ(cast<MDString>(FooBar->getOperand(0))->getString(), "foo");
Expand Down

0 comments on commit a682f52

Please sign in to comment.