LLVM 19.0.0git
Classes | Namespaces | Typedefs | Functions
ilist.h File Reference

This file defines classes to implement an intrusive doubly linked list class (i.e. More...

#include "llvm/ADT/simple_ilist.h"
#include <cassert>
#include <cstddef>
#include <iterator>

Go to the source code of this file.

Classes

struct  llvm::ilist_alloc_traits< NodeTy >
 Use delete by default for iplist and ilist. More...
 
struct  llvm::ilist_noalloc_traits< NodeTy >
 Custom traits to do nothing on deletion. More...
 
struct  llvm::ilist_callback_traits< NodeTy >
 Callbacks do nothing by default in iplist and ilist. More...
 
struct  llvm::ilist_node_traits< NodeTy >
 A fragment for template traits for intrusive list that provides default node related operations. More...
 
struct  llvm::ilist_traits< NodeTy >
 Template traits for intrusive list. More...
 
struct  llvm::ilist_traits< const Ty >
 Const traits should never be instantiated. More...
 
class  llvm::iplist_impl< IntrusiveListT, TraitsT >
 A wrapper around an intrusive list with callbacks and non-intrusive ownership. More...
 
class  llvm::iplist< T, Options >
 An intrusive list with ownership and callbacks specified/controlled by ilist_traits, only with API safe for polymorphic types. More...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  std
 Implement std::hash so that hash_code can be used in STL containers.
 

Typedefs

template<class T , class... Options>
using llvm::ilist = iplist< T, Options... >
 

Functions

template<class Ty >
void std::swap (llvm::iplist< Ty > &Left, llvm::iplist< Ty > &Right)
 

Detailed Description

This file defines classes to implement an intrusive doubly linked list class (i.e.

each node of the list must contain a next and previous field for the list.

The ilist class itself should be a plug in replacement for list. This list replacement does not provide a constant time size() method, so be careful to use empty() when you really want to know if it's empty.

The ilist class is implemented as a circular list. The list itself contains a sentinel node, whose Next points at begin() and whose Prev points at rbegin(). The sentinel node itself serves as end() and rend().

Definition in file ilist.h.