Skip to content

Commit 9026f35

Browse files
committed
[NFC] Fix int-compared-with-unsigned warnings
This is a follow-up to 7d77bbe where I added some incompatible comparisons, this should clear: https://lab.llvm.org/buildbot/#/builders/57/builds/30951
1 parent eac11c5 commit 9026f35

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

llvm/unittests/IR/DebugInfoTest.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ TEST(MetadataTest, ConvertDbgToDPValue) {
848848

849849
// Clone them onto the second marker -- should allocate new DPVs.
850850
RetInst->DbgMarker->cloneDebugInfoFrom(FirstInst->DbgMarker, std::nullopt, false);
851-
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.size(), 2);
851+
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.size(), 2u);
852852
ItCount = 0;
853853
// Check these things store the same information; but that they're not the same
854854
// objects.
@@ -863,12 +863,12 @@ TEST(MetadataTest, ConvertDbgToDPValue) {
863863
}
864864

865865
RetInst->DbgMarker->dropDPValues();
866-
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.size(), 0);
866+
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.size(), 0u);
867867

868868
// Try cloning one single DPValue.
869869
auto DIIt = std::next(FirstInst->DbgMarker->getDbgValueRange().begin());
870870
RetInst->DbgMarker->cloneDebugInfoFrom(FirstInst->DbgMarker, DIIt, false);
871-
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.size(), 1);
871+
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.size(), 1u);
872872
// The second DPValue should have been cloned; it should have the same values
873873
// as DPV1.
874874
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.begin()->getRawLocation(),
@@ -879,7 +879,7 @@ TEST(MetadataTest, ConvertDbgToDPValue) {
879879
// "Aborb" a DPMarker: this means pretend that the instruction it's attached
880880
// to is disappearing so it needs to be transferred into "this" marker.
881881
RetInst->DbgMarker->absorbDebugValues(*FirstInst->DbgMarker, true);
882-
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.size(), 2);
882+
EXPECT_EQ(RetInst->DbgMarker->StoredDPValues.size(), 2u);
883883
// Should be the DPV1 and DPV2 objects.
884884
ItCount = 0;
885885
for (DPValue &Item : RetInst->DbgMarker->getDbgValueRange()) {
@@ -900,7 +900,7 @@ TEST(MetadataTest, ConvertDbgToDPValue) {
900900

901901
DPMarker *EndMarker = ExitBlock->getTrailingDPValues();
902902
ASSERT_NE(EndMarker, nullptr);
903-
EXPECT_EQ(EndMarker->StoredDPValues.size(), 2);
903+
EXPECT_EQ(EndMarker->StoredDPValues.size(), 2u);
904904
// Test again that it's those two DPValues, DPV1 and DPV2.
905905
ItCount = 0;
906906
for (DPValue &Item : EndMarker->getDbgValueRange()) {
@@ -981,7 +981,7 @@ TEST(MetadataTest, DPValueConversionRoutines) {
981981

982982
// There should be a DPMarker on each of the two instructions in the entry
983983
// block, each containing one DPValue.
984-
EXPECT_EQ(BB1->size(), 2);
984+
EXPECT_EQ(BB1->size(), 2u);
985985
Instruction *FirstInst = &BB1->front();
986986
Instruction *SecondInst = FirstInst->getNextNode();
987987
ASSERT_TRUE(FirstInst->DbgMarker);
@@ -990,13 +990,13 @@ TEST(MetadataTest, DPValueConversionRoutines) {
990990
EXPECT_EQ(FirstInst, FirstInst->DbgMarker->MarkedInstr);
991991
EXPECT_EQ(SecondInst, SecondInst->DbgMarker->MarkedInstr);
992992

993-
EXPECT_EQ(FirstInst->DbgMarker->StoredDPValues.size(), 1);
993+
EXPECT_EQ(FirstInst->DbgMarker->StoredDPValues.size(), 1u);
994994
DPValue *DPV1 = &*FirstInst->DbgMarker->getDbgValueRange().begin();
995995
EXPECT_EQ(DPV1->getMarker(), FirstInst->DbgMarker);
996996
// Should point at %a, an argument.
997997
EXPECT_TRUE(isa<Argument>(DPV1->getVariableLocationOp(0)));
998998

999-
EXPECT_EQ(SecondInst->DbgMarker->StoredDPValues.size(), 1);
999+
EXPECT_EQ(SecondInst->DbgMarker->StoredDPValues.size(), 1u);
10001000
DPValue *DPV2 = &*SecondInst->DbgMarker->getDbgValueRange().begin();
10011001
EXPECT_EQ(DPV2->getMarker(), SecondInst->DbgMarker);
10021002
// Should point at FirstInst.
@@ -1031,7 +1031,7 @@ TEST(MetadataTest, DPValueConversionRoutines) {
10311031
EXPECT_FALSE(F->IsNewDbgInfoFormat);
10321032
EXPECT_FALSE(BB1->IsNewDbgInfoFormat);
10331033

1034-
EXPECT_EQ(BB1->size(), 4);
1034+
EXPECT_EQ(BB1->size(), 4u);
10351035
ASSERT_TRUE(isa<DbgValueInst>(BB1->front()));
10361036
DbgValueInst *DVI1 = cast<DbgValueInst>(&BB1->front());
10371037
// These dbg.values should still point at the same places.

0 commit comments

Comments
 (0)