LLVM 22.0.0git
|
A class that keeps the address range information for a single DIE. More...
#include "llvm/DebugInfo/DWARF/DWARFVerifier.h"
Public Types | |
typedef std::set< DieRangeInfo >::const_iterator | die_range_info_iterator |
Public Member Functions | |
DieRangeInfo ()=default | |
DieRangeInfo (DWARFDie Die) | |
DieRangeInfo (std::vector< DWARFAddressRange > Ranges) | |
Used for unit testing. | |
LLVM_ABI std::optional< DWARFAddressRange > | insert (const DWARFAddressRange &R) |
Inserts the address range. | |
LLVM_ABI die_range_info_iterator | insert (const DieRangeInfo &RI) |
Inserts the address range info. | |
LLVM_ABI bool | contains (const DieRangeInfo &RHS) const |
Return true if ranges in this object contains all ranges within RHS. | |
LLVM_ABI bool | intersects (const DieRangeInfo &RHS) const |
Return true if any range in this object intersects with any range in RHS. |
Public Attributes | |
DWARFDie | Die |
std::vector< DWARFAddressRange > | Ranges |
Sorted DWARFAddressRanges. | |
std::set< DieRangeInfo > | Children |
Sorted DWARFAddressRangeInfo. |
A class that keeps the address range information for a single DIE.
Definition at line 71 of file DWARFVerifier.h.
typedef std::set<DieRangeInfo>::const_iterator llvm::DWARFVerifier::DieRangeInfo::die_range_info_iterator |
Definition at line 87 of file DWARFVerifier.h.
|
default |
Referenced by contains(), insert(), and intersects().
|
inline |
Definition at line 81 of file DWARFVerifier.h.
References Die.
|
inline |
Used for unit testing.
Definition at line 84 of file DWARFVerifier.h.
References llvm::move(), and Ranges.
bool DWARFVerifier::DieRangeInfo::contains | ( | const DieRangeInfo & | RHS | ) | const |
Return true if ranges in this object contains all ranges within RHS.
Definition at line 94 of file DWARFVerifier.cpp.
References DieRangeInfo(), and Ranges.
DWARFVerifier::DieRangeInfo::die_range_info_iterator DWARFVerifier::DieRangeInfo::insert | ( | const DieRangeInfo & | RI | ) |
Inserts the address range info.
If any of its ranges overlaps with a range in an existing range info, the range info is not added and an iterator to the overlapping range info. If a duplicate entry is attempted to be added, the duplicate range will not actually be added and the returned iterator will point to end().
This is used for finding overlapping children of the same DIE.
Definition at line 79 of file DWARFVerifier.cpp.
References Children, DieRangeInfo(), and Ranges.
std::optional< DWARFAddressRange > DWARFVerifier::DieRangeInfo::insert | ( | const DWARFAddressRange & | R | ) |
Inserts the address range.
If the range overlaps with an existing range, the range that it overlaps with will be returned and the two address ranges will be unioned together in "Ranges". If a duplicate entry is attempted to be added, the duplicate range will not actually be added and the returned iterator will point to end().
This is used for finding overlapping ranges in the DW_AT_ranges attribute of a DIE. It is also used as a set of address ranges that children address ranges must all be contained in.
Definition at line 52 of file DWARFVerifier.cpp.
bool DWARFVerifier::DieRangeInfo::intersects | ( | const DieRangeInfo & | RHS | ) | const |
Return true if any range in this object intersects with any range in RHS.
Identical ranges are not considered to be intersecting.
Definition at line 118 of file DWARFVerifier.cpp.
References DieRangeInfo(), and Ranges.
std::set<DieRangeInfo> llvm::DWARFVerifier::DieRangeInfo::Children |
Sorted DWARFAddressRangeInfo.
Definition at line 78 of file DWARFVerifier.h.
Referenced by insert().
DWARFDie llvm::DWARFVerifier::DieRangeInfo::Die |
Definition at line 72 of file DWARFVerifier.h.
Referenced by DieRangeInfo().
std::vector<DWARFAddressRange> llvm::DWARFVerifier::DieRangeInfo::Ranges |
Sorted DWARFAddressRanges.
Definition at line 75 of file DWARFVerifier.h.
Referenced by contains(), DieRangeInfo(), insert(), insert(), and intersects().