[DWARF] Simplify DWARFDebugAranges::findAddress
authorFangrui Song <maskray@google.com>
Sat, 6 Apr 2019 09:12:53 +0000 (09:12 +0000)
committerFangrui Song <maskray@google.com>
Sat, 6 Apr 2019 09:12:53 +0000 (09:12 +0000)
commit4be8629e4930e2c4cffca41c8cbf438b3aa05e85
tree29beb64c6d21801f14e012b84fcddec07f6dd5ca
parentcb300f124360abf1a6640926f2dc478a45ce6b1f
[DWARF] Simplify DWARFDebugAranges::findAddress

The current lower_bound approach has to check two iterators pos and pos-1.
Changing it to upper_bound allows us to check one iterator (similar to
DWARFUnitVector::getUnitFor*).

llvm-svn: 357834
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAranges.h
llvm/lib/DebugInfo/DWARF/DWARFDebugAranges.cpp