LLDB  mainline
ModuleChild.cpp
Go to the documentation of this file.
1 //===-- ModuleChild.cpp -----------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
11 using namespace lldb_private;
12 
13 ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
14  : m_module_wp(module_sp) {}
15 
17  : m_module_wp(rhs.m_module_wp) {}
18 
20 
22  if (this != &rhs)
24  return *this;
25 }
26 
27 lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
28 
29 void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
30  m_module_wp = module_sp;
31 }
const ModuleChild & operator=(const ModuleChild &rhs)
Assignment operator.
Definition: ModuleChild.cpp:21
~ModuleChild()
Destructor.
Definition: ModuleChild.cpp:19
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
lldb::ModuleWP m_module_wp
The Module that owns the object that inherits from this class.
Definition: ModuleChild.h:62
lldb::ModuleSP GetModule() const
Get const accessor for the module pointer.
Definition: ModuleChild.cpp:27
void SetModule(const lldb::ModuleSP &module_sp)
Set accessor for the module pointer.
Definition: ModuleChild.cpp:29
ModuleChild(const lldb::ModuleSP &module_sp)
Construct with owning module.
Definition: ModuleChild.cpp:13
A mix in class that contains a pointer back to the module that owns the object which inherits from it...
Definition: ModuleChild.h:19