[Lldb-commits] [lldb] [lldb][NFC] Don't use LLDB.h in multiple-targets/debuggers tests (PR #210981)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 21 06:13:30 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Raphael Isemann (Teemperor)
<details>
<summary>Changes</summary>
LLDB.h is a header that includes (nearly) every SB API header indirectly. This patch replaces the use of this header in some .cpp tests by instead directly including the needed headers. This is mainly to reduce compilation times of these files as they are recompiled on each test run.
---
Full diff: https://github.com/llvm/llvm-project/pull/210981.diff
2 Files Affected:
- (modified) lldb/test/API/api/multiple-debuggers/multi-process-driver.cpp (+10-2)
- (modified) lldb/test/API/api/multiple-targets/main.cpp (+1-1)
``````````diff
diff --git a/lldb/test/API/api/multiple-debuggers/multi-process-driver.cpp b/lldb/test/API/api/multiple-debuggers/multi-process-driver.cpp
index 68d73f1dee011..5847dc709a771 100644
--- a/lldb/test/API/api/multiple-debuggers/multi-process-driver.cpp
+++ b/lldb/test/API/api/multiple-debuggers/multi-process-driver.cpp
@@ -19,10 +19,18 @@
#include <string.h>
#include <unistd.h>
-#include "lldb/API/LLDB.h"
+#include "lldb/API/SBBreakpoint.h"
+#include "lldb/API/SBBroadcaster.h"
#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBCommandReturnObject.h"
#include "lldb/API/SBDebugger.h"
+#include "lldb/API/SBError.h"
+#include "lldb/API/SBEvent.h"
+#include "lldb/API/SBFrame.h"
+#include "lldb/API/SBLaunchInfo.h"
+#include "lldb/API/SBListener.h"
+#include "lldb/API/SBProcess.h"
+#include "lldb/API/SBTarget.h"
+#include "lldb/API/SBThread.h"
#include <chrono>
#include <csignal>
diff --git a/lldb/test/API/api/multiple-targets/main.cpp b/lldb/test/API/api/multiple-targets/main.cpp
index 35fb4e0d613ed..3a9dff961a27d 100644
--- a/lldb/test/API/api/multiple-targets/main.cpp
+++ b/lldb/test/API/api/multiple-targets/main.cpp
@@ -1,7 +1,7 @@
#include <thread>
-#include "lldb/API/LLDB.h"
#include "lldb/API/SBDebugger.h"
+#include "lldb/API/SBError.h"
#include "lldb/API/SBTarget.h"
using namespace lldb;
``````````
</details>
https://github.com/llvm/llvm-project/pull/210981
More information about the lldb-commits
mailing list