Skip to content

Commit d83457e

Browse files
authored
[NFC][lldb-dap] Add missing header guard for DAPError and ProgressEvent. (#145915)
Delete the copy, move constructor and assignment for ProgressEventReporter.
1 parent 48e8937 commit d83457e

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

lldb/tools/lldb-dap/DAPError.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#ifndef LLDB_TOOLS_LLDB_DAP_DAPERROR_H
10+
#define LLDB_TOOLS_LLDB_DAP_DAPERROR_H
11+
912
#include "llvm/Support/Error.h"
1013
#include <optional>
1114
#include <string>
@@ -50,3 +53,5 @@ class NotStoppedError : public llvm::ErrorInfo<NotStoppedError> {
5053
};
5154

5255
} // namespace lldb_dap
56+
57+
#endif // LLDB_TOOLS_LLDB_DAP_DAPERROR_H

lldb/tools/lldb-dap/ProgressEvent.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#ifndef LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H
10+
#define LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H
11+
912
#include <atomic>
1013
#include <chrono>
1114
#include <mutex>
1215
#include <optional>
1316
#include <queue>
1417
#include <thread>
1518

16-
#include "DAPForward.h"
17-
1819
#include "llvm/Support/JSON.h"
1920

2021
namespace lldb_dap {
@@ -129,8 +130,12 @@ class ProgressEventReporter {
129130
public:
130131
/// \param[in] report_callback
131132
/// Function to invoke to report the event to the IDE.
132-
ProgressEventReporter(ProgressEventReportCallback report_callback);
133+
explicit ProgressEventReporter(ProgressEventReportCallback report_callback);
133134

135+
ProgressEventReporter(const ProgressEventReporter &) = delete;
136+
ProgressEventReporter(ProgressEventReporter &&) = delete;
137+
ProgressEventReporter &operator=(const ProgressEventReporter &) = delete;
138+
ProgressEventReporter &operator=(ProgressEventReporter &&) = delete;
134139
~ProgressEventReporter();
135140

136141
/// Add a new event to the internal queue and report the event if
@@ -156,3 +161,5 @@ class ProgressEventReporter {
156161
};
157162

158163
} // namespace lldb_dap
164+
165+
#endif // LLDB_TOOLS_LLDB_DAP_PROGRESS_EVENT_H

0 commit comments

Comments
 (0)