[dsymutil] Collect parseable Swift interfaces in the .dSYM bundle.
authorAdrian Prantl <aprantl@apple.com>
Mon, 22 Apr 2019 21:33:22 +0000 (21:33 +0000)
committerAdrian Prantl <aprantl@apple.com>
Mon, 22 Apr 2019 21:33:22 +0000 (21:33 +0000)
commit0d809aa21842dfe7ef6a37d8b11cfd0accc763ad
tree2f916898fb63bdaf430a0bd4748d4d6f9de9e001
parentd748689c7f718f531871bb44b5da05888c3c0301
[dsymutil] Collect parseable Swift interfaces in the .dSYM bundle.

When a Swift module built with debug info imports a library without
debug info from a textual interface, the textual interface is
necessary to reconstruct types defined in the library's interface. By
recording the Swift interface files in DWARF dsymutil can collect them
and LLDB can find them.

This patch teaches dsymutil to look for DW_TAG_imported_modules and
records all references to parseable Swift ingterfrace files and copies
them to

  a.out.dSYM/Contents/Resources/<Arch>/<ModuleName>.swiftinterface

<rdar://problem/49751748>

llvm-svn: 358921
llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
llvm/test/tools/dsymutil/Inputs/swift-interface.ll [new file with mode: 0644]
llvm/test/tools/dsymutil/X86/swift-interface.test [new file with mode: 0644]
llvm/tools/dsymutil/CompileUnit.cpp
llvm/tools/dsymutil/CompileUnit.h
llvm/tools/dsymutil/DwarfLinker.cpp
llvm/tools/dsymutil/DwarfLinker.h
llvm/tools/dsymutil/LinkUtils.h
llvm/tools/dsymutil/dsymutil.cpp