mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Traditionally a serialized binary Swift module (as used in debug info) can only be imported if all of its Clang dependencies can be imported *from source*. - Swift's ClangImporter imports Clang modules by converting Clang AST types into Swift AST types. - LLDB knows how to find Clang types in DWARF or other debug info and can synthesize a Clang AST from that information. This patch introduces a DWARFImporter delegate that is implemented by LLDB to connect these two components. With this, a Clang type can be found (by name) in the debug info and handed over to ClangImporter to create a Swift type from it. This path has lower fidelity than importing the Clang modules from source, since it is missing out on Swiftication annotations and other metadata that is not serialized in DWARF, but it's invaluable as a fallback mechanism for the debugger when source code for the Clang modules isn't available or the modules are otherwise not buildable. rdar://problem/49233932
5.3 KiB
5.3 KiB