summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp2
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp4
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp8
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp4
4 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
index 010b0106a83..6460c9feeab 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp
@@ -115,7 +115,7 @@ void DWARFDebugAranges::construct() {
uint32_t DWARFDebugAranges::findAddress(uint64_t Address) const {
RangeCollIterator It =
- llvm::bsearch(Aranges, [=](Range RHS) { return Address < RHS.HighPC(); });
+ partition_point(Aranges, [=](Range R) { return R.HighPC() <= Address; });
if (It != Aranges.end() && It->LowPC <= Address)
return It->CUOffset;
return -1U;
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
index 65a6b57ddb5..b3f23366f2a 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
@@ -532,8 +532,8 @@ void DWARFDebugFrame::parse(DWARFDataExtractor Data) {
}
FrameEntry *DWARFDebugFrame::getEntryAtOffset(uint64_t Offset) const {
- auto It = llvm::bsearch(Entries, [=](const std::unique_ptr<FrameEntry> &E) {
- return Offset <= E->getOffset();
+ auto It = partition_point(Entries, [=](const std::unique_ptr<FrameEntry> &E) {
+ return E->getOffset() < Offset;
});
if (It != Entries.end() && (*It)->getOffset() == Offset)
return It->get();
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
index e0d62215d9b..6d8f4bee77c 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
@@ -57,8 +57,8 @@ void DWARFDebugLoc::LocationList::dump(raw_ostream &OS, bool IsLittleEndian,
DWARFDebugLoc::LocationList const *
DWARFDebugLoc::getLocationListAtOffset(uint64_t Offset) const {
- auto It = llvm::bsearch(
- Locations, [=](const LocationList &L) { return Offset <= L.Offset; });
+ auto It = partition_point(
+ Locations, [=](const LocationList &L) { return L.Offset < Offset; });
if (It != Locations.end() && It->Offset == Offset)
return &(*It);
return nullptr;
@@ -212,8 +212,8 @@ void DWARFDebugLoclists::parse(DataExtractor data, unsigned Version) {
DWARFDebugLoclists::LocationList const *
DWARFDebugLoclists::getLocationListAtOffset(uint64_t Offset) const {
- auto It = llvm::bsearch(
- Locations, [=](const LocationList &L) { return Offset <= L.Offset; });
+ auto It = partition_point(
+ Locations, [=](const LocationList &L) { return L.Offset < Offset; });
if (It != Locations.end() && It->Offset == Offset)
return &(*It);
return nullptr;
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
index cff5c288d06..047c63461cc 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFUnitIndex.cpp
@@ -172,8 +172,8 @@ DWARFUnitIndex::getFromOffset(uint32_t Offset) const {
E2->Contributions[InfoColumn].Offset;
});
}
- auto I = llvm::bsearch(OffsetLookup, [&](Entry *E2) {
- return Offset < E2->Contributions[InfoColumn].Offset;
+ auto I = partition_point(OffsetLookup, [&](Entry *E2) {
+ return E2->Contributions[InfoColumn].Offset <= Offset;
});
if (I == OffsetLookup.begin())
return nullptr;
OpenPOWER on IntegriCloud