[PATCH] D42082: Add DWARF for discriminated unions

Tom Tromey via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 14:26:32 PST 2018


tromey added a comment.

Having the DIE shape conform to DWARF seems easy in this patch -- just a reordering in `DwarfUnit::constructDiscriminatorDIE`.  However I don't see how to nicely support univariant Rust enums; the variant part is triggered by having a discriminator, but these objects don't have enumerators.

Maybe one idea would be to have `DIBuilder::createDiscriminatedUnionType` use `DW_TAG_variant_part` as its tag, then fix things up when emitting the DIEs in DwarfUnit.cpp.  Is that too gross?


Repository:
  rL LLVM

https://reviews.llvm.org/D42082





More information about the llvm-commits mailing list