LLVM  8.0.1
Public Types | Public Member Functions | List of all members
llvm::DWARFUnitVector Class Referencefinal

Describe a collection of units. More...

#include "llvm/DebugInfo/DWARF/DWARFUnit.h"

Inheritance diagram for llvm::DWARFUnitVector:
Inheritance graph
[legend]
Collaboration diagram for llvm::DWARFUnitVector:
Collaboration graph
[legend]

Public Types

using UnitVector = SmallVectorImpl< std::unique_ptr< DWARFUnit > >
 
using iterator = typename UnitVector::iterator
 
using iterator_range = llvm::iterator_range< typename UnitVector::iterator >
 
- Public Types inherited from llvm::SmallVectorImpl< std::unique_ptr< DWARFUnit > >
using iterator = typename SuperClass::iterator
 
using const_iterator = typename SuperClass::const_iterator
 
using size_type = typename SuperClass::size_type
 
- Public Types inherited from llvm::SmallVectorTemplateCommon< T >
using size_type = size_t
 
using difference_type = ptrdiff_t
 
using value_type = T
 
using iterator = T *
 
using const_iterator = const T *
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using reference = T &
 
using const_reference = const T &
 
using pointer = T *
 
using const_pointer = const T *
 

Public Member Functions

DWARFUnitgetUnitForOffset (uint32_t Offset) const
 
DWARFUnitgetUnitForIndexEntry (const DWARFUnitIndex::Entry &E)
 
void addUnitsForSection (DWARFContext &C, const DWARFSection &Section, DWARFSectionKind SectionKind)
 Read units from a .debug_info or .debug_types section. More...
 
void addUnitsForDWOSection (DWARFContext &C, const DWARFSection &DWOSection, DWARFSectionKind SectionKind, bool Lazy=false)
 Read units from a .debug_info.dwo or .debug_types.dwo section. More...
 
DWARFUnitaddUnit (std::unique_ptr< DWARFUnit > Unit)
 Add an existing DWARFUnit to this UnitVector. More...
 
unsigned getNumUnits () const
 Returns number of all units held by this instance. More...
 
unsigned getNumInfoUnits () const
 Returns number of units from all .debug_info[.dwo] sections. More...
 
unsigned getNumTypesUnits () const
 Returns number of units from all .debug_types[.dwo] sections. More...
 
void finishedInfoUnits ()
 Indicate that parsing .debug_info[.dwo] is done, and remaining units will be from .debug_types[.dwo]. More...
 
- Public Member Functions inherited from llvm::SmallVector< std::unique_ptr< DWARFUnit >, 1 >
 SmallVector ()
 
 SmallVector (size_t Size, const std::unique_ptr< DWARFUnit > &Value=std::unique_ptr< DWARFUnit >())
 
 SmallVector (ItTy S, ItTy E)
 
 SmallVector (const iterator_range< RangeTy > &R)
 
 SmallVector (std::initializer_list< std::unique_ptr< DWARFUnit > > IL)
 
 SmallVector (const SmallVector &RHS)
 
 SmallVector (SmallVector &&RHS)
 
 SmallVector (SmallVectorImpl< std::unique_ptr< DWARFUnit > > &&RHS)
 
 ~SmallVector ()
 
const SmallVectoroperator= (const SmallVector &RHS)
 
const SmallVectoroperator= (SmallVector &&RHS)
 
const SmallVectoroperator= (SmallVectorImpl< std::unique_ptr< DWARFUnit > > &&RHS)
 
const SmallVectoroperator= (std::initializer_list< std::unique_ptr< DWARFUnit > > IL)
 
- Public Member Functions inherited from llvm::SmallVectorImpl< std::unique_ptr< DWARFUnit > >
 SmallVectorImpl (const SmallVectorImpl &)=delete
 
 ~SmallVectorImpl ()
 
void clear ()
 
void resize (size_type N)
 
void resize (size_type N, const std::unique_ptr< DWARFUnit > &NV)
 
void reserve (size_type N)
 
LLVM_NODISCARD std::unique_ptr< DWARFUnitpop_back_val ()
 
void swap (SmallVectorImpl &RHS)
 
void append (in_iter in_start, in_iter in_end)
 Add the specified range to the end of the SmallVector. More...
 
void append (size_type NumInputs, const std::unique_ptr< DWARFUnit > &Elt)
 Add the specified range to the end of the SmallVector. More...
 
void append (std::initializer_list< std::unique_ptr< DWARFUnit > > IL)
 
void assign (size_type NumElts, const std::unique_ptr< DWARFUnit > &Elt)
 
void assign (in_iter in_start, in_iter in_end)
 
void assign (std::initializer_list< std::unique_ptr< DWARFUnit > > IL)
 
iterator erase (const_iterator CI)
 
iterator erase (const_iterator CS, const_iterator CE)
 
iterator insert (iterator I, std::unique_ptr< DWARFUnit > &&Elt)
 
iterator insert (iterator I, const std::unique_ptr< DWARFUnit > &Elt)
 
iterator insert (iterator I, size_type NumToInsert, const std::unique_ptr< DWARFUnit > &Elt)
 
iterator insert (iterator I, ItTy From, ItTy To)
 
void insert (iterator I, std::initializer_list< std::unique_ptr< DWARFUnit > > IL)
 
void emplace_back (ArgTypes &&... Args)
 
SmallVectorImploperator= (const SmallVectorImpl &RHS)
 
SmallVectorImploperator= (SmallVectorImpl &&RHS)
 
bool operator== (const SmallVectorImpl &RHS) const
 
bool operator!= (const SmallVectorImpl &RHS) const
 
bool operator< (const SmallVectorImpl &RHS) const
 
- Public Member Functions inherited from llvm::SmallVectorTemplateBase< T, bool >
void push_back (const T &Elt)
 
void push_back (T &&Elt)
 
void pop_back ()
 
- Public Member Functions inherited from llvm::SmallVectorTemplateCommon< T >
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin ()
 
LLVM_ATTRIBUTE_ALWAYS_INLINE const_iterator begin () const
 
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end ()
 
LLVM_ATTRIBUTE_ALWAYS_INLINE const_iterator end () const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_type size_in_bytes () const
 
size_type max_size () const
 
size_t capacity_in_bytes () const
 
pointer data ()
 Return a pointer to the vector's buffer, even if empty(). More...
 
const_pointer data () const
 Return a pointer to the vector's buffer, even if empty(). More...
 
LLVM_ATTRIBUTE_ALWAYS_INLINE reference operator[] (size_type idx)
 
LLVM_ATTRIBUTE_ALWAYS_INLINE const_reference operator[] (size_type idx) const
 
reference front ()
 
const_reference front () const
 
reference back ()
 
const_reference back () const
 
- Public Member Functions inherited from llvm::SmallVectorBase
size_t size () const
 
size_t capacity () const
 
LLVM_NODISCARD bool empty () const
 
void set_size (size_t Size)
 Set the array size to N, which the current array must have enough capacity for. More...
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::SmallVectorImpl< std::unique_ptr< DWARFUnit > >
 SmallVectorImpl (unsigned N)
 
- Protected Member Functions inherited from llvm::SmallVectorTemplateBase< T, bool >
 SmallVectorTemplateBase (size_t Size)
 
void grow (size_t MinSize=0)
 Grow the allocated memory (without initializing new elements), doubling the size of the allocated memory. More...
 
- Protected Member Functions inherited from llvm::SmallVectorTemplateCommon< T >
 SmallVectorTemplateCommon (size_t Size)
 
void grow_pod (size_t MinCapacity, size_t TSize)
 
bool isSmall () const
 Return true if this is a smallvector which has not had dynamic memory allocated for it. More...
 
void resetToSmall ()
 Put this vector in a state of being small. More...
 
- Protected Member Functions inherited from llvm::SmallVectorBase
 SmallVectorBase ()=delete
 
 SmallVectorBase (void *FirstEl, size_t Capacity)
 
void grow_pod (void *FirstEl, size_t MinCapacity, size_t TSize)
 This is an implementation of the grow() method which only works on POD-like data types and is out of line to reduce code duplication. More...
 
- Static Protected Member Functions inherited from llvm::SmallVectorTemplateBase< T, bool >
static void destroy_range (T *S, T *E)
 
template<typename It1 , typename It2 >
static void uninitialized_move (It1 I, It1 E, It2 Dest)
 Move the range [I, E) into the uninitialized memory starting with "Dest", constructing elements as needed. More...
 
template<typename It1 , typename It2 >
static void uninitialized_copy (It1 I, It1 E, It2 Dest)
 Copy the range [I, E) onto the uninitialized memory starting with "Dest", constructing elements as needed. More...
 
- Protected Attributes inherited from llvm::SmallVectorBase
void * BeginX
 
unsigned Size = 0
 
unsigned Capacity
 

Detailed Description

Describe a collection of units.

Intended to hold all units either from .debug_info and .debug_types, or from .debug_info.dwo and .debug_types.dwo.

Definition at line 110 of file DWARFUnit.h.

Member Typedef Documentation

◆ iterator

Definition at line 119 of file DWARFUnit.h.

◆ iterator_range

Definition at line 120 of file DWARFUnit.h.

◆ UnitVector

Definition at line 118 of file DWARFUnit.h.

Member Function Documentation

◆ addUnit()

DWARFUnit * DWARFUnitVector::addUnit ( std::unique_ptr< DWARFUnit Unit)

Add an existing DWARFUnit to this UnitVector.

This is used by the DWARF verifier to process unit separately.

Definition at line 121 of file DWARFUnit.cpp.

References llvm::sys::path::begin(), llvm::sys::path::end(), I, and llvm::upper_bound().

Referenced by llvm::DWARFVerifier::handleDebugAbbrev().

◆ addUnitsForDWOSection()

void DWARFUnitVector::addUnitsForDWOSection ( DWARFContext C,
const DWARFSection DWOSection,
DWARFSectionKind  SectionKind,
bool  Lazy = false 
)

◆ addUnitsForSection()

void DWARFUnitVector::addUnitsForSection ( DWARFContext C,
const DWARFSection Section,
DWARFSectionKind  SectionKind 
)

Read units from a .debug_info or .debug_types section.

Calls made before finishedInfoUnits() are assumed to be for .debug_info sections, calls after finishedInfoUnits() are for .debug_types sections. Caller must not mix calls to addUnitsForSection and addUnitsForDWOSection.

Definition at line 37 of file DWARFUnit.cpp.

References D, llvm::DWARFObject::getAddrSection(), llvm::DWARFContext::getDebugAbbrev(), llvm::DWARFContext::getDWARFObj(), llvm::DWARFObject::getLineSection(), llvm::DWARFObject::getLocSection(), llvm::DWARFObject::getRangeSection(), llvm::DWARFObject::getStringOffsetSection(), llvm::DWARFObject::getStringSection(), and llvm::DWARFObject::isLittleEndian().

Referenced by llvm::DWARFContext::getLineTableForUnit().

◆ finishedInfoUnits()

void llvm::DWARFUnitVector::finishedInfoUnits ( )
inline

Indicate that parsing .debug_info[.dwo] is done, and remaining units will be from .debug_types[.dwo].

Definition at line 153 of file DWARFUnit.h.

References llvm::AArch64CC::LE, llvm::AArch64CC::LS, llvm::ARMBuildAttrs::Section, and llvm::size().

Referenced by llvm::DWARFContext::getLineTableForUnit().

◆ getNumInfoUnits()

unsigned llvm::DWARFUnitVector::getNumInfoUnits ( ) const
inline

◆ getNumTypesUnits()

unsigned llvm::DWARFUnitVector::getNumTypesUnits ( ) const
inline

Returns number of units from all .debug_types[.dwo] sections.

Definition at line 150 of file DWARFUnit.h.

References llvm::size().

Referenced by llvm::DWARFContext::getNumDWOTypeUnits(), and llvm::DWARFContext::getNumTypeUnits().

◆ getNumUnits()

unsigned llvm::DWARFUnitVector::getNumUnits ( ) const
inline

Returns number of all units held by this instance.

Definition at line 144 of file DWARFUnit.h.

References llvm::size().

◆ getUnitForIndexEntry()

DWARFUnit * DWARFUnitVector::getUnitForIndexEntry ( const DWARFUnitIndex::Entry E)

◆ getUnitForOffset()

DWARFUnit * DWARFUnitVector::getUnitForOffset ( uint32_t  Offset) const

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