Fix -Werror build with clang-cl.
authorZachary Turner <zturner@google.com>
Fri, 11 Nov 2016 23:58:11 +0000 (23:58 +0000)
committerZachary Turner <zturner@google.com>
Fri, 11 Nov 2016 23:58:11 +0000 (23:58 +0000)
llvm-svn: 286683

llvm/lib/IR/AsmWriter.cpp

index 7334c98..5eb93ce 100644 (file)
@@ -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 << ' ';