blob: 9637fc3aeddae57503fc4db2764524e36168798f [file] [log] [blame]
Chris Lattner24943d22010-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
Greg Clayton3508c382012-02-24 01:59:29 +000014ModuleChild::ModuleChild (const lldb::ModuleSP &module_sp) :
15 m_module_wp (module_sp)
Chris Lattner24943d22010-06-08 16:52:24 +000016{
17}
18
19ModuleChild::ModuleChild (const ModuleChild& rhs) :
Greg Clayton3508c382012-02-24 01:59:29 +000020 m_module_wp(rhs.m_module_wp)
Chris Lattner24943d22010-06-08 16:52:24 +000021{
22}
23
24ModuleChild::~ModuleChild()
25{
26}
27
28const ModuleChild&
29ModuleChild::operator= (const ModuleChild& rhs)
30{
31 if (this != &rhs)
Greg Clayton3508c382012-02-24 01:59:29 +000032 m_module_wp = rhs.m_module_wp;
Chris Lattner24943d22010-06-08 16:52:24 +000033 return *this;
34}
35
Greg Clayton3508c382012-02-24 01:59:29 +000036lldb::ModuleSP
Chris Lattner24943d22010-06-08 16:52:24 +000037ModuleChild::GetModule () const
38{
Greg Clayton3508c382012-02-24 01:59:29 +000039 return m_module_wp.lock();
Chris Lattner24943d22010-06-08 16:52:24 +000040}
41
42void
Greg Clayton3508c382012-02-24 01:59:29 +000043ModuleChild::SetModule (const lldb::ModuleSP &module_sp)
Chris Lattner24943d22010-06-08 16:52:24 +000044{
Greg Clayton3508c382012-02-24 01:59:29 +000045 m_module_wp = module_sp;
Chris Lattner24943d22010-06-08 16:52:24 +000046}