aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-05-19 11:18:10 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-05-19 11:18:10 +0000
commitd90d6fb53a38ca33b75adaedd5f93480336cb55a (patch)
tree921a72e1241b31836ce49ab64a22f5e4faa914c9 /llvm/lib/IR/ConstantFold.cpp
parente88a021bf43a122577e99785bf752adbcf557974 (diff)
downloadllvm-d90d6fb53a38ca33b75adaedd5f93480336cb55a.zip
llvm-d90d6fb53a38ca33b75adaedd5f93480336cb55a.tar.gz
llvm-d90d6fb53a38ca33b75adaedd5f93480336cb55a.tar.bz2
Fix Visual C++ errors C2784, C2780, C2782 after r237678.
It does not like std::min(unsigned, uint32_t). llvm-svn: 237683
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index 16b113d..178612c 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/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<unsigned>(Log2_32(GVAlign)));
APInt BitsNotSet(APInt::getLowBitsSet(DstWidth, SrcWidth));
// If checking bits we know are clear, return zero.