diff --git a/lldb/tools/lldb-dap/Breakpoint.cpp b/lldb/tools/lldb-dap/Breakpoint.cpp index 0c33d4b114d76..9ea7a42ca85a1 100644 --- a/lldb/tools/lldb-dap/Breakpoint.cpp +++ b/lldb/tools/lldb-dap/Breakpoint.cpp @@ -9,6 +9,7 @@ #include "Breakpoint.h" #include "DAP.h" #include "JSONUtils.h" +#include "lldb/API/SBBreakpointLocation.h" #include "llvm/ADT/StringExtras.h" using namespace lldb_dap; diff --git a/lldb/tools/lldb-dap/Breakpoint.h b/lldb/tools/lldb-dap/Breakpoint.h index 47a9d9c59ae2b..ee9d3736d6190 100644 --- a/lldb/tools/lldb-dap/Breakpoint.h +++ b/lldb/tools/lldb-dap/Breakpoint.h @@ -10,6 +10,7 @@ #define LLDB_TOOLS_LLDB_DAP_BREAKPOINT_H #include "BreakpointBase.h" +#include "lldb/API/SBBreakpoint.h" namespace lldb_dap { diff --git a/lldb/tools/lldb-dap/BreakpointBase.cpp b/lldb/tools/lldb-dap/BreakpointBase.cpp index 519729f5519ff..f3cb06a3562d4 100644 --- a/lldb/tools/lldb-dap/BreakpointBase.cpp +++ b/lldb/tools/lldb-dap/BreakpointBase.cpp @@ -7,8 +7,7 @@ //===----------------------------------------------------------------------===// #include "BreakpointBase.h" -#include "DAP.h" -#include "llvm/ADT/StringExtras.h" +#include "JSONUtils.h" using namespace lldb_dap; diff --git a/lldb/tools/lldb-dap/BreakpointBase.h b/lldb/tools/lldb-dap/BreakpointBase.h index 5a04bb201615f..79301480e0e58 100644 --- a/lldb/tools/lldb-dap/BreakpointBase.h +++ b/lldb/tools/lldb-dap/BreakpointBase.h @@ -9,10 +9,8 @@ #ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H #define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H -#include "lldb/API/SBBreakpoint.h" #include "llvm/Support/JSON.h" #include -#include namespace lldb_dap { diff --git a/lldb/tools/lldb-dap/DAP.cpp b/lldb/tools/lldb-dap/DAP.cpp index 68559e382006d..283392270ba26 100644 --- a/lldb/tools/lldb-dap/DAP.cpp +++ b/lldb/tools/lldb-dap/DAP.cpp @@ -10,11 +10,14 @@ #include #include #include -#include #include "DAP.h" +#include "JSONUtils.h" #include "LLDBUtils.h" #include "lldb/API/SBCommandInterpreter.h" +#include "lldb/API/SBLanguageRuntime.h" +#include "lldb/API/SBListener.h" +#include "lldb/API/SBStream.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/FormatVariadic.h" diff --git a/lldb/tools/lldb-dap/DAP.h b/lldb/tools/lldb-dap/DAP.h index acc10ade75fd1..dab4ce44ab202 100644 --- a/lldb/tools/lldb-dap/DAP.h +++ b/lldb/tools/lldb-dap/DAP.h @@ -9,16 +9,10 @@ #ifndef LLDB_TOOLS_LLDB_DAP_DAP_H #define LLDB_TOOLS_LLDB_DAP_DAP_H -#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX - -#include -#include #include -#include #include #include #include -#include #include #include "llvm/ADT/DenseMap.h" @@ -30,24 +24,12 @@ #include "llvm/Support/raw_ostream.h" #include "lldb/API/SBAttachInfo.h" -#include "lldb/API/SBBreakpoint.h" -#include "lldb/API/SBBreakpointLocation.h" #include "lldb/API/SBCommandInterpreter.h" #include "lldb/API/SBCommandReturnObject.h" -#include "lldb/API/SBCommunication.h" #include "lldb/API/SBDebugger.h" #include "lldb/API/SBEvent.h" #include "lldb/API/SBFormat.h" -#include "lldb/API/SBHostOS.h" -#include "lldb/API/SBInstruction.h" -#include "lldb/API/SBInstructionList.h" -#include "lldb/API/SBLanguageRuntime.h" #include "lldb/API/SBLaunchInfo.h" -#include "lldb/API/SBLineEntry.h" -#include "lldb/API/SBListener.h" -#include "lldb/API/SBProcess.h" -#include "lldb/API/SBStream.h" -#include "lldb/API/SBStringList.h" #include "lldb/API/SBTarget.h" #include "lldb/API/SBThread.h" @@ -56,7 +38,6 @@ #include "IOStream.h" #include "InstructionBreakpoint.h" #include "ProgressEvent.h" -#include "RunInTerminal.h" #include "SourceBreakpoint.h" #define VARREF_LOCALS (int64_t)1 diff --git a/lldb/tools/lldb-dap/FifoFiles.cpp b/lldb/tools/lldb-dap/FifoFiles.cpp index 9a6423f79471a..1f1bba80bd3b1 100644 --- a/lldb/tools/lldb-dap/FifoFiles.cpp +++ b/lldb/tools/lldb-dap/FifoFiles.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "FifoFiles.h" +#include "JSONUtils.h" #if !defined(_WIN32) #include @@ -18,11 +19,6 @@ #include #include #include -#include - -#include "llvm/Support/FileSystem.h" - -#include "lldb/lldb-defines.h" using namespace llvm; diff --git a/lldb/tools/lldb-dap/FifoFiles.h b/lldb/tools/lldb-dap/FifoFiles.h index 02a97cd5cbbd2..633ebeb2aedd4 100644 --- a/lldb/tools/lldb-dap/FifoFiles.h +++ b/lldb/tools/lldb-dap/FifoFiles.h @@ -9,10 +9,8 @@ #ifndef LLDB_TOOLS_LLDB_DAP_FIFOFILES_H #define LLDB_TOOLS_LLDB_DAP_FIFOFILES_H -#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX #include "llvm/Support/Error.h" - -#include "JSONUtils.h" +#include "llvm/Support/JSON.h" #include diff --git a/lldb/tools/lldb-dap/FunctionBreakpoint.cpp b/lldb/tools/lldb-dap/FunctionBreakpoint.cpp index 21743bf908706..216c685f633da 100644 --- a/lldb/tools/lldb-dap/FunctionBreakpoint.cpp +++ b/lldb/tools/lldb-dap/FunctionBreakpoint.cpp @@ -8,6 +8,7 @@ #include "FunctionBreakpoint.h" #include "DAP.h" +#include "JSONUtils.h" namespace lldb_dap { diff --git a/lldb/tools/lldb-dap/IOStream.cpp b/lldb/tools/lldb-dap/IOStream.cpp index 96e9a1ed49532..d2e8ec40b0a7b 100644 --- a/lldb/tools/lldb-dap/IOStream.cpp +++ b/lldb/tools/lldb-dap/IOStream.cpp @@ -18,7 +18,6 @@ #include #include -#include using namespace lldb_dap; diff --git a/lldb/tools/lldb-dap/IOStream.h b/lldb/tools/lldb-dap/IOStream.h index b62502419182c..57d5fd458b716 100644 --- a/lldb/tools/lldb-dap/IOStream.h +++ b/lldb/tools/lldb-dap/IOStream.h @@ -9,8 +9,6 @@ #ifndef LLDB_TOOLS_LLDB_DAP_IOSTREAM_H #define LLDB_TOOLS_LLDB_DAP_IOSTREAM_H -#include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX - #if defined(_WIN32) // We need to #define NOMINMAX in order to skip `min()` and `max()` macro // definitions that conflict with other system headers. diff --git a/lldb/tools/lldb-dap/InstructionBreakpoint.cpp b/lldb/tools/lldb-dap/InstructionBreakpoint.cpp index de4f6f5d86717..e3a8460bb7b30 100644 --- a/lldb/tools/lldb-dap/InstructionBreakpoint.cpp +++ b/lldb/tools/lldb-dap/InstructionBreakpoint.cpp @@ -9,6 +9,7 @@ #include "InstructionBreakpoint.h" #include "DAP.h" +#include "JSONUtils.h" namespace lldb_dap { diff --git a/lldb/tools/lldb-dap/InstructionBreakpoint.h b/lldb/tools/lldb-dap/InstructionBreakpoint.h index cf1516f46e955..53912af46ca14 100644 --- a/lldb/tools/lldb-dap/InstructionBreakpoint.h +++ b/lldb/tools/lldb-dap/InstructionBreakpoint.h @@ -11,7 +11,6 @@ #define LLDB_TOOLS_LLDB_DAP_INSTRUCTIONBREAKPOINT_H #include "Breakpoint.h" -#include "llvm/ADT/StringRef.h" namespace lldb_dap { diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp b/lldb/tools/lldb-dap/JSONUtils.cpp index e42a6d9d69980..fd09e4ae505e6 100644 --- a/lldb/tools/lldb-dap/JSONUtils.cpp +++ b/lldb/tools/lldb-dap/JSONUtils.cpp @@ -6,25 +6,21 @@ // //===----------------------------------------------------------------------===// -#include #include #include #include #include #include "llvm/ADT/StringRef.h" -#include "llvm/Support/FormatAdapters.h" #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/Path.h" #include "llvm/Support/ScopedPrinter.h" -#include "lldb/API/SBBreakpoint.h" -#include "lldb/API/SBBreakpointLocation.h" #include "lldb/API/SBDeclaration.h" +#include "lldb/API/SBStream.h" #include "lldb/API/SBStringList.h" #include "lldb/API/SBStructuredData.h" #include "lldb/API/SBValue.h" -#include "lldb/Host/PosixApi.h" #include "DAP.h" #include "ExceptionBreakpoint.h" diff --git a/lldb/tools/lldb-dap/LLDBUtils.cpp b/lldb/tools/lldb-dap/LLDBUtils.cpp index b38833c0fdb6b..2ffcba7dff4f2 100644 --- a/lldb/tools/lldb-dap/LLDBUtils.cpp +++ b/lldb/tools/lldb-dap/LLDBUtils.cpp @@ -8,6 +8,8 @@ #include "LLDBUtils.h" #include "DAP.h" +#include "JSONUtils.h" +#include "lldb/API/SBStringList.h" #include diff --git a/lldb/tools/lldb-dap/OutputRedirector.h b/lldb/tools/lldb-dap/OutputRedirector.h index dba51016775bf..e26d1648b104f 100644 --- a/lldb/tools/lldb-dap/OutputRedirector.h +++ b/lldb/tools/lldb-dap/OutputRedirector.h @@ -9,8 +9,6 @@ #ifndef LLDB_TOOLS_LLDB_DAP_OUTPUT_REDIRECTOR_H #define LLDB_TOOLS_LLDB_DAP_OUTPUT_REDIRECTOR_H -#include - #include "llvm/ADT/StringRef.h" #include "llvm/Support/Error.h" diff --git a/lldb/tools/lldb-dap/RunInTerminal.cpp b/lldb/tools/lldb-dap/RunInTerminal.cpp index ad019b8a56a4f..4fe09e2885a8e 100644 --- a/lldb/tools/lldb-dap/RunInTerminal.cpp +++ b/lldb/tools/lldb-dap/RunInTerminal.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "RunInTerminal.h" +#include "JSONUtils.h" #if !defined(_WIN32) #include @@ -15,14 +16,10 @@ #endif #include -#include #include -#include #include "llvm/Support/FileSystem.h" -#include "lldb/lldb-defines.h" - using namespace llvm; namespace lldb_dap { diff --git a/lldb/tools/lldb-dap/RunInTerminal.h b/lldb/tools/lldb-dap/RunInTerminal.h index 2fbe3acbb4084..b20f8beb6071d 100644 --- a/lldb/tools/lldb-dap/RunInTerminal.h +++ b/lldb/tools/lldb-dap/RunInTerminal.h @@ -10,9 +10,11 @@ #define LLDB_TOOLS_LLDB_DAP_RUNINTERMINAL_H #include "FifoFiles.h" +#include "lldb/API/SBError.h" #include -#include +#include +#include namespace lldb_dap { diff --git a/lldb/tools/lldb-dap/SourceBreakpoint.cpp b/lldb/tools/lldb-dap/SourceBreakpoint.cpp index f5dd1346cb9e5..d1a3a5bedb0ae 100644 --- a/lldb/tools/lldb-dap/SourceBreakpoint.cpp +++ b/lldb/tools/lldb-dap/SourceBreakpoint.cpp @@ -8,6 +8,7 @@ #include "SourceBreakpoint.h" #include "DAP.h" +#include "JSONUtils.h" namespace lldb_dap { diff --git a/lldb/tools/lldb-dap/lldb-dap.cpp b/lldb/tools/lldb-dap/lldb-dap.cpp index f70b0d3d4cbee..a2f7be2b214e4 100644 --- a/lldb/tools/lldb-dap/lldb-dap.cpp +++ b/lldb/tools/lldb-dap/lldb-dap.cpp @@ -7,9 +7,14 @@ //===----------------------------------------------------------------------===// #include "DAP.h" +#include "FifoFiles.h" +#include "RunInTerminal.h" #include "Watchpoint.h" #include "lldb/API/SBDeclaration.h" +#include "lldb/API/SBInstruction.h" +#include "lldb/API/SBListener.h" #include "lldb/API/SBMemoryRegionInfo.h" +#include "lldb/API/SBStringList.h" #include "llvm/Support/Base64.h" #include @@ -43,17 +48,12 @@ #include #include -#include -#include #include #include -#include #include -#include #include #include -#include "lldb/API/SBEnvironment.h" #include "lldb/API/SBStream.h" #include "lldb/Host/Config.h" #include "llvm/ADT/ArrayRef.h"