[llvm] r246409 - [dsymutil] Fix caching of current range. NFC.
Frederic Riss via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 30 22:09:26 PDT 2015
Author: friss
Date: Mon Aug 31 00:09:26 2015
New Revision: 246409
URL: http://llvm.org/viewvc/llvm-project?rev=246409&view=rev
Log:
[dsymutil] Fix caching of current range. NFC.
The current range cache will will just be hit more often, no
visible external change.
Modified:
llvm/trunk/tools/dsymutil/DwarfLinker.cpp
Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=246409&r1=246408&r2=246409&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Mon Aug 31 00:09:26 2015
@@ -2640,8 +2640,9 @@ void DwarfLinker::patchRangesForUnit(con
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) {
More information about the llvm-commits
mailing list