Skip to content

Commit ca3d4df

Browse files
authored
[Metadata] Make range boundary variables unsigned (NFC) (#99338)
They should be unsigned because the source and target value are too.
1 parent 613d2c3 commit ca3d4df

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/IR/Metadata.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,12 +1287,12 @@ MDNode *MDNode::getMostGenericRange(MDNode *A, MDNode *B) {
12871287
return A;
12881288

12891289
// First, walk both lists in order of the lower boundary of each interval.
1290-
// At each step, try to merge the new interval to the last one we adedd.
1290+
// At each step, try to merge the new interval to the last one we added.
12911291
SmallVector<ConstantInt *, 4> EndPoints;
1292-
int AI = 0;
1293-
int BI = 0;
1294-
int AN = A->getNumOperands() / 2;
1295-
int BN = B->getNumOperands() / 2;
1292+
unsigned AI = 0;
1293+
unsigned BI = 0;
1294+
unsigned AN = A->getNumOperands() / 2;
1295+
unsigned BN = B->getNumOperands() / 2;
12961296
while (AI < AN && BI < BN) {
12971297
ConstantInt *ALow = mdconst::extract<ConstantInt>(A->getOperand(2 * AI));
12981298
ConstantInt *BLow = mdconst::extract<ConstantInt>(B->getOperand(2 * BI));

0 commit comments

Comments
 (0)