[Allocator] Remove a really problematic overload. This is very confusing
authorChandler Carruth <chandlerc@gmail.com>
Tue, 15 Apr 2014 21:36:02 +0000 (21:36 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 15 Apr 2014 21:36:02 +0000 (21:36 +0000)
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

include/llvm/Support/Allocator.h

index 742812d75f6a093cd4ba34ce1a014eae371aee8b..1c4b9c6552eb31cb6c74f7b3184de8d5dd762c17 100644 (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<