From: Dan Gohman Date: Thu, 18 Mar 2010 19:01:12 +0000 (+0000) Subject: Explicitly cast std::min's arguments to avoid type mismatches. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=aea1b501ceff5a10e9def91febcc80926196391d;hp=fe7bb05ad1bb2644140a2009e34b0b581d9fee67;p=oota-llvm.git Explicitly cast std::min's arguments to avoid type mismatches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98851 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index e39c5c121f1..cdb0fc85582 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -192,8 +192,8 @@ inline void *operator new(size_t Size, llvm::BumpPtrAllocator &Allocator) { } x; #endif }; - return Allocator.Allocate(Size, std::min(llvm::NextPowerOf2(Size), - offsetof(S, x))); + return Allocator.Allocate(Size, std::min((size_t)llvm::NextPowerOf2(Size), + (size_t)offsetof(S, x))); } #endif // LLVM_SUPPORT_ALLOCATOR_H