diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index 3aec7140510a6d..ae5f5de142328b 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -1287,12 +1287,12 @@ MDNode *MDNode::getMostGenericRange(MDNode *A, MDNode *B) { return A; // First, walk both lists in order of the lower boundary of each interval. - // At each step, try to merge the new interval to the last one we adedd. + // At each step, try to merge the new interval to the last one we added. SmallVector EndPoints; - int AI = 0; - int BI = 0; - int AN = A->getNumOperands() / 2; - int BN = B->getNumOperands() / 2; + unsigned AI = 0; + unsigned BI = 0; + unsigned AN = A->getNumOperands() / 2; + unsigned BN = B->getNumOperands() / 2; while (AI < AN && BI < BN) { ConstantInt *ALow = mdconst::extract(A->getOperand(2 * AI)); ConstantInt *BLow = mdconst::extract(B->getOperand(2 * BI));