21 if (Range.
size() == 0)
26 while (It2 !=
Ranges.end() && It2->Start < Range.
End)
30 It =
Ranges.erase(It, It2);
32 if (It !=
Ranges.begin() && Range.
Start < It[-1].End)
42 return It !=
Ranges.begin() && Addr < It[-1].End;
46 if (Range.
size() == 0)
53 return Range.
End <= It[-1].End;
62 for (
size_t I = 0;
I <
Size; ++
I) {
78 const uint64_t AddrOffset = Data.
getULEB128(&Offset);
80 const uint64_t StartAddr = BaseAddr + AddrOffset;
82 End = StartAddr +
Size;
90 Range.encode(O, BaseAddr);
100 for (
auto &Range :
Ranges)
101 Range.decode(Data, BaseAddr, Offset);
110 uint64_t NumRanges = Data.
getULEB128(&Offset);
111 for (uint64_t
I=0;
I<NumRanges; ++
I)
static uint64_t skip(DataExtractor &Data, uint64_t &Offset)
Skip an address range object in the specified data a the specified offset.
This class represents lattice values for constants.
void writeULEB(uint64_t Value)
Write the value into the stream encoded using unsigned LEB128 at the current file position...
void encode(FileWriter &O, uint64_t BaseAddr) const
bool contains(uint64_t Addr) const
void decode(DataExtractor &Data, uint64_t BaseAddr, uint64_t &Offset)
AddressRange objects are encoded and decoded to be relative to a base address.
The AddressRanges class helps normalize address range collections.
auto partition_point(R &&Range, Predicate P) -> decltype(adl_begin(Range))
Binary search for the first iterator in a range where a predicate is false.
A simplified binary data writer class that doesn't require targets, target definitions, architectures, or require any other optional compile time libraries to be enabled via the build process.
A class that represents an address range.
void insert(AddressRange Range)
Align max(MaybeAlign Lhs, Align Rhs)
void encode(FileWriter &O, uint64_t BaseAddr) const
void decode(DataExtractor &Data, uint64_t BaseAddr, uint64_t &Offset)
Address ranges are decoded and encoded to be relative to a base address.
static void skip(DataExtractor &Data, uint64_t &Offset)
Skip an address range object in the specified data a the specified offset.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
raw_ostream & operator<<(raw_ostream &OS, const FunctionInfo &R)
auto upper_bound(R &&Range, T &&Value) -> decltype(adl_begin(Range))
Provide wrappers to std::upper_bound which take ranges instead of having to pass begin/end explicitly...