Skip to content

Commit 3641448

Browse files
committed
[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.
1 parent 965b68e commit 3641448

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lldb/source/Target/Thread.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,8 @@ bool Thread::ShouldResume(StateType resume_state) {
710710
const uint32_t process_stop_id = GetProcess()->GetStopID();
711711
if (m_stop_info_stop_id == process_stop_id &&
712712
(m_stop_info_sp && m_stop_info_sp->IsValid())) {
713-
StopInfo *stop_info = GetPrivateStopInfo().get();
714-
if (stop_info)
715-
stop_info->WillResume(resume_state);
713+
if (StopInfoSP stop_info_sp = GetPrivateStopInfo())
714+
stop_info_sp->WillResume(resume_state);
716715
}
717716

718717
// Tell all the plans that we are about to resume in case they need to clear

0 commit comments

Comments
 (0)