[PATCH] D30206: [DWARF5] Emit new unit header

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 18:43:30 PST 2017


probinson added inline comments.


================
Comment at: include/llvm/Support/Dwarf.h:308
 
+/// Constants for unit types in DWARF v5.
+enum UnitType : unsigned char {
----------------
aprantl wrote:
> We might want to unify the spelling of DWARF v5 vs. DWARF5
It looks like "DWARF v5" is more common so I've regularized to that throughout.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp:693-694
 
-  DwarfUnit::emitHeader(UseOffsets);
+  DwarfUnit::emitCommonHeader(UseOffsets, Skeleton ? dwarf::DW_UT_skeleton
+                                                   : dwarf::DW_UT_compile);
 }
----------------
probinson wrote:
> dblaikie wrote:
> > This is probably backwards - "Skeleton" is a pointer to the skeleton (so it implies this unit is /not/ a skeleton). Test coverage should demonstrate/confirm this?
> So, you think I'm missing a split-dwarf test that uses v5?  I'll look into this.
I actually need to distinguish 3 cases here, because there are different unit types for (a) normal-full, (b) skeleton, and (c) split-full.  But `useSplitDwarf()` will distinguish the first two.  Similarly I will need to distinguish the normal and split type units.
Thanks for catching this!



https://reviews.llvm.org/D30206





More information about the llvm-commits mailing list