From: Chandler Carruth Date: Tue, 15 Apr 2014 21:36:02 +0000 (+0000) Subject: [Allocator] Remove a really problematic overload. This is very confusing X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=00e4a827f53f13f31e840e3a255754e4bcde37f5;p=oota-llvm.git [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 --- diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index 742812d75f6..1c4b9c6552e 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -88,14 +88,6 @@ public: return static_cast(Allocate(Num * sizeof(T), AlignOf::Alignment)); } - /// \brief Allocate space for an array of objects with the specified alignment - /// and without constructing them. - template 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(Allocate(Num * EltSize, Alignment)); - } - /// \brief Deallocate space for one object without destroying it. template typename std::enable_if<