aboutsummaryrefslogtreecommitdiff
path: root/libiberty/cp-demangle.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2010-01-21 02:05:11 +0000
committerDJ Delorie <dj@redhat.com>2010-01-21 02:05:11 +0000
commit9ac9c2b6b0a2cc7c695880b35673fe6f9ccd2dc1 (patch)
tree7f1ab490445bf5f28c52cce89a31162b70f3d2e6 /libiberty/cp-demangle.c
parent612e7dfa04d40030c0df4a4c843b23a82ee2c28d (diff)
downloadgdb-9ac9c2b6b0a2cc7c695880b35673fe6f9ccd2dc1.zip
gdb-9ac9c2b6b0a2cc7c695880b35673fe6f9ccd2dc1.tar.gz
gdb-9ac9c2b6b0a2cc7c695880b35673fe6f9ccd2dc1.tar.bz2
merge from gcc
Diffstat (limited to 'libiberty/cp-demangle.c')
-rw-r--r--libiberty/cp-demangle.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index d37c90e..f28e163 100644
--- a/libiberty/cp-demangle.c
+++ b/libiberty/cp-demangle.c
@@ -4037,9 +4037,18 @@ d_print_comp (struct d_print_info *dpi,
d_append_char (dpi, '(');
d_print_subexpr (dpi, d_left (d_right (dc)));
- if (strcmp (d_left (dc)->u.s_operator.op->code, "cl") != 0)
- d_print_expr_op (dpi, d_left (dc));
- d_print_subexpr (dpi, d_right (d_right (dc)));
+ if (strcmp (d_left (dc)->u.s_operator.op->code, "ix") == 0)
+ {
+ d_append_char (dpi, '[');
+ d_print_comp (dpi, d_right (d_right (dc)));
+ d_append_char (dpi, ']');
+ }
+ else
+ {
+ if (strcmp (d_left (dc)->u.s_operator.op->code, "cl") != 0)
+ d_print_expr_op (dpi, d_left (dc));
+ d_print_subexpr (dpi, d_right (d_right (dc)));
+ }
if (d_left (dc)->type == DEMANGLE_COMPONENT_OPERATOR
&& d_left (dc)->u.s_operator.op->len == 1