180814287SRaphael Isemann //===-- ModuleChild.cpp ---------------------------------------------------===//
230fdc8d8SChris Lattner //
32946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
42946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
52946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
630fdc8d8SChris Lattner //
730fdc8d8SChris Lattner //===----------------------------------------------------------------------===//
830fdc8d8SChris Lattner 
930fdc8d8SChris Lattner #include "lldb/Core/ModuleChild.h"
1030fdc8d8SChris Lattner 
1130fdc8d8SChris Lattner using namespace lldb_private;
1230fdc8d8SChris Lattner 
ModuleChild(const lldb::ModuleSP & module_sp)13b9c1b51eSKate Stone ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
14b9c1b51eSKate Stone     : m_module_wp(module_sp) {}
1530fdc8d8SChris Lattner 
16*fd2433e1SJonas Devlieghere ModuleChild::~ModuleChild() = default;
1730fdc8d8SChris Lattner 
operator =(const ModuleChild & rhs)18b9c1b51eSKate Stone const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
1930fdc8d8SChris Lattner   if (this != &rhs)
20e72dfb32SGreg Clayton     m_module_wp = rhs.m_module_wp;
2130fdc8d8SChris Lattner   return *this;
2230fdc8d8SChris Lattner }
2330fdc8d8SChris Lattner 
GetModule() const24b9c1b51eSKate Stone lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
2530fdc8d8SChris Lattner 
SetModule(const lldb::ModuleSP & module_sp)26b9c1b51eSKate Stone void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
27e72dfb32SGreg Clayton   m_module_wp = module_sp;
2830fdc8d8SChris Lattner }
29