[dsymutil] Fix caching of current range. NFC.

The current range cache will will just be hit more often, no
visible external change.

llvm-svn: 246409
This commit is contained in:
Frederic Riss 2015-08-31 05:09:26 +00:00
parent 888d91a9e4
commit 7582d485cb
1 changed files with 3 additions and 2 deletions

View File

@ -2640,8 +2640,9 @@ void DwarfLinker::patchRangesForUnit(const CompileUnit &Unit,
const auto &Entries = RangeList.getEntries();
const DWARFDebugRangeList::RangeListEntry &First = Entries.front();
if (CurrRange == InvalidRange || First.StartAddress < CurrRange.start() ||
First.StartAddress >= CurrRange.stop()) {
if (CurrRange == InvalidRange ||
First.StartAddress + OrigLowPc < CurrRange.start() ||
First.StartAddress + OrigLowPc >= CurrRange.stop()) {
CurrRange = FunctionRanges.find(First.StartAddress + OrigLowPc);
if (CurrRange == InvalidRange ||
CurrRange.start() > First.StartAddress + OrigLowPc) {