Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:49

0001 //===-- SystemLifetimeManager.h -------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_INITIALIZATION_SYSTEMLIFETIMEMANAGER_H
0010 #define LLDB_INITIALIZATION_SYSTEMLIFETIMEMANAGER_H
0011 
0012 #include "lldb/Initialization/SystemInitializer.h"
0013 #include "lldb/lldb-private-types.h"
0014 #include "llvm/Support/Error.h"
0015 
0016 #include <memory>
0017 #include <mutex>
0018 
0019 namespace lldb_private {
0020 
0021 class SystemLifetimeManager {
0022 public:
0023   SystemLifetimeManager();
0024   ~SystemLifetimeManager();
0025 
0026   llvm::Error Initialize(std::unique_ptr<SystemInitializer> initializer,
0027                          LoadPluginCallbackType plugin_callback);
0028   void Terminate();
0029 
0030 private:
0031   std::recursive_mutex m_mutex;
0032   std::unique_ptr<SystemInitializer> m_initializer;
0033   bool m_initialized = false;
0034 
0035   // Noncopyable.
0036   SystemLifetimeManager(const SystemLifetimeManager &other) = delete;
0037   SystemLifetimeManager &operator=(const SystemLifetimeManager &other) = delete;
0038 };
0039 }
0040 
0041 #endif