blob: 86495742754d884806172606ad15d13995dfa82b [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:24 +00001//===-- ModuleChild.cpp -----------------------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "lldb/Core/ModuleChild.h"
11
12using namespace lldb_private;
13
Kate Stoneb9c1b512016-09-06 20:57:50 +000014ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
15 : m_module_wp(module_sp) {}
16
17ModuleChild::ModuleChild(const ModuleChild &rhs)
18 : m_module_wp(rhs.m_module_wp) {}
19
20ModuleChild::~ModuleChild() {}
21
22const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
23 if (this != &rhs)
24 m_module_wp = rhs.m_module_wp;
25 return *this;
Chris Lattner30fdc8d2010-06-08 16:52:24 +000026}
27
Kate Stoneb9c1b512016-09-06 20:57:50 +000028lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
Chris Lattner30fdc8d2010-06-08 16:52:24 +000029
Kate Stoneb9c1b512016-09-06 20:57:50 +000030void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
31 m_module_wp = module_sp;
Chris Lattner30fdc8d2010-06-08 16:52:24 +000032}