llvm::ilist_sentinel_traits< NodeTy > Struct Template Reference

ilist_sentinel_traits - A fragment for template traits for intrusive list that provides default sentinel implementations for common operations. More...

#include <ilist.h>

Inheritance diagram for llvm::ilist_sentinel_traits< NodeTy >:
llvm::ilist_default_traits< NodeTy > llvm::ilist_traits< NodeTy > llvm::iplist< NodeTy > llvm::ilist< NodeTy >

List of all members.

Static Public Member Functions

static NodeTy * createSentinel ()
 createSentinel - create the dynamic sentinel
static void destroySentinel (NodeTy *N)
 destroySentinel - deallocate the dynamic sentinel
static NodeTy * provideInitialHead ()
 provideInitialHead - when constructing an ilist, provide a starting value for its Head
static NodeTy * ensureHead (NodeTy *&Head)
 ensureHead - make sure that Head is either already initialized or assigned a fresh sentinel
static void noteHead (NodeTy *NewHead, NodeTy *Sentinel)
 noteHead - stash the sentinel into its default location

Detailed Description

template<typename NodeTy>
struct llvm::ilist_sentinel_traits< NodeTy >

ilist_sentinel_traits - A fragment for template traits for intrusive list that provides default sentinel implementations for common operations.

ilist_sentinel_traits implements a lazy dynamic sentinel allocation strategy. The sentinel is stored in the prev field of ilist's Head.


Member Function Documentation

template<typename NodeTy>
static NodeTy* llvm::ilist_sentinel_traits< NodeTy >::createSentinel (  )  [inline, static]

createSentinel - create the dynamic sentinel

template<typename NodeTy>
static void llvm::ilist_sentinel_traits< NodeTy >::destroySentinel ( NodeTy *  N  )  [inline, static]

destroySentinel - deallocate the dynamic sentinel

Reimplemented in llvm::ilist_traits< RecyclerStruct >.

template<typename NodeTy>
static NodeTy* llvm::ilist_sentinel_traits< NodeTy >::ensureHead ( NodeTy *&  Head  )  [inline, static]

ensureHead - make sure that Head is either already initialized or assigned a fresh sentinel

Returns:
the sentinel
template<typename NodeTy>
static void llvm::ilist_sentinel_traits< NodeTy >::noteHead ( NodeTy *  NewHead,
NodeTy *  Sentinel 
) [inline, static]

noteHead - stash the sentinel into its default location

Reimplemented in llvm::ilist_traits< RecyclerStruct >.

template<typename NodeTy>
static NodeTy* llvm::ilist_sentinel_traits< NodeTy >::provideInitialHead (  )  [inline, static]

provideInitialHead - when constructing an ilist, provide a starting value for its Head

Returns:
null node to indicate that it needs to be allocated later

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

Generated on 2 Nov 2013 for Galois by  doxygen 1.6.1