[PATCH] D73086: [DWARF5] Added support for debug_macro section parsing and dumping in llvm-dwarfdump.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 19:35:24 PDT 2020


ikudrin added inline comments.


================
Comment at: llvm/include/llvm/BinaryFormat/Dwarf.h:75
+/// section.
+enum MacroSecType { MACINFO = 1, MACINFODWO, MACRO, MACRODWO };
+
----------------
I guess that it is better to make this enum private inside `DWARFContext`.

You may also want to remove `MACRODWO` because it is used only for an empty ("TODO") case in `parseMacroOrMacinfo()`. Just remove that empty case and move the "TODO" comment to this enum.


================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h:276
-  /// Get a pointer to the parsed DebugMacro object.
-  const DWARFDebugMacro *getDebugMacinfo();
-
----------------
Maybe I am missing something, but I cannot find the discussion where the removal of these public methods was approved.

`getDebugMacinfo()` and `getDebugMacinfoDWO()` should not be removed from the public interface. `getDebugMacro()` should be added. `parseMacroOrMacinfo()` should be private and be called from these methods.


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

https://reviews.llvm.org/D73086





More information about the llvm-commits mailing list