Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 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 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 14 | ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp) |
| 15 | : m_module_wp(module_sp) {} |
| 16 | |
| 17 | ModuleChild::ModuleChild(const ModuleChild &rhs) |
| 18 | : m_module_wp(rhs.m_module_wp) {} |
| 19 | |
| 20 | ModuleChild::~ModuleChild() {} |
| 21 | |
| 22 | const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) { |
| 23 | if (this != &rhs) |
| 24 | m_module_wp = rhs.m_module_wp; |
| 25 | return *this; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 26 | } |
| 27 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 28 | lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); } |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 29 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 30 | void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) { |
| 31 | m_module_wp = module_sp; |
Chris Lattner | 30fdc8d | 2010-06-08 16:52:24 +0000 | [diff] [blame] | 32 | } |