Skip to content

Commit 1882d04

Browse files
fixup! Break circular shared_ptr references
1 parent c54af40 commit 1882d04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/include/lldb/Target/Thread.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ class Thread : public std::enable_shared_from_this<Thread>,
488488
void ClearBackedThread() { m_backed_thread.reset(); }
489489

490490
/// Returns the thread that is backed by this thread, if any.
491-
lldb::ThreadSP GetBackedThread() const { return m_backed_thread; }
491+
lldb::ThreadSP GetBackedThread() const { return m_backed_thread.lock(); }
492492

493493
virtual bool SetBackingThread(const lldb::ThreadSP &thread_sp) {
494494
return false;
@@ -1370,7 +1370,7 @@ class Thread : public std::enable_shared_from_this<Thread>,
13701370
mutable std::unique_ptr<ThreadPlanStack> m_null_plan_stack_up;
13711371

13721372
/// The Thread backed by this thread, if any.
1373-
lldb::ThreadSP m_backed_thread;
1373+
lldb::ThreadWP m_backed_thread;
13741374

13751375
private:
13761376
bool m_extended_info_fetched; // Have we tried to retrieve the m_extended_info

0 commit comments

Comments
 (0)