From: Frederic Riss Date: Mon, 31 Aug 2015 05:09:26 +0000 (+0000) Subject: [dsymutil] Fix caching of current range. NFC. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a4d4495cfa703e90f4dfe70c8c8c8703023d2a70;p=oota-llvm.git [dsymutil] Fix caching of current range. NFC. The current range cache will will just be hit more often, no visible external change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246409 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/dsymutil/DwarfLinker.cpp b/tools/dsymutil/DwarfLinker.cpp index 1e171db44c4..6881eab9c35 100644 --- a/tools/dsymutil/DwarfLinker.cpp +++ b/tools/dsymutil/DwarfLinker.cpp @@ -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) {