Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb] Avoid having to list all the headers in headers.swig #131934

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

JDevlieghere
Copy link
Member

When adding SBLock, I realized you always have to add a new header in two places: LLDB.h and headers.swig. Unless someone doesn't ship LLDB.h, I can't think of a reason the latter can't use the umbrella header and avoid the duplication.

When adding SBLock, I realized you always have to add a new header in
two places: LLDB.h and headers.swig. Unless someone doesn't ship LLDB.h,
I can't think of a reason the latter can't use the umbrella header and
avoid the duplication.
@llvmbot
Copy link
Member

llvmbot commented Mar 18, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

When adding SBLock, I realized you always have to add a new header in two places: LLDB.h and headers.swig. Unless someone doesn't ship LLDB.h, I can't think of a reason the latter can't use the umbrella header and avoid the duplication.


Full diff: https://github.com/llvm/llvm-project/pull/131934.diff

1 Files Affected:

  • (modified) lldb/bindings/headers.swig (+1-79)
diff --git a/lldb/bindings/headers.swig b/lldb/bindings/headers.swig
index 5e7c54d1eb839..ee9720bd0b5ce 100644
--- a/lldb/bindings/headers.swig
+++ b/lldb/bindings/headers.swig
@@ -7,83 +7,5 @@
 /* The liblldb header files to be included. */
 %{
 #include "lldb/lldb-public.h"
-#include "lldb/API/SBAddress.h"
-#include "lldb/API/SBAddressRange.h"
-#include "lldb/API/SBAddressRangeList.h"
-#include "lldb/API/SBAttachInfo.h"
-#include "lldb/API/SBBlock.h"
-#include "lldb/API/SBBreakpoint.h"
-#include "lldb/API/SBBreakpointLocation.h"
-#include "lldb/API/SBBreakpointName.h"
-#include "lldb/API/SBBroadcaster.h"
-#include "lldb/API/SBCommandInterpreter.h"
-#include "lldb/API/SBCommandInterpreterRunOptions.h"
-#include "lldb/API/SBCommandReturnObject.h"
-#include "lldb/API/SBCommunication.h"
-#include "lldb/API/SBCompileUnit.h"
-#include "lldb/API/SBSaveCoreOptions.h"
-#include "lldb/API/SBData.h"
-#include "lldb/API/SBDebugger.h"
-#include "lldb/API/SBDeclaration.h"
-#include "lldb/API/SBEnvironment.h"
-#include "lldb/API/SBError.h"
-#include "lldb/API/SBEvent.h"
-#include "lldb/API/SBExecutionContext.h"
-#include "lldb/API/SBExpressionOptions.h"
-#include "lldb/API/SBFile.h"
-#include "lldb/API/SBFileSpec.h"
-#include "lldb/API/SBFileSpecList.h"
-#include "lldb/API/SBFormat.h"
-#include "lldb/API/SBFrame.h"
-#include "lldb/API/SBFunction.h"
-#include "lldb/API/SBHostOS.h"
-#include "lldb/API/SBInstruction.h"
-#include "lldb/API/SBInstructionList.h"
-#include "lldb/API/SBLanguages.h"
-#include "lldb/API/SBLanguageRuntime.h"
-#include "lldb/API/SBLaunchInfo.h"
-#include "lldb/API/SBLineEntry.h"
-#include "lldb/API/SBListener.h"
-#include "lldb/API/SBMemoryRegionInfo.h"
-#include "lldb/API/SBMemoryRegionInfoList.h"
-#include "lldb/API/SBModule.h"
-#include "lldb/API/SBModuleSpec.h"
-#include "lldb/API/SBPlatform.h"
-#include "lldb/API/SBProcess.h"
-#include "lldb/API/SBProcessInfo.h"
-#include "lldb/API/SBProcessInfoList.h"
-#include "lldb/API/SBProgress.h"
-#include "lldb/API/SBQueue.h"
-#include "lldb/API/SBQueueItem.h"
-#include "lldb/API/SBReproducer.h"
-#include "lldb/API/SBScriptObject.h"
-#include "lldb/API/SBSection.h"
-#include "lldb/API/SBSourceManager.h"
-#include "lldb/API/SBStatisticsOptions.h"
-#include "lldb/API/SBStream.h"
-#include "lldb/API/SBStringList.h"
-#include "lldb/API/SBStructuredData.h"
-#include "lldb/API/SBSymbol.h"
-#include "lldb/API/SBSymbolContext.h"
-#include "lldb/API/SBSymbolContextList.h"
-#include "lldb/API/SBTarget.h"
-#include "lldb/API/SBThread.h"
-#include "lldb/API/SBThreadCollection.h"
-#include "lldb/API/SBThreadPlan.h"
-#include "lldb/API/SBTrace.h"
-#include "lldb/API/SBTraceCursor.h"
-#include "lldb/API/SBType.h"
-#include "lldb/API/SBTypeCategory.h"
-#include "lldb/API/SBTypeEnumMember.h"
-#include "lldb/API/SBTypeFilter.h"
-#include "lldb/API/SBTypeFormat.h"
-#include "lldb/API/SBTypeNameSpecifier.h"
-#include "lldb/API/SBTypeSummary.h"
-#include "lldb/API/SBTypeSynthetic.h"
-#include "lldb/API/SBUnixSignals.h"
-#include "lldb/API/SBValue.h"
-#include "lldb/API/SBValueList.h"
-#include "lldb/API/SBVariablesOptions.h"
-#include "lldb/API/SBWatchpoint.h"
-#include "lldb/API/SBWatchpointOptions.h"
+#include "lldb/API/LLDB.h"
 %}

Copy link
Collaborator

@labath labath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I don't think it's even a question of "shipping" as swig processing happens at (lldb) build time. After that, we don't care whether the header exists or not.

@JDevlieghere JDevlieghere merged commit 4322d03 into llvm:main Mar 19, 2025
12 checks passed
@JDevlieghere JDevlieghere deleted the api-headers branch March 19, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants