From 77672776392e36a7bd65cb2845834675aefd8076 Mon Sep 17 00:00:00 2001 From: Francis Ricci Date: Thu, 5 Oct 2017 19:17:28 +0000 Subject: [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 llvm-svn: 315004 --- llvm/lib/MC/MCObjectFileInfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp') diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index c6c5cb31690..e162e954687 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -214,6 +214,10 @@ void MCObjectFileInfo::initMachOMCObjectFileInfo(const Triple &T) { Ctx->getMachOSection("__DWARF", "__apple_types", MachO::S_ATTR_DEBUG, SectionKind::getMetadata(), "types_begin"); + DwarfSwiftASTSection = + Ctx->getMachOSection("__DWARF", "__swift_ast", MachO::S_ATTR_DEBUG, + SectionKind::getMetadata()); + DwarfAbbrevSection = Ctx->getMachOSection("__DWARF", "__debug_abbrev", MachO::S_ATTR_DEBUG, SectionKind::getMetadata(), "section_abbrev"); -- cgit v1.2.3