[PATCH] D42082: Add DWARF for discriminated unions

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 17 08:37:03 PST 2018


probinson added a comment.

The DWARF spec says:  "If the variant part has a discriminant, the discriminant is represented by a separate debugging information entry which is a child of the variant part entry.  This entry has the form of a structure data member entry.  The variant part entry will have a DW_AT_descr attribute whose value is a reference to the member entry for the discriminant."

I read this as saying the discriminant goes under the variant_part;  it seems slightly redundant to have it both as a child and with a reference, but that's what it says.  If you want you can bring it up on dwarf-discuss and see if anyone else thinks the discriminant ought to go outside the variant_part, but as it stands I think that would not be syntactically valid.


Repository:
  rL LLVM

https://reviews.llvm.org/D42082





More information about the llvm-commits mailing list