LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Friends | List of all members
llvm::IntervalMap< KeyT, ValT, N, Traits > Class Template Reference

#include "llvm/ADT/IntervalMap.h"

Inheritance diagram for llvm::IntervalMap< KeyT, ValT, N, Traits >:
Inheritance graph
[legend]

Classes

class  const_iterator
 
class  iterator
 

Public Types

using Allocator = typename Sizer::Allocator
 
using KeyType = KeyT
 
using ValueType = ValT
 
using KeyTraits = Traits
 

Public Member Functions

 IntervalMap (Allocator &a)
 
 ~IntervalMap ()
 
bool empty () const
 empty - Return true when no intervals are mapped.
 
KeyT start () const
 start - Return the smallest mapped key in a non-empty map.
 
KeyT stop () const
 stop - Return the largest mapped key in a non-empty map.
 
ValT lookup (KeyT x, ValT NotFound=ValT()) const
 lookup - Return the mapped value at x or NotFound.
 
void insert (KeyT a, KeyT b, ValT y)
 insert - Add a mapping of [a;b] to y, coalesce with adjacent intervals.
 
void clear ()
 clear - Remove all entries.
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
const_iterator find (KeyT x) const
 find - Return an iterator pointing to the first interval ending at or after x, or end().
 
iterator find (KeyT x)
 
bool overlaps (KeyT a, KeyT b) const
 overlaps(a, b) - Return true if the intervals in this map overlap with the interval [a;b].
 
 IntervalMap (IntervalMap const &RHS)
 
IntervalMapoperator= (IntervalMap const &RHS)
 
 IntervalMap (IntervalMap &&RHS)
 
IntervalMapoperator= (IntervalMap &&RHS)
 

Friends

class const_iterator
 
class iterator
 

Detailed Description

template<typename KeyT, typename ValT, unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
class llvm::IntervalMap< KeyT, ValT, N, Traits >

Definition at line 936 of file IntervalMap.h.

Member Typedef Documentation

◆ Allocator

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
using llvm::IntervalMap< KeyT, ValT, N, Traits >::Allocator = typename Sizer::Allocator

Definition at line 962 of file IntervalMap.h.

◆ KeyTraits

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
using llvm::IntervalMap< KeyT, ValT, N, Traits >::KeyTraits = Traits

Definition at line 965 of file IntervalMap.h.

◆ KeyType

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
using llvm::IntervalMap< KeyT, ValT, N, Traits >::KeyType = KeyT

Definition at line 963 of file IntervalMap.h.

◆ ValueType

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
using llvm::IntervalMap< KeyT, ValT, N, Traits >::ValueType = ValT

Definition at line 964 of file IntervalMap.h.

Constructor & Destructor Documentation

◆ IntervalMap() [1/3]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::IntervalMap ( Allocator a)
inlineexplicit

Definition at line 1041 of file IntervalMap.h.

References allocator.

◆ IntervalMap() [2/3]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::IntervalMap ( IntervalMap< KeyT, ValT, N, Traits > const RHS)
inline

NOTE: The moved-from or copied-from object's allocator needs to have a lifetime equal to or exceeding the moved-to or copied-to object to avoid undefined behaviour.

Definition at line 1049 of file IntervalMap.h.

References allocator, assert(), llvm::IntervalMap< KeyT, ValT, N, Traits >::empty(), and RHS.

◆ IntervalMap() [3/3]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::IntervalMap ( IntervalMap< KeyT, ValT, N, Traits > &&  RHS)
inline

◆ ~IntervalMap()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
llvm::IntervalMap< KeyT, ValT, N, Traits >::~IntervalMap ( )
inline

Member Function Documentation

◆ begin() [1/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::begin ( )
inline

Definition at line 1152 of file IntervalMap.h.

References I.

◆ begin() [2/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::begin ( ) const
inline

◆ clear()

template<typename KeyT , typename ValT , unsigned N, typename Traits >
void llvm::IntervalMap< KeyT, ValT, N, Traits >::clear

◆ empty()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::empty ( ) const
inline

◆ end() [1/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::end ( )
inline

Definition at line 1164 of file IntervalMap.h.

References I.

◆ end() [2/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::end ( ) const
inline

◆ find() [1/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::find ( KeyT  x)
inline

Definition at line 1178 of file IntervalMap.h.

References I.

◆ find() [2/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
const_iterator llvm::IntervalMap< KeyT, ValT, N, Traits >::find ( KeyT  x) const
inline

◆ insert()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
void llvm::IntervalMap< KeyT, ValT, N, Traits >::insert ( KeyT  a,
KeyT  b,
ValT  y 
)
inline

◆ lookup()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
ValT llvm::IntervalMap< KeyT, ValT, N, Traits >::lookup ( KeyT  x,
ValT  NotFound = ValT() 
) const
inline

◆ operator=() [1/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
IntervalMap & llvm::IntervalMap< KeyT, ValT, N, Traits >::operator= ( IntervalMap< KeyT, ValT, N, Traits > &&  RHS)
inline

◆ operator=() [2/2]

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
IntervalMap & llvm::IntervalMap< KeyT, ValT, N, Traits >::operator= ( IntervalMap< KeyT, ValT, N, Traits > const RHS)
inline

◆ overlaps()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
bool llvm::IntervalMap< KeyT, ValT, N, Traits >::overlaps ( KeyT  a,
KeyT  b 
) const
inline

overlaps(a, b) - Return true if the intervals in this map overlap with the interval [a;b].

Definition at line 1186 of file IntervalMap.h.

References assert(), llvm::IntervalMap< KeyT, ValT, N, Traits >::find(), and I.

◆ start()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
KeyT llvm::IntervalMap< KeyT, ValT, N, Traits >::start ( ) const
inline

◆ stop()

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
KeyT llvm::IntervalMap< KeyT, ValT, N, Traits >::stop ( ) const
inline

Friends And Related Function Documentation

◆ const_iterator

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
friend class const_iterator
friend

Definition at line 1143 of file IntervalMap.h.

◆ iterator

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
friend class iterator
friend

Definition at line 1144 of file IntervalMap.h.

Member Data Documentation

◆ branchData

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
RootBranchData llvm::IntervalMap< KeyT, ValT, N, Traits >::branchData

Definition at line 971 of file IntervalMap.h.

◆ leaf

template<typename KeyT , typename ValT , unsigned N = IntervalMapImpl::NodeSizer<KeyT, ValT>::LeafSize, typename Traits = IntervalMapInfo<KeyT>>
RootLeaf llvm::IntervalMap< KeyT, ValT, N, Traits >::leaf

Definition at line 970 of file IntervalMap.h.


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