2010-06-09 00:52:24 +08:00
|
|
|
//===-- ModuleChild.cpp -----------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2010-06-09 00:52:24 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "lldb/Core/ModuleChild.h"
|
|
|
|
|
|
|
|
using namespace lldb_private;
|
|
|
|
|
2012-02-24 09:59:29 +08:00
|
|
|
ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
|
|
|
|
: m_module_wp(module_sp) {}
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
ModuleChild::~ModuleChild() {}
|
|
|
|
|
|
|
|
const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
|
|
|
|
if (this != &rhs)
|
2012-02-24 09:59:29 +08:00
|
|
|
m_module_wp = rhs.m_module_wp;
|
2010-06-09 00:52:24 +08:00
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
|
|
|
|
|
2012-02-24 09:59:29 +08:00
|
|
|
void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
|
|
|
|
m_module_wp = module_sp;
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|