diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2015-08-17 21:45:42 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2015-08-17 21:53:47 +0200 |
commit | 7f3706ebfeb44e6b1f39f95fe44b7099a91c32c9 (patch) | |
tree | 86932e98d06300e8fa849041cee59ddd96b9c369 /gdb/d-namespace.c | |
parent | ad89c2aa677c28c76ffd5a35e2b36eece4d82597 (diff) | |
download | binutils-gdb-7f3706ebfeb44e6b1f39f95fe44b7099a91c32c9.tar.gz |
[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.
Diffstat (limited to 'gdb/d-namespace.c')
-rw-r--r-- | gdb/d-namespace.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/d-namespace.c b/gdb/d-namespace.c index 9a558d1aa33..bed8d5b1cc8 100644 --- a/gdb/d-namespace.c +++ b/gdb/d-namespace.c @@ -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; |