//==- llvm/Support/ArrayRecycler.h - Recycling of Arrays ---------*- C++ -*-==// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines the ArrayRecycler class template which can recycle small // arrays allocated from one of the allocators in Allocator.h // //===----------------------------------------------------------------------===// #ifndef LLVM_SUPPORT_ARRAYRECYCLER_H #define LLVM_SUPPORT_ARRAYRECYCLER_H #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/MathExtras.h" namespace llvm { /// Recycle small arrays allocated from a BumpPtrAllocator. /// /// Arrays are allocated in a small number of fixed sizes. For each supported /// array size, the ArrayRecycler keeps a free list of available arrays. /// template <class T, size_t Align = alignof(T)> class ArrayRecycler { … }; } // end llvm namespace #endif