This fixes an incorrect verifier error for a DW_AT_type pointing to DW_TAG_unspecified_type.
error: DIE has DW_AT_type with incompatible tag DW_TAG_unspecified_type
rdar://54059283
Paths
| Differential D65914
[Dwarf] DW_TAG_unspecified_type is a type tag. ClosedPublic Authored by JDevlieghere on Aug 7 2019, 5:46 PM.
Details Summary This fixes an incorrect verifier error for a DW_AT_type pointing to DW_TAG_unspecified_type. error: DIE has DW_AT_type with incompatible tag DW_TAG_unspecified_type rdar://54059283
Diff Detail Event TimelineComment Actions This doesn't seem complete. And it's hard to tell, because the list is mostly but not entirely in numeric order. Comment Actions FYI. You can derive the complete list by scanning for DW_AT_type in DWARF 5 Appendix A, Table A.1. Comment Actions
? not really. Any tag that is a type qualifier will have DW_AT_type, but also anything else that simply has a type (DW_TAG_constant, etc). I do think that the regex DW_TAG_*_type will find all of them. Comment Actions
I'm probably misunderstanding something here, but DW_TAG_constant *is* listed in Appendix A as allowing a DW_AT_type attribute, so are all the DW_TAG_*_type tags. Comment Actions
is-a versus has-a? We want the isType(Tag T) predicate to return true for the tags that DW_AT_type is allowed to *point to* (i.e. whether the tag is-a type), not those tags that permit DW_AT_type as an attribute (i.e., those that have-a type).
This revision is now accepted and ready to land.Aug 12 2019, 4:14 PM
Closed by commit rL368718: [Dwarf] Complete the list of type tags. (authored by JDevlieghere). · Explain WhyAug 13 2019, 9:59 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 214748 llvm/include/llvm/BinaryFormat/Dwarf.h
llvm/include/llvm/BinaryFormat/Dwarf.def
llvm/include/llvm/ObjectYAML/DWARFYAML.h
llvm/lib/BinaryFormat/Dwarf.cpp
llvm/test/DebugInfo/X86/template.ll
|
Looking at the LHS, I think that the list was *meant* to be sorted by encoding value (cf. Table 7.3) which could make it easier to check whether some new group of TAGs have been added. I'm fine either way... Alphabetical also has its advantages.