summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2015-08-31 05:09:26 +0000
committerFrederic Riss <friss@apple.com>2015-08-31 05:09:26 +0000
commit7582d485cbd7928546b3ca5c83ce6280e9b82ba8 (patch)
tree4c09ba2ec5a5efdd2faf82b8b3345291fdb4fbf8
parent888d91a9e4702234c8e38fa1a6cabf315fe81b96 (diff)
downloadbcm5719-llvm-7582d485cbd7928546b3ca5c83ce6280e9b82ba8.tar.gz
bcm5719-llvm-7582d485cbd7928546b3ca5c83ce6280e9b82ba8.zip
[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
-rw-r--r--llvm/tools/dsymutil/DwarfLinker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp
index 1e171db44c4..6881eab9c35 100644
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud