aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-18 19:01:12 +0000
committerDan Gohman <gohman@apple.com>2010-03-18 19:01:12 +0000
commitaea1b501ceff5a10e9def91febcc80926196391d (patch)
tree7daaf3b2717674ff81735c9578161f72eab74a34 /include/llvm/Support
parentfe7bb05ad1bb2644140a2009e34b0b581d9fee67 (diff)
downloadexternal_llvm-aea1b501ceff5a10e9def91febcc80926196391d.zip
external_llvm-aea1b501ceff5a10e9def91febcc80926196391d.tar.gz
external_llvm-aea1b501ceff5a10e9def91febcc80926196391d.tar.bz2
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
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/Allocator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h
index e39c5c1..cdb0fc8 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