From a44933e6d0c3e143943f4e40a124741b394571aa Mon Sep 17 00:00:00 2001 From: Yaron Keren Date: Tue, 19 May 2015 11:18:10 +0000 Subject: [PATCH] Fix Visual C++ errors C2784, C2780, C2782 after r237678. It does not like std::min(unsigned, uint32_t). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237683 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/IR/ConstantFold.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/IR/ConstantFold.cpp b/lib/IR/ConstantFold.cpp index 16b113df1b8..178612c6a3e 100644 --- a/lib/IR/ConstantFold.cpp +++ b/lib/IR/ConstantFold.cpp @@ -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(Log2_32(GVAlign))); APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth)); // If checking bits we know are clear, return zero.