diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 7334c988f290..5eb93ceda322 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -1330,7 +1330,7 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV, } for (User::const_op_iterator OI=CE->op_begin(); OI != CE->op_end(); ++OI) { - if (InRangeOp && (OI - CE->op_begin()) == *InRangeOp) + if (InRangeOp && unsigned(OI - CE->op_begin()) == *InRangeOp) Out << "inrange "; TypePrinter.print((*OI)->getType(), Out); Out << ' ';