[Lldb-commits] [PATCH] D62943: DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 7 02:40:51 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362783: DWARF: Simplify SymbolFileDWARF::GetDWARFCompileUnit (authored by labath, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62943/new/
https://reviews.llvm.org/D62943
Files:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
===================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -608,15 +608,7 @@
if (!comp_unit)
return nullptr;
- DWARFDebugInfo *info = DebugInfo();
- if (info) {
- // The compile unit ID is the index of the DWARF unit.
- DWARFUnit *dwarf_cu = info->GetUnitAtIndex(comp_unit->GetID());
- if (dwarf_cu && dwarf_cu->GetUserData() == nullptr)
- dwarf_cu->SetUserData(comp_unit);
- return dwarf_cu;
- }
- return nullptr;
+ return static_cast<DWARFUnit *>(comp_unit->GetUserData());
}
DWARFDebugRangesBase *SymbolFileDWARF::GetDebugRanges() {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62943.203517.patch
Type: text/x-patch
Size: 788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190607/8a81765f/attachment.bin>
More information about the lldb-commits
mailing list