[ClangImporter] Prefer serialized bridging headers in LLDB.

Especially in an explicit modules project, LLDB might not know all the
search paths needed to imported the on disk header.

rdar://157063577
(cherry picked from commit a6678476d8)
This commit is contained in:
Adrian Prantl
2025-07-29 17:07:45 -07:00
parent 99a2db3392
commit 95ad22e799
3 changed files with 32 additions and 25 deletions

View File

@@ -1093,6 +1093,10 @@ namespace swift {
/// When set, don't enforce warnings with -Werror.
bool DebuggerSupport = false;
/// Prefer the serialized preprocessed header over the one on disk.
/// Used by LLDB.
bool PreferSerializedBridgingHeader = false;
/// When set, ClangImporter is disabled, and all requests go to the
/// DWARFImporter delegate.
bool DisableSourceImport = false;

View File

@@ -163,8 +163,7 @@ private:
bool requiresBuiltinHeadersInSystemModules = false;
ClangImporter(ASTContext &ctx,
DependencyTracker *tracker,
ClangImporter(ASTContext &ctx, DependencyTracker *tracker,
DWARFImporterDelegate *dwarfImporterDelegate);
/// Creates a clone of Clang importer's compiler instance that has been
@@ -196,8 +195,8 @@ public:
/// \returns a new Clang module importer, or null (with a diagnostic) if
/// an error occurred.
static std::unique_ptr<ClangImporter>
create(ASTContext &ctx,
std::string swiftPCHHash = "", DependencyTracker *tracker = nullptr,
create(ASTContext &ctx, std::string swiftPCHHash = "",
DependencyTracker *tracker = nullptr,
DWARFImporterDelegate *dwarfImporterDelegate = nullptr,
bool ignoreFileMapping = false);