[PATCH] D42021: [DWARF] v5 implementation of string offsets tables - producer side

Wolfgang Pieb via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 25 17:41:51 PST 2018


wolfgangp marked an inline comment as done.
wolfgangp added inline comments.


================
Comment at: test/DebugInfo/Generic/string-offsets-form.ll:20-22
+; CHECK:     DW_TAG_enumeration_type
+; CHECK-NOT: DW_TAG
+; CHECK:     DW_AT_name DW_FORM_strx2
----------------
dblaikie wrote:
> You can probably just check the debug_info and skip checking the abbrev here (since you are checking the form kind in the debug_info).
> 
> Though how do you know the first enumeration_type would have a strx2? Actually I'm a bit surprised the enumeration_type's name would be strx2 (would've guessed its string would be computed early and before all the enumerators?)?
The order in which the strings are created depends on the order in which the DIEs are created, and the enumeration_type DIE is created after all the enumerator DIEs. At least that's what I gather from DwarfUnit::constructEnumTypeDie() in DwarfUnit.cpp.

As far as the abbrevs are concerned, abbrevs for parent DIEs seem to come before child DIEs, so the enumeration type DIE's abbrev would come first in the table. 

But all this is implementation dependent. I agree that the check isn't really needed. I'll get rid of it before I commit. Thanks for the review.


https://reviews.llvm.org/D42021





More information about the llvm-commits mailing list