clayborg added a comment.

In https://reviews.llvm.org/D47275#1110772, @labath wrote:

> I don't think a name like `DWARFUnitDIE` is a good one bacause it would make 
> a weird `is-a` relationship (a DWARFDIE represetning a DW_TAG_variable is 
> certainly **not** a "unit DIE" yet you could assign it to a  
> `DWARFUnitDIE&`). We could have a DWARFUnitDIE type if we wanted to, but that 
> would have to be a special type in addition to DWARFBasicDIE. However, I 
> think that would be overkill.


Yeah, we just need to be able to tell the difference between the top level DIE 
we hand out with no children and the one that has all the abilities.

> That said, if everyone who is going to be calling `IsStructOrClass` and 
> friends will see the type as `DWARFDIE` then keeping those methods on that 
> class makes sense.

Yes, that is the case. No top level DIE can be a struct, union or class. Only a 
compile unit, type unit or partial unit.


https://reviews.llvm.org/D47275



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to