[mlir][py] Enable loading only specified dialects during creation. (#121421)
[llvm-project.git] / lldb / source / Core / ModuleChild.cpp
blob7aaa8f2ac2508dd5d956656b7c74be92ed28cb5c
1 //===-- ModuleChild.cpp ---------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Core/ModuleChild.h"
11 using namespace lldb_private;
13 ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
14 : m_module_wp(module_sp) {}
16 ModuleChild::~ModuleChild() = default;
18 const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {
19 if (this != &rhs)
20 m_module_wp = rhs.m_module_wp;
21 return *this;
24 lldb::ModuleSP ModuleChild::GetModule() const { return m_module_wp.lock(); }
26 void ModuleChild::SetModule(const lldb::ModuleSP &module_sp) {
27 m_module_wp = module_sp;