[Lldb-commits] [lldb] r344122 - [LLDB] - Simplify. NFC.
George Rimar via lldb-commits
lldb-commits at lists.llvm.org
Wed Oct 10 01:49:18 PDT 2018
Author: grimar
Date: Wed Oct 10 01:49:17 2018
New Revision: 344122
URL: http://llvm.org/viewvc/llvm-project?rev=344122&view=rev
Log:
[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.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=344122&r1=344121&r2=344122&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed Oct 10 01:49:17 2018
@@ -3336,14 +3336,7 @@ VariableSP SymbolFileDWARF::ParseVariabl
// 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
More information about the lldb-commits
mailing list