summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2017-07-18 09:24:48 +0000
committerPavel Labath <labath@google.com>2017-07-18 09:24:48 +0000
commit82abefa4b12f9d9bf884c001a6ec93d6352752f5 (patch)
tree40564824a0055396557c863b55ac513ead4ab861 /lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
parent095ec3da81de90fd74cde9c74835893c14b06c6a (diff)
downloadbcm5719-llvm-82abefa4b12f9d9bf884c001a6ec93d6352752f5.tar.gz
bcm5719-llvm-82abefa4b12f9d9bf884c001a6ec93d6352752f5.zip
Remove shared pointer from NativeProcessProtocol
Summary: The usage of shared_from_this forces us to separate construction and initialization phases, because shared_from_this() is not available in the constructor (or destructor). The shared semantics are not necessary, as we always have a clear owner of the native process class (GDBRemoteCommunicationServerLLDB object). Even if we need shared semantics in the future (which I think we should strongly avoid), reverting this will not be necessary -- the owners can still easily store the native process object in a shared pointer if they really want to -- this just prevents the knowledge of that from leaking into the class implementation. After this a NativeThread object will hold a reference to the parent process (instead of a weak_ptr) -- having a process instance always available allows us to simplify some logic in this class (some of it was already simplified because we were asserting that the process is available, but this makes it obvious). Reviewers: krytarowski, eugene, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D35123 llvm-svn: 308282
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeThreadLinux.h')
-rw-r--r--lldb/source/Plugins/Process/Linux/NativeThreadLinux.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
index b9126b3752a..54bec3d7750 100644
--- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
+++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.h
@@ -27,7 +27,7 @@ class NativeThreadLinux : public NativeThreadProtocol {
friend class NativeProcessLinux;
public:
- NativeThreadLinux(NativeProcessLinux *process, lldb::tid_t tid);
+ NativeThreadLinux(NativeProcessLinux &process, lldb::tid_t tid);
// ---------------------------------------------------------------------
// NativeThreadProtocol Interface
OpenPOWER on IntegriCloud