LLVM
15.0.0git
|
Describe a collection of units. More...
#include "llvm/DebugInfo/DWARF/DWARFUnit.h"
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)) |
![]() | |
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 | |
DWARFUnit * | getUnitForOffset (uint64_t Offset) const |
DWARFUnit * | getUnitForIndexEntry (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... | |
DWARFUnit * | addUnit (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... | |
![]() | |
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 () | |
SmallVector & | operator= (const SmallVector &RHS) |
SmallVector & | operator= (SmallVector &&RHS) |
SmallVector & | operator= (SmallVectorImpl< std::unique_ptr< DWARFUnit > > &&RHS) |
SmallVector & | operator= (std::initializer_list< std::unique_ptr< DWARFUnit > > IL) |
![]() | |
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 | truncate (size_type N) |
Like resize, but requires that N is less than size(). More... | |
void | reserve (size_type N) |
void | pop_back_n (size_type NumItems) |
LLVM_NODISCARD std::unique_ptr< DWARFUnit > | pop_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) |
SmallVectorImpl & | operator= (const SmallVectorImpl &RHS) |
SmallVectorImpl & | operator= (SmallVectorImpl &&RHS) |
bool | operator== (const SmallVectorImpl &RHS) const |
bool | operator!= (const SmallVectorImpl &RHS) const |
bool | operator< (const SmallVectorImpl &RHS) const |
bool | operator> (const SmallVectorImpl &RHS) const |
bool | operator<= (const SmallVectorImpl &RHS) const |
bool | operator>= (const SmallVectorImpl &RHS) const |
Additional Inherited Members | |
![]() | |
using | ValueParamT = typename SuperClass::ValueParamT |
![]() | |
SmallVectorImpl (unsigned N) | |
void | assignRemote (SmallVectorImpl &&RHS) |
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 124 of file DWARFUnit.h.
using llvm::DWARFUnitVector::compile_unit_range = decltype(make_filter_range(std::declval<iterator_range>(), isCompileUnit)) |
Definition at line 137 of file DWARFUnit.h.
using llvm::DWARFUnitVector::iterator = typename UnitVector::iterator |
Definition at line 133 of file DWARFUnit.h.
using llvm::DWARFUnitVector::iterator_range = llvm::iterator_range<typename UnitVector::iterator> |
Definition at line 134 of file DWARFUnit.h.
using llvm::DWARFUnitVector::UnitVector = SmallVectorImpl<std::unique_ptr<DWARFUnit> > |
Definition at line 132 of file DWARFUnit.h.
Add an existing DWARFUnit to this UnitVector.
This is used by the DWARF verifier to process unit separately.
Definition at line 136 of file DWARFUnit.cpp.
References llvm::sys::path::begin(), llvm::sys::path::end(), I, LHS, move, RHS, and llvm::upper_bound().
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 53 of file DWARFUnit.cpp.
References D.
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 42 of file DWARFUnit.cpp.
References D.
|
inline |
Indicate that parsing .debug_info[.dwo] is done, and remaining units will be from .debug_types[.dwo].
Definition at line 170 of file DWARFUnit.h.
References llvm::size().
|
inline |
Returns number of units from all .debug_info[.dwo] sections.
Definition at line 163 of file DWARFUnit.h.
References llvm::size().
Referenced by llvm::DWARFContext::dwo_info_section_units(), llvm::DWARFContext::dwo_types_section_units(), llvm::DWARFContext::getNumCompileUnits(), llvm::DWARFContext::getNumDWOCompileUnits(), llvm::DWARFContext::info_section_units(), and llvm::DWARFContext::types_section_units().
|
inline |
Returns number of units from all .debug_types[.dwo] sections.
Definition at line 167 of file DWARFUnit.h.
References llvm::size().
Referenced by llvm::DWARFContext::getNumDWOTypeUnits(), and llvm::DWARFContext::getNumTypeUnits().
|
inline |
Returns number of all units held by this instance.
Definition at line 161 of file DWARFUnit.h.
References llvm::size().
DWARFUnit * DWARFUnitVector::getUnitForIndexEntry | ( | const DWARFUnitIndex::Entry & | E | ) |
Definition at line 158 of file DWARFUnit.cpp.
References llvm::sys::path::begin(), E, llvm::sys::path::end(), LHS, move, RHS, and llvm::upper_bound().
Referenced by llvm::DWARFContext::getDWOCompileUnitForHash(), and llvm::DWARFContext::getTypeUnitForHash().
Definition at line 145 of file DWARFUnit.cpp.
References llvm::sys::path::begin(), llvm::sys::path::end(), LHS, RHS, and llvm::upper_bound().
Referenced by llvm::DWARFContext::getCompileUnitForOffset(), and llvm::DWARFContext::getDIEForOffset().