LLVM  11.0.0git
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< T >
using iterator = typename SuperClass::iterator
 
using const_iterator = typename SuperClass::const_iterator
 
using reference = typename SuperClass::reference
 
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 (uint64_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< T >
 SmallVectorImpl (const SmallVectorImpl &)=delete
 
 ~SmallVectorImpl ()
 
void clear ()
 
void resize (size_type N)
 
void resize (size_type N, const T &NV)
 
void reserve (size_type N)
 
LLVM_NODISCARD T pop_back_val ()
 
void swap (SmallVectorImpl &RHS)
 
template<typename in_iter , typename = std::enable_if_t<std::is_convertible< typename std::iterator_traits<in_iter>::iterator_category, std::input_iterator_tag>::value>>
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 T &Elt)
 Append NumInputs copies of Elt to the end. More...
 
void append (std::initializer_list< T > IL)
 
void assign (size_type NumElts, const T &Elt)
 
template<typename in_iter , typename = std::enable_if_t<std::is_convertible< typename std::iterator_traits<in_iter>::iterator_category, std::input_iterator_tag>::value>>
void assign (in_iter in_start, in_iter in_end)
 
void assign (std::initializer_list< T > IL)
 
iterator erase (const_iterator CI)
 
iterator erase (const_iterator CS, const_iterator CE)
 
iterator insert (iterator I, T &&Elt)
 
iterator insert (iterator I, const T &Elt)
 
iterator insert (iterator I, size_type NumToInsert, const T &Elt)
 
template<typename ItTy , typename = std::enable_if_t<std::is_convertible< typename std::iterator_traits<ItTy>::iterator_category, std::input_iterator_tag>::value>>
iterator insert (iterator I, ItTy From, ItTy To)
 
void insert (iterator I, std::initializer_list< T > IL)
 
template<typename... ArgTypes>
reference 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 >
void push_back (const T &Elt)
 
void push_back (T &&Elt)
 
void pop_back ()
 
- Public Member Functions inherited from llvm::SmallVectorTemplateCommon< T >
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
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...
 
reference operator[] (size_type idx)
 
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< SmallVectorSizeType< T > >
size_t size () const
 
size_t capacity () const
 
LLVM_NODISCARD bool empty () const
 
void set_size (size_t N)
 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< T >
 SmallVectorImpl (unsigned N)
 
- Protected Member Functions inherited from llvm::SmallVectorTemplateBase< T >
 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< SmallVectorSizeType< T > >
 SmallVectorBase ()=delete
 
 SmallVectorBase (void *FirstEl, size_t TotalCapacity)
 
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 >
static void destroy_range (T *S, T *E)
 
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...
 
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...
 
- Static Protected Member Functions inherited from llvm::SmallVectorBase< SmallVectorSizeType< T > >
static constexpr size_t SizeTypeMax ()
 The maximum value of the Size_T used. More...
 
- Protected Attributes inherited from llvm::SmallVectorBase< SmallVectorSizeType< T > >
void * BeginX
 
SmallVectorSizeType< TSize
 
SmallVectorSizeType< TCapacity
 

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 118 of file DWARFUnit.h.

Member Typedef Documentation

◆ iterator

Definition at line 127 of file DWARFUnit.h.

◆ iterator_range

Definition at line 128 of file DWARFUnit.h.

◆ UnitVector

Definition at line 126 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 122 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 35 of file DWARFUnit.cpp.

References D, llvm::DWARFObject::getAddrSection(), llvm::DWARFContext::getDebugAbbrev(), llvm::DWARFContext::getDWARFObj(), llvm::DWARFObject::getLineSection(), llvm::DWARFObject::getLocSection(), llvm::DWARFObject::getRangesSection(), llvm::DWARFObject::getStrOffsetsSection(), llvm::DWARFObject::getStrSection(), 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 161 of file DWARFUnit.h.

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

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 158 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 152 of file DWARFUnit.h.

References llvm::size().

◆ getUnitForIndexEntry()

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

◆ getUnitForOffset()

DWARFUnit * DWARFUnitVector::getUnitForOffset ( uint64_t  Offset) const

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