[PATCH] D70880: [DWARF5][Debuginfo] Not matching compilation unit type (DW_UT_skeleton) and root DIE (DW_TAG_compile_unit)

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 3 10:24:15 PST 2019


dblaikie added a comment.

In D70880#1765911 <https://reviews.llvm.org/D70880#1765911>, @aprantl wrote:

> Seems good to me. @dblaikie, do all the relevant non-llvm-tools that implement pre-standard fission know how to deal with DW_TAG_skeleton_unit?


Oh, I think there's a bunch of tools/most things can't handle DWARFv5 split or non-split right now, so I'm mostly happy for us to just keep implementing the standard here & with the expectation that other people (or the same people when they have time/as they schedule things) will be implementing support on the consumer side.

@avl - are you planning to do the DW_TAG_split_compile/DW_TAG_split_type tags required by DWARFv5 too in separate patches?



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfFile.h:106-109
+  /// That value indicates whether we are generating file
+  /// containing skeleton compilation units.
+  bool IsSkeleton = false;
+
----------------
Rather than adding this field - I think it'd be cleaner to pass the boolean (maybe use an `enum class UnitKind { Skeleton, Full }` to make it more readable) into the DwarfCompileUnit ctor directly. The two callers know statically which kind of unit they are constructing, so there would be no need for branching/conditionals/dynamic computation of the unit type by doing it that way.

(& probably add it as a default argument ("Full") to the end, then only the Skeleton unit construction gets the extra argument)


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

https://reviews.llvm.org/D70880





More information about the llvm-commits mailing list