diff options
Diffstat (limited to 'include/llvm/Support/Recycler.h')
| -rw-r--r-- | include/llvm/Support/Recycler.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/Support/Recycler.h b/include/llvm/Support/Recycler.h index a38050d81903a..1523aad38d46f 100644 --- a/include/llvm/Support/Recycler.h +++ b/include/llvm/Support/Recycler.h @@ -16,7 +16,6 @@ #define LLVM_SUPPORT_RECYCLER_H #include "llvm/ADT/ilist.h" -#include "llvm/Support/AlignOf.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/ErrorHandling.h" #include <cassert> @@ -32,7 +31,7 @@ void PrintRecyclerStats(size_t Size, size_t Align, size_t FreeListSize); /// and facilitates reusing deallocated memory in place of allocating /// new memory. /// -template<class T, size_t Size = sizeof(T), size_t Align = AlignOf<T>::Alignment> +template <class T, size_t Size = sizeof(T), size_t Align = alignof(T)> class Recycler { struct FreeNode { FreeNode *Next; @@ -80,7 +79,7 @@ public: template<class SubClass, class AllocatorType> SubClass *Allocate(AllocatorType &Allocator) { - static_assert(AlignOf<SubClass>::Alignment <= Align, + static_assert(alignof(SubClass) <= Align, "Recycler allocation alignment is less than object align!"); static_assert(sizeof(SubClass) <= Size, "Recycler allocation size is less than object size!"); |
