1*0b57cec5SDimitry Andric //===-- ModuleChild.cpp ---------------------------------------------------===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric 
9*0b57cec5SDimitry Andric #include "lldb/Core/ModuleChild.h"
10*0b57cec5SDimitry Andric 
11*0b57cec5SDimitry Andric using namespace lldb_private;
12*0b57cec5SDimitry Andric 
ModuleChild(const lldb::ModuleSP & module_sp)13*0b57cec5SDimitry Andric ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
14*0b57cec5SDimitry Andric     : m_module_wp(module_sp) {}
15*0b57cec5SDimitry Andric 
16*0b57cec5SDimitry Andric ModuleChild::~ModuleChild() = default;
17*0b57cec5SDimitry Andric 
operator =(const ModuleChild & rhs)18*0b57cec5SDimitry Andric const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
19*0b57cec5SDimitry Andric   if (this != &rhs)
20*0b57cec5SDimitry Andric     m_module_wp = rhs.m_module_wp;
21*0b57cec5SDimitry Andric   return *this;
22*0b57cec5SDimitry Andric }
23*0b57cec5SDimitry Andric 
GetModule() const24*0b57cec5SDimitry Andric lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
25*0b57cec5SDimitry Andric 
SetModule(const lldb::ModuleSP & module_sp)26*0b57cec5SDimitry Andric void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
27*0b57cec5SDimitry Andric   m_module_wp = module_sp;
28*0b57cec5SDimitry Andric }
29