LLDB  mainline
ModuleChild.cpp
Go to the documentation of this file.
1 //===-- ModuleChild.cpp ---------------------------------------------------===//
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 
16 ModuleChild::~ModuleChild() = default;
17 
19  if (this != &rhs)
21  return *this;
22 }
23 
24 lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
25 
26 void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
27  m_module_wp = module_sp;
28 }
lldb_private::ModuleChild
Definition: ModuleChild.h:19
lldb_private::ModuleChild::~ModuleChild
~ModuleChild()
Destructor.
ModuleChild.h
lldb_private::ModuleChild::m_module_wp
lldb::ModuleWP m_module_wp
The Module that owns the object that inherits from this class.
Definition: ModuleChild.h:56
lldb_private::ModuleChild::GetModule
lldb::ModuleSP GetModule() const
Get const accessor for the module pointer.
Definition: ModuleChild.cpp:24
lldb_private::ModuleChild::operator=
const ModuleChild & operator=(const ModuleChild &rhs)
Assignment operator.
Definition: ModuleChild.cpp:18
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ModuleChild::ModuleChild
ModuleChild(const lldb::ModuleSP &module_sp)
Construct with owning module.
Definition: ModuleChild.cpp:13
lldb_private::ModuleChild::SetModule
void SetModule(const lldb::ModuleSP &module_sp)
Set accessor for the module pointer.
Definition: ModuleChild.cpp:26