]> granicus.if.org Git - llvm/commit
[llvm-dsymutil] Add support for __swift_ast MachO DWARF section
authorFrancis Ricci <francisjricci@gmail.com>
Thu, 5 Oct 2017 20:03:01 +0000 (20:03 +0000)
committerFrancis Ricci <francisjricci@gmail.com>
Thu, 5 Oct 2017 20:03:01 +0000 (20:03 +0000)
commit49e2cc7d53a9f1ab8e175932e073df73cbc11645
tree216f305abac324ecb3d154784c0e5117a2553b73
parent6af8afba5aca11d301258921e97a85bf32df160d
[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@315014 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/swift-ast.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