[D] Implement looking up members of D enums.

In D, all named enums are explicitly scoped (the C++ equivalent of enum class)
so they should be handled as such in the language-specific symbol lookup
routines.  However so as to support D compilers that don't emit enums as
DW_AT_enum_class, need to make sure that appropriate checks for
TYPE_DECLARED_CLASS are done.

gdb/ChangeLog

	* d-exp.y (type_aggregate_p): New function.
	(PrimaryExpression : TypeExp '.' IdentifierExp): Use it.
	(classify_inner_name): Likewise.
	* d-namespace.c (d_lookup_nested_symbol): Handle TYPE_CODE_ENUM.
This commit is contained in:
Iain Buclaw 2015-08-17 21:45:42 +02:00
parent ad89c2aa67
commit 7f3706ebfe
3 changed files with 24 additions and 3 deletions

View file

@ -308,6 +308,7 @@ d_lookup_nested_symbol (struct type *parent_type,
{
case TYPE_CODE_STRUCT:
case TYPE_CODE_UNION:
case TYPE_CODE_ENUM:
case TYPE_CODE_MODULE:
{
int size;