1 //===-- SystemLifetimeManager.h -------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_INITIALIZATION_SYSTEM_LIFETIME_MANAGER_H
10 #define LLDB_INITIALIZATION_SYSTEM_LIFETIME_MANAGER_H
12 #include "lldb/Initialization/SystemInitializer.h"
13 #include "lldb/lldb-private-types.h"
14 #include "llvm/Support/Error.h"
19 namespace lldb_private {
21 class SystemLifetimeManager {
23 SystemLifetimeManager();
24 ~SystemLifetimeManager();
26 llvm::Error Initialize(std::unique_ptr<SystemInitializer> initializer,
27 LoadPluginCallbackType plugin_callback);
31 std::recursive_mutex m_mutex;
32 std::unique_ptr<SystemInitializer> m_initializer;
36 SystemLifetimeManager(const SystemLifetimeManager &other) = delete;
37 SystemLifetimeManager &operator=(const SystemLifetimeManager &other) = delete;