LLVM  3.7.0
Classes | Public Member Functions | List of all members
llvm::DIEValueList Class Reference

A list of DIE values. More...

#include <DIE.h>

Classes

class  const_iterator
 
class  iterator
 

Public Member Functions

bool empty () const
 
iterator insert (BumpPtrAllocator &Alloc, DIEValue V)
 
template<class... Ts>
iterator emplace (BumpPtrAllocator &Alloc, Ts &&...Args)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

A list of DIE values.

This is a singly-linked list, but instead of reversing the order of insertion, we keep a pointer to the back of the list so we can push in order.

There are two main reasons to choose a linked list over a customized vector-like data structure.

  1. For teardown efficiency, we want DIEs to be BumpPtrAllocated. Using a linked list here makes this way easier to accomplish.
  2. Carrying an extra pointer per DIEValue isn't expensive. 45% of DIEs have 2 or fewer values, and 90% have 5 or fewer. A vector would be over-allocated by 50% on average anyway, the same cost as the linked-list node.

Definition at line 559 of file DIE.h.

Member Function Documentation

iterator llvm::DIEValueList::begin ( )
inline

Definition at line 614 of file DIE.h.

References llvm::IntrusiveBackList< T >::begin().

Referenced by llvm::DIE::values().

const_iterator llvm::DIEValueList::begin ( ) const
inline

Definition at line 616 of file DIE.h.

References llvm::IntrusiveBackList< T >::begin().

template<class... Ts>
iterator llvm::DIEValueList::emplace ( BumpPtrAllocator Alloc,
Ts &&...  Args 
)
inline

Definition at line 610 of file DIE.h.

References insert().

Referenced by llvm::DIE::addValue().

bool llvm::DIEValueList::empty ( ) const
inline

Definition at line 569 of file DIE.h.

References llvm::IntrusiveBackListBase::empty().

iterator llvm::DIEValueList::end ( )
inline

Definition at line 615 of file DIE.h.

References llvm::IntrusiveBackList< T >::end().

Referenced by llvm::DIE::values().

const_iterator llvm::DIEValueList::end ( ) const
inline

Definition at line 617 of file DIE.h.

References llvm::IntrusiveBackList< T >::end().

iterator llvm::DIEValueList::insert ( BumpPtrAllocator Alloc,
DIEValue  V 
)
inline

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