]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/llvm/tools/lldb/source/Core/ModuleChild.cpp
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / llvm / tools / lldb / source / Core / ModuleChild.cpp
1 //===-- 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
12 using namespace lldb_private;
13
14 ModuleChild::ModuleChild (const lldb::ModuleSP &module_sp) :
15     m_module_wp (module_sp)
16 {
17 }
18
19 ModuleChild::ModuleChild (const ModuleChild& rhs) :
20     m_module_wp(rhs.m_module_wp)
21 {
22 }
23
24 ModuleChild::~ModuleChild()
25 {
26 }
27
28 const ModuleChild&
29 ModuleChild::operator= (const ModuleChild& rhs)
30 {
31     if (this != &rhs)
32         m_module_wp = rhs.m_module_wp;
33     return *this;
34 }
35
36 lldb::ModuleSP
37 ModuleChild::GetModule () const
38 {
39     return m_module_wp.lock();
40 }
41
42 void
43 ModuleChild::SetModule (const lldb::ModuleSP &module_sp)
44 {
45     m_module_wp = module_sp;
46 }