]> granicus.if.org Git - llvm/commit
[llvm-dsymutil] Add support for __swift_ast MachO DWARF section
authorFrancis Ricci <francisjricci@gmail.com>
Fri, 6 Oct 2017 14:49:20 +0000 (14:49 +0000)
committerFrancis Ricci <francisjricci@gmail.com>
Fri, 6 Oct 2017 14:49:20 +0000 (14:49 +0000)
commit6f200df43da7bda22bc54e2e61edfb8dd9450e2e
tree162103af8c8955580834124eec15f39b4d4409db
parent58cf43cb16fdd6dbd4846a188cf978253d71cb52
[llvm-dsymutil] Add support for __swift_ast MachO DWARF section

Summary:
Xcode's dsymutil emits a __swift_ast DWARF section, which is required for debugging,
and which contains a byte-for-byte dump of the swiftmodule file.
Add this feature to llvm-dsymutil.

Tested with `gobjdump --dwarf=info -s`, by verifying that the contents of
`__DWARF.__swift_ast` match between Xcode's dsymutil and llvm-dsymutil
(Xcode's dwarfdump and llvm-dwarfdump don't currently recognize the
__swift_ast section).

Reviewers: aprantl, friss

Subscribers: llvm-commits, JDevlieghere

Differential Revision: https://reviews.llvm.org/D38504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315066 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCObjectFileInfo.h
lib/MC/MCObjectFileInfo.cpp
test/tools/dsymutil/Inputs/swift-ast.macho.x86_64 [new file with mode: 0755]
test/tools/dsymutil/Inputs/swift-ast.swiftmodule [new file with mode: 0644]
test/tools/dsymutil/X86/swift-ast-x86_64.test [new file with mode: 0644]
tools/dsymutil/BinaryHolder.h
tools/dsymutil/DebugMap.cpp
tools/dsymutil/DebugMap.h
tools/dsymutil/DwarfLinker.cpp
tools/dsymutil/MachODebugMapParser.cpp