diff options
author | Sami Wagiaalla <swagiaal@redhat.com> | 2010-02-05 19:03:42 +0000 |
---|---|---|
committer | Sami Wagiaalla <swagiaal@redhat.com> | 2010-02-05 19:03:42 +0000 |
commit | 82856980164673e7d71180ff67f14d96190b2b3c (patch) | |
tree | 5ad5cd6466108a37cc206930dd6b35dd657cc15a /gdb/cp-support.h | |
parent | 1beeb6866d4f102b1a205391056e7ba4aa59fdd8 (diff) | |
download | gdb-82856980164673e7d71180ff67f14d96190b2b3c.zip gdb-82856980164673e7d71180ff67f14d96190b2b3c.tar.gz gdb-82856980164673e7d71180ff67f14d96190b2b3c.tar.bz2 |
2010-02-05 Sami Wagiaalla <swagiaal@redhat.com>
PR c++/7935:
* gdb.cp/namespace-using.exp: Removed kfail; bug has been fixed.
2010-02-05 Sami Wagiaalla <swagiaal@redhat.com>
PR c++/7935:
* cp-support.h: Added char* alias element to using_direct data
struct.
(cp_add_using): Added char* alias argument.
(cp_add_using_directive): Ditto.
* cp-namespace.c: Updated with the above changes.
(cp_lookup_symbol_imports): Check for aliases.
* dwarf2read.c (read_import_statement): Figure out local alias
for the import and pass it on to cp_add_using.
(read_namespace): Pass alias argument to cp_add_using.
Diffstat (limited to 'gdb/cp-support.h')
-rw-r--r-- | gdb/cp-support.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/cp-support.h b/gdb/cp-support.h index 33b1b44..a6a9af1 100644 --- a/gdb/cp-support.h +++ b/gdb/cp-support.h @@ -38,14 +38,21 @@ struct demangle_component; /* This struct is designed to store data from using directives. It says that names from namespace IMPORT_SRC should be visible within - namespace IMPORT_DEST. IMPORT_DEST should always be a strict initial - substring of IMPORT_SRC. These form a linked list; NEXT is the next element - of the list. */ + namespace IMPORT_DEST. These form a linked list; NEXT is the next element + of the list. If the imported namespace has been aliased, ALIAS is set to a + string representing the alias. Otherwise, ALIAS is NULL. + Eg: + namespace C = A::B; + ALIAS = "C" +*/ struct using_direct { char *import_src; char *import_dest; + + char *alias; + struct using_direct *next; /* Used during import search to temporarily mark this node as searched. */ @@ -82,10 +89,12 @@ extern int cp_validate_operator (const char *input); extern int cp_is_anonymous (const char *namespace); extern void cp_add_using_directive (const char *dest, - const char *src); + const char *src, + const char *alias); extern struct using_direct *cp_add_using (const char *dest, const char *src, + const char *alias, struct using_direct *next); extern void cp_initialize_namespace (void); |