Skip to content

Commit f113709

Browse files
cuvipernikic
authored andcommitted
Fix DWARFASTParserRust::ParseFunctionFromDWARF for r350943
1 parent 5a1c3d2 commit f113709

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ bool DWARFASTParserRust::CompleteTypeFromDWARF(const DWARFDIE &die,
10511051
return bool(die);
10521052
}
10531053

1054-
Function *DWARFASTParserRust::ParseFunctionFromDWARF(const SymbolContext &sc,
1054+
Function *DWARFASTParserRust::ParseFunctionFromDWARF(CompileUnit &comp_unit,
10551055
const DWARFDIE &die) {
10561056
DWARFRangeList func_ranges;
10571057
const char *name = NULL;
@@ -1091,7 +1091,7 @@ Function *DWARFASTParserRust::ParseFunctionFromDWARF(const SymbolContext &sc,
10911091
std::unique_ptr<Declaration> decl_ap;
10921092
if (decl_file != 0 || decl_line != 0 || decl_column != 0)
10931093
decl_ap.reset(new Declaration(
1094-
sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(decl_file),
1094+
comp_unit.GetSupportFiles().GetFileSpecAtIndex(decl_file),
10951095
decl_line, decl_column));
10961096

10971097
SymbolFileDWARF *dwarf = die.GetDWARF();
@@ -1102,15 +1102,15 @@ Function *DWARFASTParserRust::ParseFunctionFromDWARF(const SymbolContext &sc,
11021102

11031103
if (dwarf->FixupAddress(func_range.GetBaseAddress())) {
11041104
const user_id_t func_user_id = die.GetID();
1105-
func_sp.reset(new Function(sc.comp_unit,
1105+
func_sp.reset(new Function(&comp_unit,
11061106
func_user_id, // UserID is the DIE offset
11071107
func_user_id, func_name, func_type,
11081108
func_range)); // first address range
11091109

11101110
if (func_sp.get() != NULL) {
11111111
if (frame_base.IsValid())
11121112
func_sp->GetFrameBaseExpression() = frame_base;
1113-
sc.comp_unit->AddFunction(func_sp);
1113+
comp_unit.AddFunction(func_sp);
11141114
return func_sp.get();
11151115
}
11161116
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class DWARFASTParserRust : public DWARFASTParser {
4343
bool *type_is_new_ptr) override;
4444

4545
lldb_private::Function *
46-
ParseFunctionFromDWARF(const lldb_private::SymbolContext &sc,
46+
ParseFunctionFromDWARF(lldb_private::CompileUnit &comp_unit,
4747
const DWARFDIE &die) override;
4848

4949
bool CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type,

0 commit comments

Comments
 (0)