LLVM  14.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 >
 
using compile_unit_range = decltype(make_filter_range(std::declval< iterator_range >(), isCompileUnit))
 
- Public Types inherited from llvm::SmallVectorImpl< std::unique_ptr< DWARFUnit > >
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 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 ()
 
SmallVectoroperator= (const SmallVector &RHS)
 
SmallVectoroperator= (SmallVector &&RHS)
 
SmallVectoroperator= (SmallVectorImpl< std::unique_ptr< DWARFUnit > > &&RHS)
 
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, ValueParamT NV)
 
void resize_for_overwrite (size_type N)
 Like resize, but T is POD, the new values won't be initialized. More...
 
void reserve (size_type N)
 
void pop_back_n (size_type NumItems)
 
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, ValueParamT Elt)
 Append NumInputs copies of Elt to the end. More...
 
void append (std::initializer_list< std::unique_ptr< DWARFUnit > > IL)
 
void append (const SmallVectorImpl &RHS)
 
void assign (size_type NumElts, ValueParamT Elt)
 
void assign (in_iter in_start, in_iter in_end)
 
void assign (std::initializer_list< std::unique_ptr< DWARFUnit > > IL)
 
void assign (const SmallVectorImpl &RHS)
 
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, ValueParamT Elt)
 
iterator insert (iterator I, ItTy From, ItTy To)
 
void insert (iterator I, std::initializer_list< std::unique_ptr< DWARFUnit > > IL)
 
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
 

Additional Inherited Members

- Protected Types inherited from llvm::SmallVectorImpl< std::unique_ptr< DWARFUnit > >
using ValueParamT = typename SuperClass::ValueParamT
 
- Protected Member Functions inherited from llvm::SmallVectorImpl< std::unique_ptr< DWARFUnit > >
 SmallVectorImpl (unsigned N)
 

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

Member Typedef Documentation

◆ compile_unit_range

Definition at line 133 of file DWARFUnit.h.

◆ iterator

Definition at line 129 of file DWARFUnit.h.

◆ iterator_range

Definition at line 130 of file DWARFUnit.h.

◆ UnitVector

Definition at line 128 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, move, and llvm::upper_bound().

◆ addUnitsForDWOSection()

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

Read units from a .debug_info.dwo or .debug_types.dwo section.

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

Definition at line 46 of file DWARFUnit.cpp.

References D.

◆ 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, and llvm::ARMBuildAttrs::Section.

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

References llvm::size().

◆ 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 163 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 157 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: