[PATCH] D115007: Dump swift5 reflection section data into dsym bundle generated binary with dsymutil

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 15 10:28:30 PST 2021


JDevlieghere requested changes to this revision.
JDevlieghere added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/include/llvm/MC/MCObjectFileInfo.h:233
+  // Swift5 Reflection Data Sections
+  std::array<MCSection *, 6> Swift5ReflectionSectionArr = {
+      nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
----------------
Is there a way we can keep this in sync automatically with the number of sections in `Swift.def`?


================
Comment at: llvm/include/llvm/MC/MCObjectFileInfo.h:239
+                            bool LargeCodeModel = false,
+                            StringRef Swift5ReflectionSegmentName = {});
   virtual ~MCObjectFileInfo();
----------------
Should this be part of MCContext?


================
Comment at: llvm/include/llvm/MC/MCObjectFileInfo.h:448
+  void initMachOMCObjectFileInfo(const Triple &T,
+                                 StringRef Swift5ReflectionSegmentName = {});
   void initELFMCObjectFileInfo(const Triple &T, bool Large);
----------------
Similar as above, this seems really out of place.


================
Comment at: llvm/tools/dsymutil/DwarfLinkerForBinary.cpp:307
+      Options.FileType == OutputFileType::Object) {
+    BinaryHolder InputBinaryHolder(Options.VFS, false);
+
----------------
Do we really need to create a new binary holder? Why can't we use the one used by the DWARFLinker?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115007/new/

https://reviews.llvm.org/D115007



More information about the llvm-commits mailing list