[PATCH] D42082: Add DWARF for discriminated unions

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 14:51:29 PST 2018


dblaikie added inline comments.


================
Comment at: test/DebugInfo/Generic/discriminated-union.ll:9-28
+; CHECK: DW_TAG_variant_part
+; CHECK-NOT: TAG
+; CHECK: DW_AT_discr [DW_FORM_ref4]
+; CHECK-NOT: TAG
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_type
+; CHECK: DW_AT_alignment
----------------
This test should probably be more precise. Checking that DW_AT_discr contains the right offset to the discriminator member. Check that the members have the right values (at least a handful - if they're generally all the same - at least checking that the discr_values are valid/correct)

& might help to indent the tags and attributes in the CHECK lines (FileCheck ignores leading/trailing whitespace in CHECK lines anyway) to make it easier to see the structure here.


================
Comment at: test/DebugInfo/Generic/univariant-discriminated-union.ll:9-15
+; CHECK: DW_TAG_variant_part
+; CHECK-NOT: DW_AT_discr
+; CHECK: DW_TAG_variant
+; CHECK: DW_TAG_member
+; CHECK: DW_AT_type
+; CHECK: DW_AT_alignment
+; CHECK: DW_AT_data_member_location
----------------
Similar test quality improvements here might be nice.


Repository:
  rL LLVM

https://reviews.llvm.org/D42082





More information about the llvm-commits mailing list