This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

demangler update for _ZGA extension


Ok?


r~


include/
	* demangle.h (DEMANGLE_COMPONENT_HIDDEN_ALIAS): New.
libiberty/
	* cp-demangle.c (d_dump): Handle DEMANGLE_COMPONENT_HIDDEN_ALIAS.
	(d_make_comp, d_print_comp): Likewise.
	(d_special_name): Generate one.
	* testsuite/demangle-expected: Add a hidden alias test.

Index: include/demangle.h
===================================================================
RCS file: /cvs/gcc/gcc/include/demangle.h,v
retrieving revision 1.28
diff -u -p -d -r1.28 demangle.h
--- include/demangle.h	10 May 2005 15:22:21 -0000	1.28
+++ include/demangle.h	25 May 2005 22:23:41 -0000
@@ -239,6 +239,9 @@ enum demangle_component_type
   /* A reference temporary.  This has one subtree, the name for which
      this is a temporary.  */
   DEMANGLE_COMPONENT_REFTEMP,
+  /* A hidden alias.  This has one subtree, the encoding for which it
+     is providing alternative linkage.  */
+  DEMANGLE_COMPONENT_HIDDEN_ALIAS,
   /* A standard substitution.  This holds the name of the
      substitution.  */
   DEMANGLE_COMPONENT_SUB_STD,
Index: libiberty/cp-demangle.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/cp-demangle.c,v
retrieving revision 1.81
diff -u -p -d -r1.81 cp-demangle.c
--- libiberty/cp-demangle.c	24 May 2005 20:48:21 -0000	1.81
+++ libiberty/cp-demangle.c	25 May 2005 22:23:41 -0000
@@ -520,6 +520,9 @@ d_dump (struct demangle_component *dc, i
     case DEMANGLE_COMPONENT_REFTEMP:
       printf ("reference temporary\n");
       break;
+    case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
+      printf ("hidden alias\n");
+      break;
     case DEMANGLE_COMPONENT_RESTRICT:
       printf ("restrict\n");
       break;
@@ -733,6 +736,7 @@ d_make_comp (struct d_info *di, enum dem
     case DEMANGLE_COMPONENT_JAVA_CLASS:
     case DEMANGLE_COMPONENT_GUARD:
     case DEMANGLE_COMPONENT_REFTEMP:
+    case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
     case DEMANGLE_COMPONENT_POINTER:
     case DEMANGLE_COMPONENT_REFERENCE:
     case DEMANGLE_COMPONENT_COMPLEX:
@@ -1439,6 +1443,7 @@ d_operator_name (struct d_info *di)
                   ::= TF <type>
                   ::= TJ <type>
                   ::= GR <name>
+		  ::= GA <encoding>
 */
 
 static struct demangle_component *
@@ -1529,6 +1534,10 @@ d_special_name (struct d_info *di)
 	  return d_make_comp (di, DEMANGLE_COMPONENT_REFTEMP, d_name (di),
 			      NULL);
 
+	case 'A':
+	  return d_make_comp (di, DEMANGLE_COMPONENT_HIDDEN_ALIAS,
+			      d_encoding (di, 0), NULL);
+
 	default:
 	  return NULL;
 	}
@@ -2931,6 +2940,11 @@ d_print_comp (struct d_print_info *dpi,
       d_print_comp (dpi, d_left (dc));
       return;
 
+    case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
+      d_append_string_constant (dpi, "hidden alias for ");
+      d_print_comp (dpi, d_left (dc));
+      return;
+
     case DEMANGLE_COMPONENT_SUB_STD:
       d_append_buffer (dpi, dc->u.s_string.string, dc->u.s_string.len);
       return;
Index: libiberty/testsuite/demangle-expected
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/testsuite/demangle-expected,v
retrieving revision 1.31
diff -u -p -d -r1.31 demangle-expected
--- libiberty/testsuite/demangle-expected	28 Jun 2004 17:36:27 -0000	1.31
+++ libiberty/testsuite/demangle-expected	25 May 2005 22:23:42 -0000
@@ -3771,3 +3771,7 @@ _Z1ZZ2Z::__CPR212____ct__Q3_3std141list_
 _test_array__L_1__B23b___clean.6
 _test_array__L_1__B23b___clean.6
 _test_array__L_1__B23b___clean.6
+#
+--format=java
+_ZGAN4java4lang5Class7forNameEPNS0_6StringE
+hidden alias for java.lang.Class.forName(java.lang.String)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]