aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2007-08-31 20:20:49 +0000
committerDJ Delorie <dj@redhat.com>2007-08-31 20:20:49 +0000
commit8969a67f0a5f5becee46b72a74f2b4d6b9cfd937 (patch)
tree99e6490842016fd47943acc344a7732c07b268ed /libiberty
parent202ddcaa09cec13dd964695fb033a6cd6c7a6543 (diff)
downloadgdb-8969a67f0a5f5becee46b72a74f2b4d6b9cfd937.zip
gdb-8969a67f0a5f5becee46b72a74f2b4d6b9cfd937.tar.gz
gdb-8969a67f0a5f5becee46b72a74f2b4d6b9cfd937.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog10
-rw-r--r--libiberty/cp-demangle.c18
2 files changed, 27 insertions, 1 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 8e34448..2e43390 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,13 @@
+2007-08-31 Douglas Gregor <doug.gregor@gmail.com>
+
+ * cp-demangle.c (d_dump): Handle
+ DEMANGLE_COMPONENT_RVALUE_REFERENCE.
+ (d_make_comp): Ditto.
+ (cplus_demangle_type): Ditto.
+ (d_print_comp): Ditto.
+ (d_print_mod): Ditto.
+ (d_print_function_type): Ditto.
+
2007-08-24 Kai Tietz <kai.tietz@onevision.com>
* pex-common.h: (pex_funcs): Retyped wait and exec_child to pid_t.
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index e4869f0..3fc6a21 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -596,6 +596,9 @@ d_dump (struct demangle_component *dc, int indent)
case DEMANGLE_COMPONENT_REFERENCE:
printf ("reference\n");
break;
+ case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
+ printf ("rvalue reference\n");
+ break;
case DEMANGLE_COMPONENT_COMPLEX:
printf ("complex\n");
break;
@@ -785,6 +788,7 @@ d_make_comp (struct d_info *di, enum demangle_component_type type,
case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
case DEMANGLE_COMPONENT_POINTER:
case DEMANGLE_COMPONENT_REFERENCE:
+ case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
case DEMANGLE_COMPONENT_COMPLEX:
case DEMANGLE_COMPONENT_IMAGINARY:
case DEMANGLE_COMPONENT_VENDOR_TYPE:
@@ -1726,6 +1730,7 @@ d_ctor_dtor_name (struct d_info *di)
::= <CV-qualifiers> <type>
::= P <type>
::= R <type>
+ ::= O <type> (C++0x)
::= C <type>
::= G <type>
::= U <source-name> <type>
@@ -1892,6 +1897,12 @@ cplus_demangle_type (struct d_info *di)
}
break;
+ case 'O':
+ d_advance (di, 1);
+ ret = d_make_comp (di, DEMANGLE_COMPONENT_RVALUE_REFERENCE,
+ cplus_demangle_type (di), NULL);
+ break;
+
case 'P':
d_advance (di, 1);
ret = d_make_comp (di, DEMANGLE_COMPONENT_POINTER,
@@ -1901,7 +1912,7 @@ cplus_demangle_type (struct d_info *di)
case 'R':
d_advance (di, 1);
ret = d_make_comp (di, DEMANGLE_COMPONENT_REFERENCE,
- cplus_demangle_type (di), NULL);
+ cplus_demangle_type (di), NULL);
break;
case 'C':
@@ -3184,6 +3195,7 @@ d_print_comp (struct d_print_info *dpi,
case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
case DEMANGLE_COMPONENT_POINTER:
case DEMANGLE_COMPONENT_REFERENCE:
+ case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
case DEMANGLE_COMPONENT_COMPLEX:
case DEMANGLE_COMPONENT_IMAGINARY:
{
@@ -3708,6 +3720,9 @@ d_print_mod (struct d_print_info *dpi,
case DEMANGLE_COMPONENT_REFERENCE:
d_append_char (dpi, '&');
return;
+ case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
+ d_append_string (dpi, "&&");
+ return;
case DEMANGLE_COMPONENT_COMPLEX:
d_append_string (dpi, "complex ");
return;
@@ -3757,6 +3772,7 @@ d_print_function_type (struct d_print_info *dpi,
{
case DEMANGLE_COMPONENT_POINTER:
case DEMANGLE_COMPONENT_REFERENCE:
+ case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
need_paren = 1;
break;
case DEMANGLE_COMPONENT_RESTRICT: