diff options
| author | Fangrui Song <maskray@google.com> | 2019-04-17 07:58:05 +0000 | 
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2019-04-17 07:58:05 +0000 | 
| commit | c82e92bca89f3b9740e8c66afae0298965c3183a (patch) | |
| tree | 7731c7923970f33e032136221a4ea177659a7ccf /llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp | |
| parent | b0b65cae592206d49e155bfc6ed0cbcf368061f4 (diff) | |
| download | bcm5719-llvm-c82e92bca89f3b9740e8c66afae0298965c3183a.tar.gz bcm5719-llvm-c82e92bca89f3b9740e8c66afae0298965c3183a.zip | |
Change some llvm::{lower,upper}_bound to llvm::bsearch. NFC
llvm-svn: 358564
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp')
| -rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp | 10 | 
1 files changed, 4 insertions, 6 deletions
| diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp index 7c80b3bb3e9..e0d62215d9b 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp @@ -57,9 +57,8 @@ void DWARFDebugLoc::LocationList::dump(raw_ostream &OS, bool IsLittleEndian,  DWARFDebugLoc::LocationList const *  DWARFDebugLoc::getLocationListAtOffset(uint64_t Offset) const { -  auto It = llvm::lower_bound( -      Locations, Offset, -      [](const LocationList &L, uint64_t Offset) { return L.Offset < Offset; }); +  auto It = llvm::bsearch( +      Locations, [=](const LocationList &L) { return Offset <= L.Offset; });    if (It != Locations.end() && It->Offset == Offset)      return &(*It);    return nullptr; @@ -213,9 +212,8 @@ void DWARFDebugLoclists::parse(DataExtractor data, unsigned Version) {  DWARFDebugLoclists::LocationList const *  DWARFDebugLoclists::getLocationListAtOffset(uint64_t Offset) const { -  auto It = llvm::lower_bound( -      Locations, Offset, -      [](const LocationList &L, uint64_t Offset) { return L.Offset < Offset; }); +  auto It = llvm::bsearch( +      Locations, [=](const LocationList &L) { return Offset <= L.Offset; });    if (It != Locations.end() && It->Offset == Offset)      return &(*It);    return nullptr; | 

