[Lldb-commits] [lldb] d83457e - [NFC][lldb-dap] Add missing header guard for DAPError and ProgressEvent. (#145915)

via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 26 09:42:36 PDT 2025


Author: Ebuka Ezike
Date: 2025-06-26T17:42:33+01:00
New Revision: d83457eb83d817e773ed6740a6f0c92180ca585e

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

LOG: [NFC][lldb-dap] Add missing header guard for DAPError and ProgressEvent. (#145915)

Delete the copy, move constructor and assignment for ProgressEventReporter.

Added: 
    

Modified: 
    lldb/tools/lldb-dap/DAPError.h
    lldb/tools/lldb-dap/ProgressEvent.h

Removed: 
    


################################################################################
diff  --git a/lldb/tools/lldb-dap/DAPError.h b/lldb/tools/lldb-dap/DAPError.h
index e18614fe71935..26b1daae59340 100644
--- a/lldb/tools/lldb-dap/DAPError.h
+++ b/lldb/tools/lldb-dap/DAPError.h
@@ -6,6 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLDB_TOOLS_LLDB_DAP_DAPERROR_H
+#define LLDB_TOOLS_LLDB_DAP_DAPERROR_H
+
 #include "llvm/Support/Error.h"
 #include <optional>
 #include <string>
@@ -50,3 +53,5 @@ class NotStoppedError : public llvm::ErrorInfo<NotStoppedError> {
 };
 
 } // namespace lldb_dap
+
+#endif // LLDB_TOOLS_LLDB_DAP_DAPERROR_H

diff  --git a/lldb/tools/lldb-dap/ProgressEvent.h b/lldb/tools/lldb-dap/ProgressEvent.h
index d1b9b9dd887cd..9dfed4c301a8e 100644
--- a/lldb/tools/lldb-dap/ProgressEvent.h
+++ b/lldb/tools/lldb-dap/ProgressEvent.h
@@ -6,6 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H
+#define LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H
+
 #include <atomic>
 #include <chrono>
 #include <mutex>
@@ -13,8 +16,6 @@
 #include <queue>
 #include <thread>
 
-#include "DAPForward.h"
-
 #include "llvm/Support/JSON.h"
 
 namespace lldb_dap {
@@ -129,8 +130,12 @@ class ProgressEventReporter {
 public:
   /// \param[in] report_callback
   ///     Function to invoke to report the event to the IDE.
-  ProgressEventReporter(ProgressEventReportCallback report_callback);
+  explicit ProgressEventReporter(ProgressEventReportCallback report_callback);
 
+  ProgressEventReporter(const ProgressEventReporter &) = delete;
+  ProgressEventReporter(ProgressEventReporter &&) = delete;
+  ProgressEventReporter &operator=(const ProgressEventReporter &) = delete;
+  ProgressEventReporter &operator=(ProgressEventReporter &&) = delete;
   ~ProgressEventReporter();
 
   /// Add a new event to the internal queue and report the event if
@@ -156,3 +161,5 @@ class ProgressEventReporter {
 };
 
 } // namespace lldb_dap
+
+#endif // LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H


        


More information about the lldb-commits mailing list