[lldb] Use StopInfoSP instead of StopInfo* (NFC)

Don't make assumptions about the lifetime of the underlying object and
use the shared_ptr to participate in reference counting and extend the
lifetime of the object to the end of the lexical scope.
This commit is contained in:
Jonas Devlieghere
2025-07-18 14:15:14 -07:00
parent 965b68e8f2
commit 3641448e08

View File

@@ -710,9 +710,8 @@ bool Thread::ShouldResume(StateType resume_state) {
const uint32_t process_stop_id = GetProcess()->GetStopID();
if (m_stop_info_stop_id == process_stop_id &&
(m_stop_info_sp && m_stop_info_sp->IsValid())) {
StopInfo *stop_info = GetPrivateStopInfo().get();
if (stop_info)
stop_info->WillResume(resume_state);
if (StopInfoSP stop_info_sp = GetPrivateStopInfo())
stop_info_sp->WillResume(resume_state);
}
// Tell all the plans that we are about to resume in case they need to clear