[Lldb-commits] [lldb] 2bff80f - [lldb] Fix a warning

Kazu Hirata via lldb-commits lldb-commits at lists.llvm.org
Thu May 1 12:27:14 PDT 2025


Author: Kazu Hirata
Date: 2025-05-01T12:27:08-07:00
New Revision: 2bff80f25d51e24d3c552e033a2863dd36ef648b

URL: https://github.com/llvm/llvm-project/commit/2bff80f25d51e24d3c552e033a2863dd36ef648b
DIFF: https://github.com/llvm/llvm-project/commit/2bff80f25d51e24d3c552e033a2863dd36ef648b.diff

LOG: [lldb] Fix a warning

This patch fixes:

  lldb/source/Target/Memory.cpp:438:3: error: 'lock_guard' may not
  intend to support class template argument deduction
  [-Werror,-Wctad-maybe-unsupported]

Added: 
    

Modified: 
    lldb/source/Target/Memory.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Target/Memory.cpp b/lldb/source/Target/Memory.cpp
index 9bfb8c349aa2c..a23a50718712d 100644
--- a/lldb/source/Target/Memory.cpp
+++ b/lldb/source/Target/Memory.cpp
@@ -435,7 +435,7 @@ bool AllocatedMemoryCache::DeallocateMemory(lldb::addr_t addr) {
 }
 
 bool AllocatedMemoryCache::IsInCache(lldb::addr_t addr) const {
-  std::lock_guard guard(m_mutex);
+  std::lock_guard<std::recursive_mutex> guard(m_mutex);
 
   return llvm::any_of(m_memory_map, [addr](const auto &block) {
     return block.second->Contains(addr);


        


More information about the lldb-commits mailing list