[llvm] r237683 - Fix Visual C++ errors C2784, C2780, C2782 after r237678.
Yaron Keren
yaron.keren at gmail.com
Tue May 19 04:18:11 PDT 2015
Author: yrnkrn
Date: Tue May 19 06:18:10 2015
New Revision: 237683
URL: http://llvm.org/viewvc/llvm-project?rev=237683&view=rev
Log:
Fix Visual C++ errors C2784, C2780, C2782 after r237678.
It does not like std::min(unsigned, uint32_t).
Modified:
llvm/trunk/lib/IR/ConstantFold.cpp
Modified: llvm/trunk/lib/IR/ConstantFold.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantFold.cpp?rev=237683&r1=237682&r2=237683&view=diff
==============================================================================
--- llvm/trunk/lib/IR/ConstantFold.cpp (original)
+++ llvm/trunk/lib/IR/ConstantFold.cpp Tue May 19 06:18:10 2015
@@ -1057,7 +1057,8 @@ Constant *llvm::ConstantFoldBinaryInstru
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.
More information about the llvm-commits
mailing list