[Lldb-commits] [lldb] a81a4b2 - [lldb] Fix building with lldb::once_flag != std::once_flag

Martin Storsjö via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 12 12:26:57 PDT 2024


Author: Martin Storsjö
Date: 2024-09-12T22:26:02+03:00
New Revision: a81a4b2a7ac2d0b8195bb008b2c0f464cfbda223

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

LOG: [lldb] Fix building with lldb::once_flag != std::once_flag

This fixes build breakage on e.g. mingw platforms since
ffa2f539ae2a4e79c01b3d54f8b12c63d8781a0c.

The Debugger::ReportWarning function takes a pointer to a
std::once_flag. On many platforms, llvm::once_flag is a typedef
for std::once_flag, but on others, llvm::once_flag is a custom
reimplementation.

Added: 
    

Modified: 
    lldb/include/lldb/Core/SourceManager.h

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Core/SourceManager.h b/lldb/include/lldb/Core/SourceManager.h
index e38627182a9690..d929f7bd9bf221 100644
--- a/lldb/include/lldb/Core/SourceManager.h
+++ b/lldb/include/lldb/Core/SourceManager.h
@@ -74,7 +74,7 @@ class SourceManager {
 
     const Checksum &GetChecksum() const { return m_checksum; }
 
-    llvm::once_flag &GetChecksumWarningOnceFlag() {
+    std::once_flag &GetChecksumWarningOnceFlag() {
       return m_checksum_warning_once_flag;
     }
 
@@ -92,7 +92,7 @@ class SourceManager {
     Checksum m_checksum;
 
     /// Once flag for emitting a checksum mismatch warning.
-    llvm::once_flag m_checksum_warning_once_flag;
+    std::once_flag m_checksum_warning_once_flag;
 
     // Keep the modification time that this file data is valid for
     llvm::sys::TimePoint<> m_mod_time;


        


More information about the lldb-commits mailing list