Skip to content

Commit 3b92698

Browse files
committed
DWARF: Add "dwo_num" field to the DIERef class
Summary: When dwo support was introduced, it used a trick where debug info entries were referenced by the offset of the compile unit in the main file, but the die offset was relative to the dwo file. Although there was some elegance to it, this representation was starting to reach its breaking point: - the fact that the skeleton compile unit owned the DWO file meant that it was impossible (or at least hard and unintuitive) to support DWO files containing more than one compile unit. These kinds of files are produced by LTO for example. - it made it impossible to reference any DIEs in the skeleton compile unit (although the skeleton units are generally empty, clang still puts some info into them with -fsplit-dwarf-inlining). - (current motivation) it made it very hard to support type units placed in DWO files, as type units don't have any skeleton units which could be referenced in the main file This patch addresses this problem by introducing an new "dwo_num" field to the DIERef class, whose purpose is to identify the dwo file. It's kind of similar to the dwo_id field in DWARF5 unit headers, but while this is a 64bit hash whose main purpose is to catch file mismatches, this is just a smaller integer used to indentify a loaded dwo file. Currently, this is based on the index of the skeleton compile unit which owns the dwo file, but it is intended to be eventually independent of that (to support the LTO use case). Simultaneously the cu_offset is dropped to conserve space, as it is no longer necessary. This means we can remove the "BaseObjectOffset" field from the DWARFUnit class. It also means we can remove some of the workarounds put in place to support the skeleton-unit+dwo-die combo. More work is needed to remove all of them, which is out of scope of this patch. Reviewers: JDevlieghere, clayborg, aprantl Subscribers: mehdi_amini, dexonsmith, arphaman, lldb-commits Differential Revision: https://reviews.llvm.org/D63428 llvm-svn: 364009
1 parent b9b1aaf commit 3b92698

24 files changed

+136
-138
lines changed

lldb/lit/SymbolFile/DWARF/find-variable-file.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88
// RUN: lldb-test symbols --file=find-variable-file-2.cpp --find=variable %t | \
99
// RUN: FileCheck --check-prefix=TWO %s
1010

11+
// Run the same test with split-dwarf. This is interesting because the two
12+
// split compile units will have the same offset (0).
13+
// RUN: %clang -g -c -o %t-1.o --target=x86_64-pc-linux -gsplit-dwarf %s
14+
// RUN: %clang -g -c -o %t-2.o --target=x86_64-pc-linux -gsplit-dwarf %S/Inputs/find-variable-file-2.cpp
15+
// RUN: ld.lld %t-1.o %t-2.o -o %t
16+
// RUN: lldb-test symbols --file=find-variable-file.cpp --find=variable %t | \
17+
// RUN: FileCheck --check-prefix=ONE %s
18+
// RUN: lldb-test symbols --file=find-variable-file-2.cpp --find=variable %t | \
19+
// RUN: FileCheck --check-prefix=TWO %s
20+
1121
// RUN: %clang -g -c -o %t-1.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf %s
1222
// RUN: %clang -g -c -o %t-2.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf %S/Inputs/find-variable-file-2.cpp
1323
// RUN: ld.lld %t-1.o %t-2.o -o %t

lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "Plugins/SymbolFile/DWARF/AppleDWARFIndex.h"
10-
#include "Plugins/SymbolFile/DWARF/DWARFDebugInfo.h"
1110
#include "Plugins/SymbolFile/DWARF/DWARFDeclContext.h"
1211
#include "Plugins/SymbolFile/DWARF/DWARFUnit.h"
1312
#include "Plugins/SymbolFile/DWARF/LogChannelDWARF.h"
@@ -133,14 +132,14 @@ void AppleDWARFIndex::GetNamespaces(ConstString name, DIEArray &offsets) {
133132
m_apple_namespaces_up->FindByName(name.GetStringRef(), offsets);
134133
}
135134

136-
void AppleDWARFIndex::GetFunctions(ConstString name, DWARFDebugInfo &info,
135+
void AppleDWARFIndex::GetFunctions(ConstString name, SymbolFileDWARF &dwarf,
137136
const CompilerDeclContext &parent_decl_ctx,
138137
uint32_t name_type_mask,
139138
std::vector<DWARFDIE> &dies) {
140139
DIEArray offsets;
141140
m_apple_names_up->FindByName(name.GetStringRef(), offsets);
142141
for (const DIERef &die_ref : offsets) {
143-
ProcessFunctionDIE(name.GetStringRef(), die_ref, info, parent_decl_ctx,
142+
ProcessFunctionDIE(name.GetStringRef(), die_ref, dwarf, parent_decl_ctx,
144143
name_type_mask, dies);
145144
}
146145
}

lldb/source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class AppleDWARFIndex : public DWARFIndex {
4242
void GetTypes(ConstString name, DIEArray &offsets) override;
4343
void GetTypes(const DWARFDeclContext &context, DIEArray &offsets) override;
4444
void GetNamespaces(ConstString name, DIEArray &offsets) override;
45-
void GetFunctions(ConstString name, DWARFDebugInfo &info,
45+
void GetFunctions(ConstString name, SymbolFileDWARF &dwarf,
4646
const CompilerDeclContext &parent_decl_ctx,
4747
uint32_t name_type_mask,
4848
std::vector<DWARFDIE> &dies) override;

lldb/source/Plugins/SymbolFile/DWARF/DIERef.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
void llvm::format_provider<DIERef>::format(const DIERef &ref, raw_ostream &OS,
1313
StringRef Style) {
14+
if (ref.dwo_num())
15+
OS << format_hex_no_prefix(*ref.dwo_num(), 8) << "/";
1416
OS << (ref.section() == DIERef::DebugInfo ? "INFO" : "TYPE");
15-
if (ref.unit_offset())
16-
OS << "/" << format_hex_no_prefix(*ref.unit_offset(), 8);
1717
OS << "/" << format_hex_no_prefix(ref.die_offset(), 8);
1818
}

lldb/source/Plugins/SymbolFile/DWARF/DIERef.h

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,45 @@
1212
#include "lldb/Core/dwarf.h"
1313
#include "llvm/ADT/Optional.h"
1414
#include "llvm/Support/FormatProviders.h"
15+
#include <cassert>
1516
#include <vector>
1617

1718
/// Identifies a DWARF debug info entry within a given Module. It contains three
1819
/// "coordinates":
19-
/// - section: identifies the section of the debug info entry: debug_info or
20-
/// debug_types
21-
/// - unit_offset: the offset of the unit containing the debug info entry. For
22-
/// regular (unsplit) units, this field is optional, as the die_offset is
23-
/// enough to uniquely identify the containing unit. For split units, this
24-
/// field must contain the offset of the skeleton unit in the main object
25-
/// file.
26-
/// - die_offset: The offset of te debug info entry as an absolute offset from
20+
/// - dwo_num: identifies the dwo file in the Module. If this field is not set,
21+
/// the DIERef references the main file.
22+
/// - section: identifies the section of the debug info entry in the given file:
23+
/// debug_info or debug_types.
24+
/// - die_offset: The offset of the debug info entry as an absolute offset from
2725
/// the beginning of the section specified in the section field.
2826
class DIERef {
2927
public:
3028
enum Section : uint8_t { DebugInfo, DebugTypes };
3129

32-
DIERef(Section s, llvm::Optional<dw_offset_t> u, dw_offset_t d)
33-
: m_section(s), m_unit_offset(u.getValueOr(DW_INVALID_OFFSET)),
34-
m_die_offset(d) {}
35-
36-
Section section() const { return static_cast<Section>(m_section); }
30+
DIERef(llvm::Optional<uint32_t> dwo_num, Section section,
31+
dw_offset_t die_offset)
32+
: m_dwo_num(dwo_num.getValueOr(0)), m_dwo_num_valid(bool(dwo_num)),
33+
m_section(section), m_die_offset(die_offset) {
34+
assert(this->dwo_num() == dwo_num && "Dwo number out of range?");
35+
}
3736

38-
llvm::Optional<dw_offset_t> unit_offset() const {
39-
if (m_unit_offset != DW_INVALID_OFFSET)
40-
return m_unit_offset;
37+
llvm::Optional<uint32_t> dwo_num() const {
38+
if (m_dwo_num_valid)
39+
return m_dwo_num;
4140
return llvm::None;
4241
}
4342

43+
Section section() const { return static_cast<Section>(m_section); }
44+
4445
dw_offset_t die_offset() const { return m_die_offset; }
4546

4647
private:
47-
unsigned m_section : 1;
48-
dw_offset_t m_unit_offset;
48+
uint32_t m_dwo_num : 30;
49+
uint32_t m_dwo_num_valid : 1;
50+
uint32_t m_section : 1;
4951
dw_offset_t m_die_offset;
5052
};
53+
static_assert(sizeof(DIERef) == 8, "");
5154

5255
typedef std::vector<DIERef> DIEArray;
5356

lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ llvm::Optional<DIERef> DWARFBaseDIE::GetDIERef() const {
2121
if (!IsValid())
2222
return llvm::None;
2323

24-
dw_offset_t cu_offset = m_cu->GetOffset();
25-
if (m_cu->GetBaseObjOffset() != DW_INVALID_OFFSET)
26-
cu_offset = m_cu->GetBaseObjOffset();
27-
return DIERef(m_cu->GetDebugSection(), cu_offset, m_die->GetOffset());
24+
return DIERef(m_cu->GetSymbolFileDWARF().GetDwoNum(), m_cu->GetDebugSection(),
25+
m_die->GetOffset());
2826
}
2927

3028
dw_tag_t DWARFBaseDIE::Tag() const {

lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ DWARFDIE::LookupDeepestBlock(lldb::addr_t file_addr) const {
151151
if (cu->ContainsDIEOffset(block_die->GetOffset()))
152152
return DWARFDIE(cu, block_die);
153153
else
154-
return DWARFDIE(dwarf->DebugInfo()->GetUnit(
155-
DIERef(cu->GetDebugSection(), cu->GetOffset(),
156-
block_die->GetOffset())),
154+
return DWARFDIE(dwarf->DebugInfo()->GetUnit(DIERef(
155+
cu->GetSymbolFileDWARF().GetDwoNum(),
156+
cu->GetDebugSection(), block_die->GetOffset())),
157157
block_die);
158158
}
159159
}

lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ DWARFUnit *DWARFDebugInfo::GetUnitAtOffset(DIERef::Section section,
149149
}
150150

151151
DWARFUnit *DWARFDebugInfo::GetUnit(const DIERef &die_ref) {
152-
if (die_ref.unit_offset())
153-
return GetUnitAtOffset(die_ref.section(), *die_ref.unit_offset());
154152
return GetUnitContainingDIEOffset(die_ref.section(), die_ref.die_offset());
155153
}
156154

lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,6 @@ bool DWARFDebugInfoEntry::GetDIENamesAndRanges(
226226
DWARFRangeList &ranges, int &decl_file, int &decl_line, int &decl_column,
227227
int &call_file, int &call_line, int &call_column,
228228
DWARFExpression *frame_base) const {
229-
SymbolFileDWARFDwo *dwo_symbol_file = cu->GetDwoSymbolFile();
230-
if (dwo_symbol_file)
231-
return GetDIENamesAndRanges(
232-
dwo_symbol_file->GetCompileUnit(), name, mangled, ranges, decl_file,
233-
decl_line, decl_column, call_file, call_line, call_column, frame_base);
234-
235229
dw_addr_t lo_pc = LLDB_INVALID_ADDRESS;
236230
dw_addr_t hi_pc = LLDB_INVALID_ADDRESS;
237231
std::vector<DWARFDIE> dies;
@@ -611,16 +605,7 @@ dw_offset_t DWARFDebugInfoEntry::GetAttributeValue(
611605
const DWARFUnit *cu, const dw_attr_t attr, DWARFFormValue &form_value,
612606
dw_offset_t *end_attr_offset_ptr,
613607
bool check_specification_or_abstract_origin) const {
614-
SymbolFileDWARFDwo *dwo_symbol_file = cu->GetDwoSymbolFile();
615-
if (dwo_symbol_file && m_tag != DW_TAG_compile_unit &&
616-
m_tag != DW_TAG_partial_unit)
617-
return GetAttributeValue(dwo_symbol_file->GetCompileUnit(), attr,
618-
form_value, end_attr_offset_ptr,
619-
check_specification_or_abstract_origin);
620-
621-
auto abbrevDecl = GetAbbreviationDeclarationPtr(cu);
622-
623-
if (abbrevDecl) {
608+
if (auto *abbrevDecl = GetAbbreviationDeclarationPtr(cu)) {
624609
uint32_t attr_idx = abbrevDecl->FindAttributeIndex(attr);
625610

626611
if (attr_idx != DW_INVALID_INDEX) {
@@ -665,6 +650,10 @@ dw_offset_t DWARFDebugInfoEntry::GetAttributeValue(
665650
}
666651
}
667652

653+
// If we're a unit DIE, also check the attributes of the dwo unit (if any).
654+
if (GetParent())
655+
return 0;
656+
SymbolFileDWARFDwo *dwo_symbol_file = cu->GetDwoSymbolFile();
668657
if (!dwo_symbol_file)
669658
return 0;
670659

lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "Plugins/SymbolFile/DWARF/DWARFIndex.h"
10-
#include "Plugins/SymbolFile/DWARF/DWARFDIE.h"
11-
#include "Plugins/SymbolFile/DWARF/DWARFDebugInfo.h"
12-
1310
#include "Plugins/Language/ObjC/ObjCLanguage.h"
11+
#include "Plugins/SymbolFile/DWARF/DWARFDIE.h"
12+
#include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
1413

1514
using namespace lldb_private;
1615
using namespace lldb;
1716

1817
DWARFIndex::~DWARFIndex() = default;
1918

2019
void DWARFIndex::ProcessFunctionDIE(llvm::StringRef name, DIERef ref,
21-
DWARFDebugInfo &info,
20+
SymbolFileDWARF &dwarf,
2221
const CompilerDeclContext &parent_decl_ctx,
2322
uint32_t name_type_mask,
2423
std::vector<DWARFDIE> &dies) {
25-
DWARFDIE die = info.GetDIE(ref);
24+
DWARFDIE die = dwarf.GetDIE(ref);
2625
if (!die) {
2726
ReportInvalidDIERef(ref, name);
2827
return;

lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "Plugins/SymbolFile/DWARF/DWARFDIE.h"
1414
#include "Plugins/SymbolFile/DWARF/DWARFFormValue.h"
1515

16-
class DWARFDebugInfo;
1716
class DWARFDeclContext;
1817
class DWARFDIE;
1918

@@ -40,7 +39,7 @@ class DWARFIndex {
4039
virtual void GetTypes(ConstString name, DIEArray &offsets) = 0;
4140
virtual void GetTypes(const DWARFDeclContext &context, DIEArray &offsets) = 0;
4241
virtual void GetNamespaces(ConstString name, DIEArray &offsets) = 0;
43-
virtual void GetFunctions(ConstString name, DWARFDebugInfo &info,
42+
virtual void GetFunctions(ConstString name, SymbolFileDWARF &dwarf,
4443
const CompilerDeclContext &parent_decl_ctx,
4544
uint32_t name_type_mask,
4645
std::vector<DWARFDIE> &dies) = 0;
@@ -58,7 +57,7 @@ class DWARFIndex {
5857
/// "parent_decl_ctx" and "name_type_mask", it is inserted into the "dies"
5958
/// vector.
6059
void ProcessFunctionDIE(llvm::StringRef name, DIERef ref,
61-
DWARFDebugInfo &info,
60+
SymbolFileDWARF &dwarf,
6261
const CompilerDeclContext &parent_decl_ctx,
6362
uint32_t name_type_mask, std::vector<DWARFDIE> &dies);
6463
};

lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ void DWARFUnit::AddUnitDIE(const DWARFDebugInfoEntry &cu_die) {
363363
else if (gnu_ranges_base)
364364
dwo_cu->SetRangesBase(*gnu_ranges_base);
365365

366-
dwo_cu->SetBaseObjOffset(GetOffset());
367366
SetDwoStrOffsetsBase(dwo_cu);
368367
}
369368

@@ -419,10 +418,6 @@ void DWARFUnit::SetRangesBase(dw_addr_t ranges_base) {
419418
m_ranges_base = ranges_base;
420419
}
421420

422-
void DWARFUnit::SetBaseObjOffset(dw_offset_t base_obj_offset) {
423-
m_base_obj_offset = base_obj_offset;
424-
}
425-
426421
void DWARFUnit::SetStrOffsetsBase(dw_offset_t str_offsets_base) {
427422
m_str_offsets_base = str_offsets_base;
428423
}
@@ -480,6 +475,12 @@ DWARFUnit::GetDIE(dw_offset_t die_offset) {
480475
return DWARFDIE(); // Not found
481476
}
482477

478+
DWARFUnit &DWARFUnit::GetNonSkeletonUnit() {
479+
if (SymbolFileDWARFDwo *dwo = GetDwoSymbolFile())
480+
return *dwo->GetCompileUnit();
481+
return *this;
482+
}
483+
483484
uint8_t DWARFUnit::GetAddressByteSize(const DWARFUnit *cu) {
484485
if (cu)
485486
return cu->GetAddressByteSize();
@@ -719,8 +720,6 @@ SymbolFileDWARFDwo *DWARFUnit::GetDwoSymbolFile() const {
719720
return m_dwo_symbol_file.get();
720721
}
721722

722-
dw_offset_t DWARFUnit::GetBaseObjOffset() const { return m_base_obj_offset; }
723-
724723
const DWARFDebugAranges &DWARFUnit::GetFunctionAranges() {
725724
if (m_func_aranges_up == nullptr) {
726725
m_func_aranges_up.reset(new DWARFDebugAranges());

lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ class DWARFUnit : public lldb_private::UserID {
148148
dw_addr_t GetStrOffsetsBase() const { return m_str_offsets_base; }
149149
void SetAddrBase(dw_addr_t addr_base);
150150
void SetRangesBase(dw_addr_t ranges_base);
151-
void SetBaseObjOffset(dw_offset_t base_obj_offset);
152151
void SetStrOffsetsBase(dw_offset_t str_offsets_base);
153152
virtual void BuildAddressRangeTable(DWARFDebugAranges *debug_aranges) = 0;
154153

@@ -166,6 +165,8 @@ class DWARFUnit : public lldb_private::UserID {
166165

167166
DWARFDIE GetDIE(dw_offset_t die_offset);
168167

168+
DWARFUnit &GetNonSkeletonUnit();
169+
169170
static uint8_t GetAddressByteSize(const DWARFUnit *cu);
170171

171172
static uint8_t GetDefaultAddressSize();
@@ -203,8 +204,6 @@ class DWARFUnit : public lldb_private::UserID {
203204

204205
SymbolFileDWARFDwo *GetDwoSymbolFile() const;
205206

206-
dw_offset_t GetBaseObjOffset() const;
207-
208207
die_iterator_range dies() {
209208
ExtractDIEsIfNeeded();
210209
return die_iterator_range(m_die_array.begin(), m_die_array.end());
@@ -284,9 +283,6 @@ class DWARFUnit : public lldb_private::UserID {
284283
llvm::Optional<lldb_private::FileSpec> m_file_spec;
285284
dw_addr_t m_addr_base = 0; // Value of DW_AT_addr_base
286285
dw_addr_t m_ranges_base = 0; // Value of DW_AT_ranges_base
287-
// If this is a dwo compile unit this is the offset of the base compile unit
288-
// in the main object file
289-
dw_offset_t m_base_obj_offset = DW_INVALID_OFFSET;
290286

291287
/// Value of DW_AT_stmt_list.
292288
dw_offset_t m_line_table_offset = DW_INVALID_OFFSET;

lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@ DebugNamesDWARFIndex::ToDIERef(const DebugNames::Entry &entry) {
6464
// GetDwoSymbolFile to call this automatically because of mutual recursion
6565
// between this and DWARFDebugInfoEntry::GetAttributeValue.
6666
cu->ExtractUnitDIEIfNeeded();
67-
uint64_t die_bias = cu->GetDwoSymbolFile() ? 0 : *cu_offset;
67+
cu = &cu->GetNonSkeletonUnit();
6868

6969
if (llvm::Optional<uint64_t> die_offset = entry.getDIEUnitOffset())
70-
return DIERef(DIERef::Section::DebugInfo, *cu_offset, die_bias + *die_offset);
70+
return DIERef(cu->GetSymbolFileDWARF().GetDwoNum(),
71+
DIERef::Section::DebugInfo, cu->GetOffset() + *die_offset);
7172

7273
return llvm::None;
7374
}
@@ -165,8 +166,7 @@ void DebugNamesDWARFIndex::GetCompleteObjCClass(ConstString class_name,
165166
if (!ref)
166167
continue;
167168

168-
DWARFUnit *cu = m_debug_info.GetUnitAtOffset(DIERef::Section::DebugInfo,
169-
*ref->unit_offset());
169+
DWARFUnit *cu = m_debug_info.GetUnit(*ref);
170170
if (!cu || !cu->Supports_DW_AT_APPLE_objc_complete_type()) {
171171
incomplete_types.push_back(*ref);
172172
continue;
@@ -222,12 +222,12 @@ void DebugNamesDWARFIndex::GetNamespaces(ConstString name, DIEArray &offsets) {
222222
}
223223

224224
void DebugNamesDWARFIndex::GetFunctions(
225-
ConstString name, DWARFDebugInfo &info,
225+
ConstString name, SymbolFileDWARF &dwarf,
226226
const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask,
227227
std::vector<DWARFDIE> &dies) {
228228

229229
std::vector<DWARFDIE> v;
230-
m_fallback.GetFunctions(name, info, parent_decl_ctx, name_type_mask, v);
230+
m_fallback.GetFunctions(name, dwarf, parent_decl_ctx, name_type_mask, v);
231231

232232
for (const DebugNames::Entry &entry :
233233
m_debug_names_up->equal_range(name.GetStringRef())) {
@@ -236,7 +236,7 @@ void DebugNamesDWARFIndex::GetFunctions(
236236
continue;
237237

238238
if (llvm::Optional<DIERef> ref = ToDIERef(entry))
239-
ProcessFunctionDIE(name.GetStringRef(), *ref, info, parent_decl_ctx,
239+
ProcessFunctionDIE(name.GetStringRef(), *ref, dwarf, parent_decl_ctx,
240240
name_type_mask, v);
241241
}
242242

lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class DebugNamesDWARFIndex : public DWARFIndex {
3434
void GetTypes(ConstString name, DIEArray &offsets) override;
3535
void GetTypes(const DWARFDeclContext &context, DIEArray &offsets) override;
3636
void GetNamespaces(ConstString name, DIEArray &offsets) override;
37-
void GetFunctions(ConstString name, DWARFDebugInfo &info,
37+
void GetFunctions(ConstString name, SymbolFileDWARF &dwarf,
3838
const CompilerDeclContext &parent_decl_ctx,
3939
uint32_t name_type_mask,
4040
std::vector<DWARFDIE> &dies) override;

lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class DWARFMappedHash {
6161
DIEInfo(dw_offset_t o, dw_tag_t t, uint32_t f, uint32_t h);
6262

6363
explicit operator DIERef() const {
64-
return DIERef(DIERef::Section::DebugInfo, llvm::None, die_offset);
64+
return DIERef(llvm::None, DIERef::Section::DebugInfo, die_offset);
6565
}
6666
};
6767

0 commit comments

Comments
 (0)