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 
9 #include "lldb/Core/ModuleChild.h"
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(const ModuleChild &rhs)
17     : m_module_wp(rhs.m_module_wp) {}
18 
19 ModuleChild::~ModuleChild() {}
20 
21 const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
22   if (this != &rhs)
23     m_module_wp = rhs.m_module_wp;
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 }
32