diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-05-18 01:59:10 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2016-05-18 01:59:10 +0000 |
commit | 16ff8604690ea63a3a82dd3b156061afb84dbcf1 (patch) | |
tree | a2d912258ecb0690f4a810ca1e438fc277160326 /lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp | |
parent | a36a61d46ac3f2ea10e78ac816bca5784bc8ba35 (diff) | |
download | llvm-16ff8604690ea63a3a82dd3b156061afb84dbcf1.zip llvm-16ff8604690ea63a3a82dd3b156061afb84dbcf1.tar.gz llvm-16ff8604690ea63a3a82dd3b156061afb84dbcf1.tar.bz2 |
remove use of Mutex in favour of std::{,recursive_}mutex
This is a pretty straightforward first pass over removing a number of uses of
Mutex in favor of std::mutex or std::recursive_mutex. The problem is that there
are interfaces which take Mutex::Locker & to lock internal locks. This patch
cleans up most of the easy cases. The only non-trivial change is in
CommandObjectTarget.cpp where a Mutex::Locker was split into two.
llvm-svn: 269877
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp index 3103ed8..7b1627d 100644 --- a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp +++ b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp @@ -158,7 +158,7 @@ ObjectFileJIT::GetSymtab() ModuleSP module_sp(GetModule()); if (module_sp) { - lldb_private::Mutex::Locker locker(module_sp->GetMutex()); + std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex()); if (m_symtab_ap.get() == NULL) { m_symtab_ap.reset(new Symtab(this)); @@ -200,7 +200,7 @@ ObjectFileJIT::Dump (Stream *s) ModuleSP module_sp(GetModule()); if (module_sp) { - lldb_private::Mutex::Locker locker(module_sp->GetMutex()); + std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex()); s->Printf("%p: ", static_cast<void*>(this)); s->Indent(); s->PutCString("ObjectFileJIT"); |