[Lldb-commits] [PATCH] D72460: RangeDataVector: Support custom sorting for D63540
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jan 9 08:49:38 PST 2020
jankratochvil created this revision.
jankratochvil added a reviewer: labath.
jankratochvil added a project: LLDB.
jankratochvil marked an inline comment as done.
jankratochvil added inline comments.
jankratochvil added a child revision: D63540: Fix lookup of symbols with the same address range but different binding.
================
Comment at: lldb/include/lldb/Utility/RangeMap.h:602
RangeData(B base, S size, DataType d) : Range<B, S>(base, size), data(d) {}
-
- bool operator<(const RangeData &rhs) const {
- if (this->base == rhs.base) {
- if (this->size == rhs.size)
- return this->data < rhs.data;
- else
- return this->size < rhs.size;
- }
- return this->base < rhs.base;
- }
-
- bool operator==(const RangeData &rhs) const {
- return this->GetRangeBase() == rhs.GetRangeBase() &&
- this->GetByteSize() == rhs.GetByteSize() && this->data == rhs.data;
- }
-
- bool operator!=(const RangeData &rhs) const {
- return this->GetRangeBase() != rhs.GetRangeBase() ||
- this->GetByteSize() != rhs.GetByteSize() || this->data != rhs.data;
- }
};
----------------
These functions were used just by `RangeDataVector` (=after I removed them LLDB still builds fine) which no longer uses them so I removed them.
As suggested by @labath extended RangeDataVector so that user can provide custom sorting of the `Entry`'s `data' field.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D72460
Files:
lldb/include/lldb/Utility/RangeMap.h
lldb/unittests/Utility/RangeMapTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72460.237101.patch
Type: text/x-patch
Size: 3962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200109/7e1ab600/attachment.bin>
More information about the lldb-commits
mailing list