summaryrefslogtreecommitdiff
path: root/gdb/cp-support.h
diff options
context:
space:
mode:
authorswagiaal <swagiaal>2010-02-05 19:03:38 +0000
committerswagiaal <swagiaal>2010-02-05 19:03:38 +0000
commit0f4b1f74b03af439176345bb9d343c8651d03b21 (patch)
tree6ce70b8d2797b3d70ca7a7fe4b4c7feb18349f80 /gdb/cp-support.h
parent3d3757473bbcc33038d367ba4a911e1a638c5802 (diff)
downloadgdb-0f4b1f74b03af439176345bb9d343c8651d03b21.tar.gz
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.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index 33b1b4448c8..a6a9af17b90 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);