@@ -1037,20 +1037,23 @@ bool SymbolFileDWARF::ParseLineTable(CompileUnit &comp_unit) {
1037
1037
// FIXME: Rather than parsing the whole line table and then copying it over
1038
1038
// into LLDB, we should explore using a callback to populate the line table
1039
1039
// while we parse to reduce memory usage.
1040
- std::unique_ptr<LineTable> line_table_up =
1041
- std::make_unique<LineTable>(&comp_unit );
1042
- LineSequence *sequence = line_table_up-> CreateLineSequenceContainer () ;
1040
+ std::unique_ptr<LineSequence> sequence =
1041
+ LineTable::CreateLineSequenceContainer ( );
1042
+ std::vector<std::unique_ptr< LineSequence>> sequences ;
1043
1043
for (auto &row : line_table->Rows ) {
1044
- line_table_up-> AppendLineEntryToSequence (
1045
- sequence, row.Address .Address , row.Line , row.Column , row.File ,
1044
+ LineTable:: AppendLineEntryToSequence (
1045
+ sequence. get () , row.Address .Address , row.Line , row.Column , row.File ,
1046
1046
row.IsStmt , row.BasicBlock , row.PrologueEnd , row.EpilogueBegin ,
1047
1047
row.EndSequence );
1048
1048
if (row.EndSequence ) {
1049
- line_table_up-> InsertSequence ( sequence);
1050
- sequence = line_table_up-> CreateLineSequenceContainer ();
1049
+ sequences. push_back ( std::move ( sequence) );
1050
+ sequence = LineTable:: CreateLineSequenceContainer ();
1051
1051
}
1052
1052
}
1053
1053
1054
+ std::unique_ptr<LineTable> line_table_up =
1055
+ std::make_unique<LineTable>(&comp_unit, std::move (sequences));
1056
+
1054
1057
if (SymbolFileDWARFDebugMap *debug_map_symfile = GetDebugMapSymfile ()) {
1055
1058
// We have an object file that has a line table with addresses that are not
1056
1059
// linked. We need to link the line table and convert the addresses that
0 commit comments