130fdc8d8SChris Lattner //===-- ModuleChild.cpp -----------------------------------------*- C++ -*-===//
230fdc8d8SChris Lattner //
3*2946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*2946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
5*2946cd70SChandler 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 
13b9c1b51eSKate Stone ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
14b9c1b51eSKate Stone     : m_module_wp(module_sp) {}
1530fdc8d8SChris Lattner 
16b9c1b51eSKate Stone ModuleChild::ModuleChild(const ModuleChild &rhs)
17b9c1b51eSKate Stone     : m_module_wp(rhs.m_module_wp) {}
1830fdc8d8SChris Lattner 
19b9c1b51eSKate Stone ModuleChild::~ModuleChild() {}
2030fdc8d8SChris Lattner 
21b9c1b51eSKate Stone const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
2230fdc8d8SChris Lattner   if (this != &rhs)
23e72dfb32SGreg Clayton     m_module_wp = rhs.m_module_wp;
2430fdc8d8SChris Lattner   return *this;
2530fdc8d8SChris Lattner }
2630fdc8d8SChris Lattner 
27b9c1b51eSKate Stone lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
2830fdc8d8SChris Lattner 
29b9c1b51eSKate Stone void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
30e72dfb32SGreg Clayton   m_module_wp = module_sp;
3130fdc8d8SChris Lattner }
32