LLVM
15.0.0git
|
The AddressRanges class helps normalize address range collections. More...
#include "llvm/ADT/AddressRanges.h"
Public Member Functions | |
void | clear () |
bool | empty () const |
bool | contains (uint64_t Addr) const |
bool | contains (AddressRange Range) const |
Optional< AddressRange > | getRangeThatContains (uint64_t Addr) const |
void | insert (AddressRange Range) |
void | reserve (size_t Capacity) |
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 |
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. Intersecting address ranges are combined during insertion.
Definition at line 52 of file AddressRanges.h.
|
protected |
Definition at line 54 of file AddressRanges.h.
|
inline |
Definition at line 73 of file AddressRanges.h.
References Ranges.
|
inline |
Definition at line 58 of file AddressRanges.h.
References Ranges.
Referenced by llvm::gsym::InlineInfo::clear(), and llvm::gsym::decodeRanges().
bool AddressRanges::contains | ( | AddressRange | Range | ) | const |
Definition at line 40 of file AddressRanges.cpp.
References llvm::AddressRange::end(), llvm::partition_point(), Ranges, and llvm::AddressRange::size().
bool AddressRanges::contains | ( | uint64_t | Addr | ) | const |
Definition at line 33 of file AddressRanges.cpp.
References Addr, llvm::partition_point(), and Ranges.
Referenced by llvm::gsym::InlineInfo::encode(), getInlineStackHelper(), and llvm::gsym::GsymCreator::hasFunctionInfoForAddress().
|
inline |
Definition at line 59 of file AddressRanges.h.
References Ranges.
Referenced by llvm::gsym::encodeRanges(), llvm::gsym::InlineInfo::isValid(), and parseInlineInfo().
|
inline |
Optional< AddressRange > AddressRanges::getRangeThatContains | ( | uint64_t | Addr | ) | const |
Definition at line 52 of file AddressRanges.cpp.
References Addr, llvm::None, llvm::partition_point(), and Ranges.
void AddressRanges::insert | ( | AddressRange | Range | ) |
Definition at line 15 of file AddressRanges.cpp.
References llvm::AddressRange::end(), end(), llvm::max(), Ranges, llvm::AddressRange::size(), llvm::AddressRange::start(), and llvm::upper_bound().
Referenced by llvm::gsym::GsymCreator::addFunctionInfo(), llvm::gsym::decodeRanges(), and parseInlineInfo().
|
inline |
Definition at line 66 of file AddressRanges.h.
|
inline |
Definition at line 69 of file AddressRanges.h.
|
inline |
Definition at line 64 of file AddressRanges.h.
References Ranges.
Referenced by llvm::gsym::decodeRanges().
|
inline |
Definition at line 65 of file AddressRanges.h.
References Ranges.
Referenced by llvm::gsym::encodeRanges(), and llvm::operator<<().
|
protected |
Definition at line 55 of file AddressRanges.h.
Referenced by begin(), clear(), contains(), empty(), end(), getRangeThatContains(), insert(), operator==(), operator[](), reserve(), and size().