[PATCH] D38504: [llvm-dsymutil] Add support for __swift_ast MachO DWARF section

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 10:09:38 PDT 2017


JDevlieghere added a comment.

This LGTM. We should probably also have a test for this. Committing a swift binary upstream might not be the best idea but I don't see an alternative.



================
Comment at: tools/dsymutil/DwarfLinker.cpp:716
+void DwarfStreamer::emitSwiftAST(const std::vector<MemoryBufferRef> &Buffers) {
+  Asm->OutStreamer->SwitchSection(MOFI->getDwarfSwiftASTSection());
+  for (auto Buf : Buffers) {
----------------
I think you can also simplify this to `MS->SwitchSection`


================
Comment at: tools/dsymutil/DwarfLinker.cpp:718
+  for (auto Buf : Buffers) {
+    Asm->OutStreamer->EmitBytes(Buf.getBuffer());
+  }
----------------
And `MS->EmitBytes`


https://reviews.llvm.org/D38504





More information about the llvm-commits mailing list