@@ -391,29 +391,29 @@ bool UnwindPlan::Row::operator==(const UnwindPlan::Row &rhs) const {
391391}
392392
393393void UnwindPlan::AppendRow (Row row) {
394- if (m_row_list.empty () || m_row_list.back ()-> GetOffset () != row.GetOffset ())
395- m_row_list.push_back (std::make_shared<Row>( std:: move (row) ));
394+ if (m_row_list.empty () || m_row_list.back (). GetOffset () != row.GetOffset ())
395+ m_row_list.push_back (std::move (row));
396396 else
397- * m_row_list.back () = std::move (row);
397+ m_row_list.back () = std::move (row);
398398}
399399
400400struct RowLess {
401- bool operator ()(addr_t a, const UnwindPlan::RowSP &b) const {
402- return a < b-> GetOffset ();
401+ bool operator ()(addr_t a, const UnwindPlan::Row &b) const {
402+ return a < b. GetOffset ();
403403 }
404- bool operator ()(const UnwindPlan::RowSP &a, addr_t b) const {
405- return a-> GetOffset () < b;
404+ bool operator ()(const UnwindPlan::Row &a, addr_t b) const {
405+ return a. GetOffset () < b;
406406 }
407407};
408408
409409void UnwindPlan::InsertRow (Row row, bool replace_existing) {
410410 auto it = llvm::lower_bound (m_row_list, row.GetOffset (), RowLess ());
411- if (it == m_row_list.end () || it->get ()-> GetOffset () > row.GetOffset ())
412- m_row_list.insert (it, std::make_shared<Row>( std:: move (row) ));
411+ if (it == m_row_list.end () || it->GetOffset () > row.GetOffset ())
412+ m_row_list.insert (it, std::move (row));
413413 else {
414- assert (it->get ()-> GetOffset () == row.GetOffset ());
414+ assert (it->GetOffset () == row.GetOffset ());
415415 if (replace_existing)
416- ** it = std::move (row);
416+ *it = std::move (row);
417417 }
418418}
419419
@@ -424,7 +424,7 @@ const UnwindPlan::Row *UnwindPlan::GetRowForFunctionOffset(int offset) const {
424424 return nullptr ;
425425 // upper_bound returns the row strictly greater than our desired offset, which
426426 // means that the row before it is a match.
427- return std::prev (it)-> get ( );
427+ return &* std::prev (it);
428428}
429429
430430bool UnwindPlan::IsValidRowIndex (uint32_t idx) const {
@@ -433,7 +433,7 @@ bool UnwindPlan::IsValidRowIndex(uint32_t idx) const {
433433
434434const UnwindPlan::Row *UnwindPlan::GetRowAtIndex (uint32_t idx) const {
435435 if (idx < m_row_list.size ())
436- return m_row_list[idx]. get () ;
436+ return & m_row_list[idx];
437437 LLDB_LOG (GetLog (LLDBLog::Unwind),
438438 " error: UnwindPlan::GetRowAtIndex(idx = {0}) invalid index "
439439 " (number rows is {1})" ,
@@ -447,7 +447,7 @@ const UnwindPlan::Row *UnwindPlan::GetLastRow() const {
447447 " UnwindPlan::GetLastRow() when rows are empty" );
448448 return nullptr ;
449449 }
450- return m_row_list.back (). get ();
450+ return & m_row_list.back ();
451451}
452452
453453bool UnwindPlan::PlanValidAtAddress (Address addr) {
@@ -566,9 +566,9 @@ void UnwindPlan::Dump(Stream &s, Thread *thread, lldb::addr_t base_addr) const {
566566 range.Dump (&s, target_sp.get (), Address::DumpStyleSectionNameOffset);
567567 s.EOL ();
568568 }
569- for (const auto &[index, row_sp ] : llvm::enumerate (m_row_list)) {
569+ for (const auto &[index, row ] : llvm::enumerate (m_row_list)) {
570570 s.Format (" row[{0}]: " , index);
571- row_sp-> Dump (s, this , thread, base_addr);
571+ row. Dump (s, this , thread, base_addr);
572572 s << " \n " ;
573573 }
574574}
0 commit comments