[Lldb-commits] [lldb] [NFC][lldb-dap] Add missing header guard for DAPError and ProgressEvent. (PR #145915)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 26 08:11:58 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Ebuka Ezike (da-viper)
<details>
<summary>Changes</summary>
delete the copy, move constructor and assignment for ProgressEventReporter.
---
Full diff: https://github.com/llvm/llvm-project/pull/145915.diff
2 Files Affected:
- (modified) lldb/tools/lldb-dap/DAPError.h (+5)
- (modified) lldb/tools/lldb-dap/ProgressEvent.h (+10-3)
``````````diff
diff --git a/lldb/tools/lldb-dap/DAPError.h b/lldb/tools/lldb-dap/DAPError.h
index e18614fe71935..e3ad10806a343 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
\ No newline at end of file
diff --git a/lldb/tools/lldb-dap/ProgressEvent.h b/lldb/tools/lldb-dap/ProgressEvent.h
index d1b9b9dd887cd..55c7bd73f324e 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
\ No newline at end of file
``````````
</details>
https://github.com/llvm/llvm-project/pull/145915
More information about the lldb-commits
mailing list