[Allocator] Remove a really problematic overload. This is very confusing

because there is another (size_t, size_t) overload of Allocator, and the
only distinguishing factor is that one is a tempalte and the other
isn't. There was only one usage of this and that one was easily
converted to carry the alignment constraint in the type itself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206325 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chandler Carruth 2014-04-15 21:36:02 +00:00
parent f3930395f5
commit 00e4a827f5

View File

@ -88,14 +88,6 @@ public:
return static_cast<T *>(Allocate(Num * sizeof(T), AlignOf<T>::Alignment));
}
/// \brief Allocate space for an array of objects with the specified alignment
/// and without constructing them.
template <typename T> T *Allocate(size_t Num, size_t Alignment) {
// Round EltSize up to the specified alignment.
size_t EltSize = (sizeof(T) + Alignment - 1) & (-Alignment);
return static_cast<T *>(Allocate(Num * EltSize, Alignment));
}
/// \brief Deallocate space for one object without destroying it.
template <typename T>
typename std::enable_if<