|
LLVM
10.0.0
|
The AddressRanges class helps normalize address range collections. More...
#include "llvm/DebugInfo/GSYM/Range.h"
Public Member Functions | |
| void | clear () |
| bool | empty () const |
| bool | contains (uint64_t Addr) const |
| bool | contains (AddressRange Range) const |
| void | insert (AddressRange Range) |
| size_t | size () const |
| bool | operator== (const AddressRanges &RHS) const |
| const AddressRange & | operator[] (size_t i) const |
| Collection::const_iterator | begin () const |
| Collection::const_iterator | end () const |
| void | decode (DataExtractor &Data, uint64_t BaseAddr, uint64_t &Offset) |
| Address ranges are decoded and encoded to be relative to a base address. More... | |
| void | encode (FileWriter &O, uint64_t BaseAddr) const |
Static Public Member Functions | |
| static uint64_t | skip (DataExtractor &Data, uint64_t &Offset) |
| Skip an address range object in the specified data a the specified offset. More... | |
Protected Types | |
| using | Collection = std::vector< AddressRange > |
Protected Attributes | |
| Collection | Ranges |
The AddressRanges class helps normalize address range collections.
This class keeps a sorted vector of AddressRange objects and can perform insertions and searches efficiently. The address ranges are always sorted and never contain any invalid or empty address ranges. This allows us to emit address ranges into the GSYM file efficiently. Intersecting address ranges are combined during insertion so that we can emit the most compact representation for address ranges when writing to disk.
|
protected |
|
inline |
|
inline |
Definition at line 88 of file Range.h.
Referenced by llvm::gsym::InlineInfo::clear(), and decode().
| bool AddressRanges::contains | ( | uint64_t | Addr | ) | const |
Definition at line 38 of file Range.cpp.
References llvm::partition_point(), and Ranges.
Referenced by llvm::gsym::InlineInfo::encode(), and getInlineStackHelper().
| bool AddressRanges::contains | ( | AddressRange | Range | ) | const |
Definition at line 45 of file Range.cpp.
References llvm::gsym::AddressRange::End, llvm::partition_point(), Ranges, llvm::gsym::AddressRange::size(), and llvm::gsym::AddressRange::Start.
| void AddressRanges::decode | ( | DataExtractor & | Data, |
| uint64_t | BaseAddr, | ||
| uint64_t & | Offset | ||
| ) |
Address ranges are decoded and encoded to be relative to a base address.
See the AddressRange comment for the encode and decode methods for full details.
Definition at line 93 of file Range.cpp.
References clear(), llvm::DataExtractor::getULEB128(), and Ranges.
Referenced by decode().
|
inline |
Definition at line 89 of file Range.h.
References llvm::gsym::AddressRange::contains().
Referenced by decode(), and llvm::gsym::InlineInfo::isValid().
| void AddressRanges::encode | ( | FileWriter & | O, |
| uint64_t | BaseAddr | ||
| ) | const |
Definition at line 85 of file Range.cpp.
References Ranges, and llvm::gsym::FileWriter::writeULEB().
Referenced by llvm::gsym::InlineInfo::encode().
|
inline |
Definition at line 102 of file Range.h.
References llvm::Data, llvm::gsym::AddressRange::decode(), llvm::gsym::AddressRange::encode(), llvm::RISCVFenceField::O, llvm::gsym::operator<<(), and llvm::gsym::AddressRange::skip().
| void AddressRanges::insert | ( | AddressRange | Range | ) |
Definition at line 20 of file Range.cpp.
References llvm::gsym::AddressRange::End, llvm::max(), Ranges, llvm::gsym::AddressRange::size(), llvm::gsym::AddressRange::Start, and llvm::upper_bound().
|
inline |
|
inline |
|
inline |
Definition at line 93 of file Range.h.
Referenced by llvm::gsym::operator<<().
|
static |
Skip an address range object in the specified data a the specified offset.
| Data | The binary stream to read the data from. |
| Offset | The byte offset within Data. |
Definition at line 109 of file Range.cpp.
References llvm::DataExtractor::getULEB128(), I, and llvm::gsym::AddressRange::skip().
Referenced by skip().
|
protected |
Definition at line 86 of file Range.h.
Referenced by contains(), decode(), encode(), insert(), and operator==().
1.8.13