Skip to content

Commit 09c258e

Browse files
authored
[NFC][lldb-dap] Clean-up includes (llvm#113839)
This commit cleans up the includes in the `lldb-dap` subfolder. The main motivation was that I got annoyed by `clangd` always complaining about unused includes while working on lldb-dap.
1 parent f78610a commit 09c258e

20 files changed

+24
-53
lines changed

lldb/tools/lldb-dap/Breakpoint.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include "Breakpoint.h"
1010
#include "DAP.h"
1111
#include "JSONUtils.h"
12+
#include "lldb/API/SBBreakpointLocation.h"
1213
#include "llvm/ADT/StringExtras.h"
1314

1415
using namespace lldb_dap;

lldb/tools/lldb-dap/Breakpoint.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define LLDB_TOOLS_LLDB_DAP_BREAKPOINT_H
1111

1212
#include "BreakpointBase.h"
13+
#include "lldb/API/SBBreakpoint.h"
1314

1415
namespace lldb_dap {
1516

lldb/tools/lldb-dap/BreakpointBase.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "BreakpointBase.h"
10-
#include "DAP.h"
11-
#include "llvm/ADT/StringExtras.h"
10+
#include "JSONUtils.h"
1211

1312
using namespace lldb_dap;
1413

lldb/tools/lldb-dap/BreakpointBase.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
#ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H
1010
#define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H
1111

12-
#include "lldb/API/SBBreakpoint.h"
1312
#include "llvm/Support/JSON.h"
1413
#include <string>
15-
#include <vector>
1614

1715
namespace lldb_dap {
1816

lldb/tools/lldb-dap/DAP.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
#include <cstdarg>
1111
#include <fstream>
1212
#include <mutex>
13-
#include <sstream>
1413

1514
#include "DAP.h"
15+
#include "JSONUtils.h"
1616
#include "LLDBUtils.h"
1717
#include "lldb/API/SBCommandInterpreter.h"
18+
#include "lldb/API/SBLanguageRuntime.h"
19+
#include "lldb/API/SBListener.h"
20+
#include "lldb/API/SBStream.h"
1821
#include "llvm/ADT/StringExtras.h"
1922
#include "llvm/Support/FormatVariadic.h"
2023

lldb/tools/lldb-dap/DAP.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,10 @@
99
#ifndef LLDB_TOOLS_LLDB_DAP_DAP_H
1010
#define LLDB_TOOLS_LLDB_DAP_DAP_H
1111

12-
#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX
13-
14-
#include <atomic>
15-
#include <condition_variable>
1612
#include <cstdio>
17-
#include <future>
1813
#include <iosfwd>
1914
#include <map>
2015
#include <optional>
21-
#include <set>
2216
#include <thread>
2317

2418
#include "llvm/ADT/DenseMap.h"
@@ -30,24 +24,12 @@
3024
#include "llvm/Support/raw_ostream.h"
3125

3226
#include "lldb/API/SBAttachInfo.h"
33-
#include "lldb/API/SBBreakpoint.h"
34-
#include "lldb/API/SBBreakpointLocation.h"
3527
#include "lldb/API/SBCommandInterpreter.h"
3628
#include "lldb/API/SBCommandReturnObject.h"
37-
#include "lldb/API/SBCommunication.h"
3829
#include "lldb/API/SBDebugger.h"
3930
#include "lldb/API/SBEvent.h"
4031
#include "lldb/API/SBFormat.h"
41-
#include "lldb/API/SBHostOS.h"
42-
#include "lldb/API/SBInstruction.h"
43-
#include "lldb/API/SBInstructionList.h"
44-
#include "lldb/API/SBLanguageRuntime.h"
4532
#include "lldb/API/SBLaunchInfo.h"
46-
#include "lldb/API/SBLineEntry.h"
47-
#include "lldb/API/SBListener.h"
48-
#include "lldb/API/SBProcess.h"
49-
#include "lldb/API/SBStream.h"
50-
#include "lldb/API/SBStringList.h"
5133
#include "lldb/API/SBTarget.h"
5234
#include "lldb/API/SBThread.h"
5335

@@ -56,7 +38,6 @@
5638
#include "IOStream.h"
5739
#include "InstructionBreakpoint.h"
5840
#include "ProgressEvent.h"
59-
#include "RunInTerminal.h"
6041
#include "SourceBreakpoint.h"
6142

6243
#define VARREF_LOCALS (int64_t)1

lldb/tools/lldb-dap/FifoFiles.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "FifoFiles.h"
10+
#include "JSONUtils.h"
1011

1112
#if !defined(_WIN32)
1213
#include <sys/stat.h>
@@ -18,11 +19,6 @@
1819
#include <fstream>
1920
#include <future>
2021
#include <optional>
21-
#include <thread>
22-
23-
#include "llvm/Support/FileSystem.h"
24-
25-
#include "lldb/lldb-defines.h"
2622

2723
using namespace llvm;
2824

lldb/tools/lldb-dap/FifoFiles.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
#ifndef LLDB_TOOLS_LLDB_DAP_FIFOFILES_H
1010
#define LLDB_TOOLS_LLDB_DAP_FIFOFILES_H
1111

12-
#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX
1312
#include "llvm/Support/Error.h"
14-
15-
#include "JSONUtils.h"
13+
#include "llvm/Support/JSON.h"
1614

1715
#include <chrono>
1816

lldb/tools/lldb-dap/FunctionBreakpoint.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "FunctionBreakpoint.h"
1010
#include "DAP.h"
11+
#include "JSONUtils.h"
1112

1213
namespace lldb_dap {
1314

lldb/tools/lldb-dap/IOStream.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#include <fstream>
2020
#include <string>
21-
#include <vector>
2221

2322
using namespace lldb_dap;
2423

0 commit comments

Comments
 (0)