[llvm] r206325 - [Allocator] Remove a really problematic overload. This is very confusing
Chandler Carruth
chandlerc at gmail.com
Tue Apr 15 14:36:02 PDT 2014
Author: chandlerc
Date: Tue Apr 15 16:36:02 2014
New Revision: 206325
URL: http://llvm.org/viewvc/llvm-project?rev=206325&view=rev
Log:
[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.
Modified:
llvm/trunk/include/llvm/Support/Allocator.h
Modified: llvm/trunk/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Allocator.h?rev=206325&r1=206324&r2=206325&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Allocator.h (original)
+++ llvm/trunk/include/llvm/Support/Allocator.h Tue Apr 15 16:36:02 2014
@@ -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<
More information about the llvm-commits
mailing list