diff options
author | George Rimar <grimar@accesssoftek.com> | 2018-10-10 08:49:17 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2018-10-10 08:49:17 +0000 |
commit | 60b6f140cfc75fe4c519c2e3f2eb8a1d1278e1f6 (patch) | |
tree | 59d56e04fed00a7a5918585af6128fd79a756e10 | |
parent | 6c656b73c50855063be5f0cfbb31a0b805514a0f (diff) | |
download | bcm5719-llvm-60b6f140cfc75fe4c519c2e3f2eb8a1d1278e1f6.tar.gz bcm5719-llvm-60b6f140cfc75fe4c519c2e3f2eb8a1d1278e1f6.zip |
[LLDB] - Simplify. NFC.
There are several places that call `FindRanges`,
all of them use `Slide` to adjust the ranges found
by the base address.
All except one, which does the same manually in a loop.
Patch updates it to use `Slide` for consistency.
llvm-svn: 344122
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 59163a9a027..7ef21b6e4c2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -3336,14 +3336,7 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc, // All DW_AT_start_scope are relative to the base address of the // compile unit. We add the compile unit base address to make // sure all the addresses are properly fixed up. - for (size_t i = 0, count = dwarf_scope_ranges.GetSize(); - i < count; ++i) { - const DWARFRangeList::Entry &range = - dwarf_scope_ranges.GetEntryRef(i); - scope_ranges.Append(range.GetRangeBase() + - die.GetCU()->GetBaseAddress(), - range.GetByteSize()); - } + dwarf_scope_ranges.Slide(die.GetCU()->GetBaseAddress()); } else { // TODO: Handle the case when DW_AT_start_scope have form // constant. The |