LLVM  4.0.0
Public Member Functions | List of all members
llvm::SpecificBumpPtrAllocator< T > Class Template Reference

A BumpPtrAllocator that allows only elements of a specific type to be allocated. More...

#include <Allocator.h>

Inheritance diagram for llvm::SpecificBumpPtrAllocator< T >:
[legend]

Public Member Functions

 SpecificBumpPtrAllocator ()=default
 
 SpecificBumpPtrAllocator (SpecificBumpPtrAllocator &&Old)
 
 ~SpecificBumpPtrAllocator ()
 
SpecificBumpPtrAllocatoroperator= (SpecificBumpPtrAllocator &&RHS)
 
void DestroyAll ()
 Call the destructor of each allocated object and deallocate all but the current slab and reset the current pointer to the beginning of it, freeing all memory allocated so far. More...
 
TAllocate (size_t num=1)
 Allocate space for an array of objects without constructing them. More...
 

Detailed Description

template<typename T>
class llvm::SpecificBumpPtrAllocator< T >

A BumpPtrAllocator that allows only elements of a specific type to be allocated.

This allows calling the destructor in DestroyAll() and when the allocator is destroyed.

Definition at line 368 of file Allocator.h.

Constructor & Destructor Documentation

template<typename T>
llvm::SpecificBumpPtrAllocator< T >::SpecificBumpPtrAllocator ( )
default

Definition at line 373 of file Allocator.h.

template<typename T>
llvm::SpecificBumpPtrAllocator< T >::~SpecificBumpPtrAllocator ( )
inline

Definition at line 375 of file Allocator.h.

Member Function Documentation

template<typename T>
T* llvm::SpecificBumpPtrAllocator< T >::Allocate ( size_t  num = 1)
inline

Allocate space for an array of objects without constructing them.

Definition at line 413 of file Allocator.h.

Referenced by llvm::OnDiskChainedHashTableGenerator< Info >::insert().

template<typename T>
void llvm::SpecificBumpPtrAllocator< T >::DestroyAll ( )
inline

Call the destructor of each allocated object and deallocate all but the current slab and reset the current pointer to the beginning of it, freeing all memory allocated so far.

Definition at line 385 of file Allocator.h.

Referenced by llvm::SpecificBumpPtrAllocator< llvm::LazyCallGraph::SCC >::~SpecificBumpPtrAllocator().

template<typename T>
SpecificBumpPtrAllocator& llvm::SpecificBumpPtrAllocator< T >::operator= ( SpecificBumpPtrAllocator< T > &&  RHS)
inline

Definition at line 377 of file Allocator.h.


The documentation for this class was generated from the following file: