Changed Allocate to use size_t instead of unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66602 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mon P Wang 2009-03-10 23:48:49 +00:00
parent 7f3030c471
commit 535f390bc3

View File

@ -75,9 +75,9 @@ public:
/// Allocate space for a specific count of elements and with a specified
/// alignment.
template <typename T>
T *Allocate(size_t Num, unsigned Alignment) {
T *Allocate(size_t Num, size_t Alignment) {
// Round EltSize up to the specified alignment.
unsigned EltSize = (sizeof(T)+Alignment-1)&(-Alignment);
size_t EltSize = (sizeof(T)+Alignment-1)&(-Alignment);
return static_cast<T*>(Allocate(Num * EltSize, Alignment));
}