1254721Semaste//===-- ModuleChild.cpp -----------------------------------------*- C++ -*-===//
2254721Semaste//
3353358Sdim// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4353358Sdim// See https://llvm.org/LICENSE.txt for license information.
5353358Sdim// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6254721Semaste//
7254721Semaste//===----------------------------------------------------------------------===//
8254721Semaste
9254721Semaste#include "lldb/Core/ModuleChild.h"
10254721Semaste
11254721Semasteusing namespace lldb_private;
12254721Semaste
13314564SdimModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
14314564Sdim    : m_module_wp(module_sp) {}
15254721Semaste
16314564SdimModuleChild::~ModuleChild() {}
17254721Semaste
18314564Sdimconst ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
19314564Sdim  if (this != &rhs)
20314564Sdim    m_module_wp = rhs.m_module_wp;
21314564Sdim  return *this;
22254721Semaste}
23254721Semaste
24314564Sdimlldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
25254721Semaste
26314564Sdimvoid ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
27314564Sdim  m_module_wp = module_sp;
28254721Semaste}
29