xref: /openbsd-src/gnu/llvm/lldb/source/Core/ModuleChild.cpp (revision be691f3bb6417f04a68938fadbcaee2d5795e764)
1dda28197Spatrick //===-- ModuleChild.cpp ---------------------------------------------------===//
2061da546Spatrick //
3061da546Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4061da546Spatrick // See https://llvm.org/LICENSE.txt for license information.
5061da546Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6061da546Spatrick //
7061da546Spatrick //===----------------------------------------------------------------------===//
8061da546Spatrick 
9061da546Spatrick #include "lldb/Core/ModuleChild.h"
10061da546Spatrick 
11061da546Spatrick using namespace lldb_private;
12061da546Spatrick 
ModuleChild(const lldb::ModuleSP & module_sp)13061da546Spatrick ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
14061da546Spatrick     : m_module_wp(module_sp) {}
15061da546Spatrick 
16*be691f3bSpatrick ModuleChild::~ModuleChild() = default;
17061da546Spatrick 
operator =(const ModuleChild & rhs)18061da546Spatrick const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
19061da546Spatrick   if (this != &rhs)
20061da546Spatrick     m_module_wp = rhs.m_module_wp;
21061da546Spatrick   return *this;
22061da546Spatrick }
23061da546Spatrick 
GetModule() const24061da546Spatrick lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
25061da546Spatrick 
SetModule(const lldb::ModuleSP & module_sp)26061da546Spatrick void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
27061da546Spatrick   m_module_wp = module_sp;
28061da546Spatrick }
29