summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-10-05 19:17:28 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-10-05 19:17:28 +0000
commit77672776392e36a7bd65cb2845834675aefd8076 (patch)
tree8749d506e990fd21612925a0d8bd5f7708791171 /llvm/lib/MC/MCObjectFileInfo.cpp
parente07072130873f3fb65a827a6397cd7d7684241ca (diff)
downloadbcm5719-llvm-77672776392e36a7bd65cb2845834675aefd8076.tar.gz
bcm5719-llvm-77672776392e36a7bd65cb2845834675aefd8076.zip
[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
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--llvm/lib/MC/MCObjectFileInfo.cpp4
1 files changed, 4 insertions, 0 deletions
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");
OpenPOWER on IntegriCloud