Fix Visual C++ errors C2784, C2780, C2782 after r237678.
[oota-llvm.git] / lib / IR / ConstantFold.cpp
index 16b113df1b80ed51cf4fb93eaac7c91a338ac896..178612c6a3e7234e0fc3eac8f36a3881b8557f44 100644 (file)
@@ -1057,7 +1057,8 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
 
           if (GVAlign > 1) {
             unsigned DstWidth = CI2->getType()->getBitWidth();
-            unsigned SrcWidth = std::min(DstWidth, Log2_32(GVAlign));
+            unsigned SrcWidth =
+                std::min(DstWidth, static_cast<unsigned>(Log2_32(GVAlign)));
             APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth));
 
             // If checking bits we know are clear, return zero.