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