diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-14 18:50:02 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-14 18:50:02 +0000 |
| commit | 1f917f69ff07f09b6dbb670971f57f8efe718b84 (patch) | |
| tree | 99293cbc1411737cd995dac10a99b2c40ef0944c /llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp | |
| parent | 145449b1e420787bb99721a429341fa6be3adfb6 (diff) | |
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp index ffa2969536e7..8296b03398a0 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp @@ -11,7 +11,6 @@ #include "llvm/ExecutionEngine/JITSymbol.h" #include "llvm/Support/BinaryStreamReader.h" #include "llvm/Support/FormatVariadic.h" -#include "llvm/Support/ManagedStatic.h" #include <cstdint> #include <mutex> @@ -67,9 +66,6 @@ LLVM_ATTRIBUTE_NOINLINE void __jit_debug_register_code() { using namespace llvm; using namespace llvm::orc; -// Serialize rendezvous with the debugger as well as access to shared data. -ManagedStatic<std::mutex> JITDebugLock; - // Register debug object, return error message or null for success. static void registerJITLoaderGDBImpl(const char *ObjAddr, size_t Size) { LLVM_DEBUG({ @@ -85,7 +81,9 @@ static void registerJITLoaderGDBImpl(const char *ObjAddr, size_t Size) { E->symfile_size = Size; E->prev_entry = nullptr; - std::lock_guard<std::mutex> Lock(*JITDebugLock); + // Serialize rendezvous with the debugger as well as access to shared data. + static std::mutex JITDebugLock; + std::lock_guard<std::mutex> Lock(JITDebugLock); // Insert this entry at the head of the list. jit_code_entry *NextEntry = __jit_debug_descriptor.first_entry; |
