mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
2a187d6216
The current code is only able to return the right unit if the passed offset is the exact offset of a section. Generalize the search function by comparing againt the offset of the next unit instead and by switching the search algorithm to upper_bound. This way, the unit returned is the first unit with a getNextUnitOffset() strictly greater than the searched offset, which is exactly what we want. Note that there is no need for testing the range of the resulting unit as the offsets of a DWARFUnitSection are in a single contiguous range from 0 inclusive to lastUnit->getNextUnitOffset() exclusive. Reviewers: dblaikie samsonov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5262 llvm-svn: 218040 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
DIContext.cpp | ||
DWARFAbbreviationDeclaration.cpp | ||
DWARFAbbreviationDeclaration.h | ||
DWARFCompileUnit.cpp | ||
DWARFCompileUnit.h | ||
DWARFContext.cpp | ||
DWARFContext.h | ||
DWARFDebugAbbrev.cpp | ||
DWARFDebugAbbrev.h | ||
DWARFDebugAranges.cpp | ||
DWARFDebugAranges.h | ||
DWARFDebugArangeSet.cpp | ||
DWARFDebugArangeSet.h | ||
DWARFDebugFrame.cpp | ||
DWARFDebugFrame.h | ||
DWARFDebugInfoEntry.cpp | ||
DWARFDebugInfoEntry.h | ||
DWARFDebugLine.cpp | ||
DWARFDebugLine.h | ||
DWARFDebugLoc.cpp | ||
DWARFDebugLoc.h | ||
DWARFDebugRangeList.cpp | ||
DWARFDebugRangeList.h | ||
DWARFFormValue.cpp | ||
DWARFRelocMap.h | ||
DWARFTypeUnit.cpp | ||
DWARFTypeUnit.h | ||
DWARFUnit.cpp | ||
DWARFUnit.h | ||
LLVMBuild.txt | ||
Makefile | ||
module.modulemap |