Home | History | Annotate | Download | only in gcc-demangle

Lines Matching refs:di

764 d_make_empty (struct d_info *di)
768 if (di->next_comp >= di->num_comps)
770 p = &di->comps[di->next_comp];
771 ++di->next_comp;
778 d_make_comp (struct d_info *di, enum demangle_component_type type,
865 p = d_make_empty (di);
878 d_make_demangle_mangled_name (struct d_info *di, const char *s)
880 if (d_peek_char (di) != '_' || d_peek_next_char (di) != 'Z')
881 return d_make_name (di, s, strlen (s));
882 d_advance (di, 2);
883 return d_encoding (di, 0);
889 d_make_name (struct d_info *di, const char *s, int len)
893 p = d_make_empty (di);
902 d_make_builtin_type (struct d_info *di,
909 p = d_make_empty (di);
921 d_make_operator (struct d_info *di, const struct demangle_operator_info *op)
925 p = d_make_empty (di);
937 d_make_extended_operator (struct d_info *di, int args,
942 p = d_make_empty (di);
949 d_make_default_arg (struct d_info *di, int num,
952 struct demangle_component *p = d_make_empty (di);
965 d_make_ctor (struct d_info *di, enum gnu_v3_ctor_kinds kind,
970 p = d_make_empty (di);
979 d_make_dtor (struct d_info *di, enum gnu_v3_dtor_kinds kind,
984 p = d_make_empty (di);
993 d_make_template_param (struct d_info *di, long i)
997 p = d_make_empty (di);
1009 d_make_function_param (struct d_info *di, long i)
1013 p = d_make_empty (di);
1025 d_make_sub (struct d_info *di, const char *name, int len)
1029 p = d_make_empty (di);
1045 cplus_demangle_mangled_name (struct d_info *di, int top_level)
1047 if (! d_check_char (di, '_')
1053 if (! d_check_char (di, 'Z'))
1055 return d_encoding (di, top_level);
1117 d_encoding (struct d_info *di, int top_level)
1119 char peek = d_peek_char (di);
1122 return d_special_name (di);
1127 dc = d_name (di);
1129 if (dc != NULL && top_level && (di->options & DMGL_PARAMS) == 0)
1158 peek = d_peek_char (di);
1161 return d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME, dc,
1162 d_bare_function_type (di, has_return_type (dc)));
1179 d_name (struct d_info *di)
1181 char peek = d_peek_char (di);
1187 return d_nested_name (di);
1190 return d_local_name (di);
1194 return d_unqualified_name (di);
1200 if (d_peek_next_char (di) != 't')
1202 dc = d_substitution (di, 0);
1207 d_advance (di, 2);
1208 dc = d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME,
1209 d_make_name (di, "std", 3),
1210 d_unqualified_name (di));
1211 di->expansion += 3;
1215 if (d_peek_char (di) != 'I')
1229 if (! d_add_substitution (di, dc))
1232 dc = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, dc,
1233 d_template_args (di));
1240 dc = d_unqualified_name (di);
1241 if (d_peek_char (di) == 'I')
1246 if (! d_add_substitution (di, dc))
1248 dc = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, dc,
1249 d_template_args (di));
1260 d_nested_name (struct d_info *di)
1265 if (! d_check_char (di, 'N'))
1268 pret = d_cv_qualifiers (di, &ret, 1);
1272 *pret = d_prefix (di);
1276 if (! d_check_char (di, 'E'))
1294 d_prefix (struct d_info *di)
1304 peek = d_peek_char (di);
1319 dc = d_unqualified_name (di);
1321 dc = d_substitution (di, 1);
1327 dc = d_template_args (di);
1330 dc = d_template_param (di);
1340 d_advance (di, 1);
1349 ret = d_make_comp (di, comb_type, ret, dc);
1351 if (peek != 'S' && d_peek_char (di) != 'E')
1353 if (! d_add_substitution (di, ret))
1368 d_unqualified_name (struct d_info *di)
1372 peek = d_peek_char (di);
1374 return d_source_name (di);
1379 ret = d_operator_name (di);
1381 di->expansion += sizeof "operator" + ret->u.s_operator.op->len - 2;
1385 return d_ctor_dtor_name (di);
1390 d_advance (di, 1);
1392 ret = d_source_name (di);
1395 if (! d_discriminator (di))
1401 switch (d_peek_next_char (di))
1404 return d_lambda (di);
1406 return d_unnamed_type (di);
1418 d_source_name (struct d_info *di)
1423 len = d_number (di);
1426 ret = d_identifier (di, len);
1427 di->last_name = ret;
1434 d_number (struct d_info *di)
1441 peek = d_peek_char (di);
1445 d_advance (di, 1);
1446 peek = d_peek_char (di);
1459 d_advance (di, 1);
1460 peek = d_peek_char (di);
1467 d_number_component (struct d_info *di)
1469 struct demangle_component *ret = d_make_empty (di);
1473 ret->u.s_number.number = d_number (di);
1481 d_identifier (struct d_info *di, int len)
1485 name = d_str (di);
1487 if (di->send - name < len)
1490 d_advance (di, len);
1495 if ((di->options & DMGL_JAVA) != 0
1496 && d_peek_char (di) == '$')
1497 d_advance (di, 1);
1512 di->expansion -= len - sizeof "(anonymous namespace)";
1513 return d_make_name (di, "(anonymous namespace)",
1518 return d_make_name (di, name, len);
1587 d_operator_name (struct d_info *di)
1592 c1 = d_next_char (di);
1593 c2 = d_next_char (di);
1595 return d_make_extended_operator (di, c2 - '0', d_source_name (di));
1597 return d_make_comp (di, DEMANGLE_COMPONENT_CAST,
1598 cplus_demangle_type (di), NULL);
1618 return d_make_operator (di, p);
1631 d_make_character (struct d_info *di, int c)
1634 p = d_make_empty (di);
1644 d_java_resource (struct d_info *di)
1652 len = d_number (di);
1657 if (d_next_char (di) != '_')
1661 str = d_str (di);
1688 next = d_make_character (di, c);
1689 d_advance (di, i);
1690 str = d_str (di);
1702 next = d_make_name (di, str, i);
1703 d_advance (di, i);
1704 str = d_str (di);
1715 p = d_make_comp (di, DEMANGLE_COMPONENT_COMPOUND_NAME, p, next);
1721 p = d_make_comp (di, DEMANGLE_COMPONENT_JAVA_RESOURCE, p, NULL);
1743 d_special_name (struct d_info *di)
1745 di->expansion += 20;
1746 if (d_check_char (di, 'T'))
1748 switch (d_next_char (di))
1751 di->expansion -= 5;
1752 return d_make_comp (di, DEMANGLE_COMPONENT_VTABLE,
1753 cplus_demangle_type (di), NULL);
1755 di->expansion -= 10;
1756 return d_make_comp (di, DEMANGLE_COMPONENT_VTT,
1757 cplus_demangle_type (di), NULL);
1759 return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO,
1760 cplus_demangle_type (di), NULL);
1762 return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO_NAME,
1763 cplus_demangle_type (di), NULL);
1766 if (! d_call_offset (di, 'h'))
1768 return d_make_comp (di, DEMANGLE_COMPONENT_THUNK,
1769 d_encoding (di, 0), NULL);
1772 if (! d_call_offset (di, 'v'))
1774 return d_make_comp (di, DEMANGLE_COMPONENT_VIRTUAL_THUNK,
1775 d_encoding (di, 0), NULL);
1778 if (! d_call_offset (di, '\0'))
1780 if (! d_call_offset (di, '\0'))
1782 return d_make_comp (di, DEMANGLE_COMPONENT_COVARIANT_THUNK,
1783 d_encoding (di, 0), NULL);
1791 derived_type = cplus_demangle_type (di);
1792 offset = d_number (di);
1795 di, '_'))
1797 base_type = cplus_demangle_type (di);
1800 di->expansion += 5;
1801 return d_make_comp (di, DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE,
1806 return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO_FN,
1807 cplus_demangle_type (di), NULL);
1809 return d_make_comp (di, DEMANGLE_COMPONENT_JAVA_CLASS,
1810 cplus_demangle_type (di), NULL);
1816 else if (d_check_char (di, 'G'))
1818 switch (d_next_char (di))
1821 return d_make_comp (di, DEMANGLE_COMPONENT_GUARD, d_name (di), NULL);
1824 return d_make_comp (di, DEMANGLE_COMPONENT_REFTEMP, d_name (di),
1828 return d_make_comp (di, DEMANGLE_COMPONENT_HIDDEN_ALIAS,
1829 d_encoding (di, 0), NULL);
1832 return d_java_resource (di);
1856 d_call_offset (struct d_info *di, int c)
1859 c = d_next_char (di);
1862 d_number (di);
1865 d_number (di);
1866 if (! d_check_char (di, '_'))
1868 d_number (di);
1873 if (! d_check_char (di, '_'))
1888 d_ctor_dtor_name (struct d_info *di)
1890 if (di->last_name != NULL)
1892 if (di->last_name->type == DEMANGLE_COMPONENT_NAME)
1893 di->expansion += di->last_name->u.s_name.len;
1894 else if (di->last_name->type == DEMANGLE_COMPONENT_SUB_STD)
1895 di->expansion += di->last_name->u.s_string.len;
1897 switch (d_peek_char (di))
1903 switch (d_peek_next_char (di))
1917 d_advance (di, 2);
1918 return d_make_ctor (di, kind, di->last_name);
1925 switch (d_peek_next_char (di))
1939 d_advance (di, 2);
1940 return d_make_dtor (di, kind, di->last_name);
2012 cplus_demangle_type (struct d_info *di)
2033 peek = d_peek_char (di);
2038 pret = d_cv_qualifiers (di, &ret, 0);
2041 *pret = cplus_demangle_type (di);
2042 if (! *pret || ! d_add_substitution (di, ret))
2055 ret = d_make_builtin_type (di,
2057 di->expansion += ret->u.s_builtin.type->len;
2059 d_advance (di, 1);
2063 d_advance (di, 1);
2064 ret = d_make_comp (di, DEMANGLE_COMPONENT_VENDOR_TYPE,
2065 d_source_name (di), NULL);
2069 ret = d_function_type (di);
2076 ret = d_class_enum_type (di);
2080 ret = d_array_type (di);
2084 ret = d_pointer_to_member_type (di);
2088 ret = d_template_param (di);
2089 if (d_peek_char (di) == 'I')
2094 if (! d_add_substitution (di, ret))
2096 ret = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, ret,
2097 d_template_args (di));
2107 peek_next = d_peek_next_char (di);
2112 ret = d_substitution (di, 0);
2115 if (d_peek_char (di) == 'I')
2116 ret = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, ret,
2117 d_template_args (di));
2123 ret = d_class_enum_type (di);
2135 d_advance (di, 1);
2136 ret = d_make_comp (di, DEMANGLE_COMPONENT_RVALUE_REFERENCE,
2137 cplus_demangle_type (di), NULL);
2141 d_advance (di, 1);
2142 ret = d_make_comp (di, DEMANGLE_COMPONENT_POINTER,
2143 cplus_demangle_type (di), NULL);
2147 d_advance (di, 1);
2148 ret = d_make_comp (di, DEMANGLE_COMPONENT_REFERENCE,
2149 cplus_demangle_type (di), NULL);
2153 d_advance (di, 1);
2154 ret = d_make_comp (di, DEMANGLE_COMPONENT_COMPLEX,
2155 cplus_demangle_type (di), NULL);
2159 d_advance (di, 1);
2160 ret = d_make_comp (di, DEMANGLE_COMPONENT_IMAGINARY,
2161 cplus_demangle_type (di), NULL);
2165 d_advance (di, 1);
2166 ret = d_source_name (di);
2167 ret = d_make_comp (di, DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL,
2168 cplus_demangle_type (di), ret);
2173 d_advance (di, 1);
2174 peek = d_next_char (di);
2180 ret = d_make_comp (di, DEMANGLE_COMPONENT_DECLTYPE,
2181 d_expression (di), NULL);
2182 if (ret && d_next_char (di) != 'E')
2188 ret = d_make_comp (di, DEMANGLE_COMPONENT_PACK_EXPANSION,
2189 cplus_demangle_type (di), NULL);
2194 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[26]);
2195 di->expansion += ret->u.s_builtin.type->len;
2199 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[27]);
2200 di->expansion += ret->u.s_builtin.type->len;
2204 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[28]);
2205 di->expansion += ret->u.s_builtin.type->len;
2209 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[29]);
2210 di->expansion += ret->u.s_builtin.type->len;
2214 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[30]);
2215 di->expansion += ret->u.s_builtin.type->len;
2219 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[31]);
2220 di->expansion += ret->u.s_builtin.type->len;
2225 ret = d_make_empty (di);
2227 if ((ret->u.s_fixed.accum = IS_DIGIT (d_peek_char (di))))
2229 d_number (di);
2230 ret->u.s_fixed.length = cplus_demangle_type (di);
2233 d_number (di);
2234 peek = d_next_char (di);
2239 ret = d_vector_type (di);
2244 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[32]);
2245 di->expansion += ret->u.s_builtin.type->len;
2259 if (! d_add_substitution (di, ret))
2269 d_cv_qualifiers (struct d_info *di,
2274 peek = d_peek_char (di);
2279 d_advance (di, 1);
2285 di->expansion += sizeof "restrict";
2292 di->expansion += sizeof "volatile";
2299 di->expansion += sizeof "const";
2302 *pret = d_make_comp (di, t, NULL, NULL);
2307 peek = d_peek_char (di);
2316 d_function_type (struct d_info *di)
2320 if (! d_check_char (di, 'F'))
2322 if (d_peek_char (di) == 'Y')
2326 d_advance (di, 1);
2328 ret = d_bare_function_type (di, 1);
2329 if (! d_check_char (di, 'E'))
2337 d_parmlist (struct d_info *di)
2348 char peek = d_peek_char (di);
2351 type = cplus_demangle_type (di);
2354 *ptl = d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, type, NULL);
2371 di->expansion -= d_left (tl)->u.s_builtin.type->len;
2381 d_bare_function_type (struct d_info *di, int has_return_type)
2389 peek = d_peek_char (di);
2392 d_advance (di, 1);
2398 return_type = cplus_demangle_type (di);
2405 tl = d_parmlist (di);
2409 return d_make_comp (di, DEMANGLE_COMPONENT_FUNCTION_TYPE,
2416 d_class_enum_type (struct d_info *di)
2418 return d_name (di);
2426 d_array_type (struct d_info *di)
2431 if (! d_check_char (di, 'A'))
2434 peek = d_peek_char (di);
2441 s = d_str (di);
2444 d_advance (di, 1);
2445 peek = d_peek_char (di);
2448 dim = d_make_name (di, s, d_str (di) - s);
2454 dim = d_expression (di);
2459 if (! d_check_char (di, '_'))
2462 return d_make_comp (di, DEMANGLE_COMPONENT_ARRAY_TYPE, dim,
2463 cplus_demangle_type (di));
2470 d_vector_type (struct d_info *di)
2475 peek = d_peek_char (di);
2478 d_advance (di, 1);
2479 dim = d_expression (di);
2482 dim = d_number_component (di);
2487 if (! d_check_char (di, '_'))
2490 return d_make_comp (di, DEMANGLE_COMPONENT_VECTOR_TYPE, dim,
2491 cplus_demangle_type (di));
2497 d_pointer_to_member_type (struct d_info *di)
2503 if (! d_check_char (di, 'M'))
2506 cl = cplus_demangle_type (di);
2524 pmem = d_cv_qualifiers (di, &mem, 1);
2527 *pmem = cplus_demangle_type (di);
2533 if (! d_add_substitution (di, mem))
2537 return d_make_comp (di, DEMANGLE_COMPONENT_PTRMEM_TYPE, cl, mem);
2543 d_compact_number (struct d_info *di)
2546 if (d_peek_char (di) == '_')
2548 else if (d_peek_char (di) == 'n')
2551 num = d_number (di) + 1;
2553 if (! d_check_char (di, '_'))
2563 d_template_param (struct d_info *di)
2567 if (! d_check_char (di, 'T'))
2570 param = d_compact_number (di);
2574 ++di->did_subs;
2576 return d_make_template_param (di, param);
2582 d_template_args (struct d_info *di)
2591 hold_last_name = di->last_name;
2593 if (! d_check_char (di, 'I'))
2596 if (d_peek_char (di) == 'E')
2599 d_advance (di, 1);
2600 return d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, NULL, NULL);
2609 a = d_template_arg (di);
2613 *pal = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, a, NULL);
2618 if (d_peek_char (di) == 'E')
2620 d_advance (di, 1);
2625 di->last_name = hold_last_name;
2636 d_template_arg (struct d_info *di)
2640 switch (d_peek_char (di))
2643 d_advance (di, 1);
2644 ret = d_expression (di);
2645 if (! d_check_char (di, 'E'))
2650 return d_expr_primary (di);
2654 return d_template_args (di);
2657 return cplus_demangle_type (di);
2664 d_exprlist (struct d_info *di)
2669 if (d_peek_char (di) == 'E')
2671 d_advance (di, 1);
2672 return d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, NULL, NULL);
2677 struct demangle_component *arg = d_expression (di);
2681 *p = d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, arg, NULL);
2686 if (d_peek_char (di) == 'E')
2688 d_advance (di, 1);
2708 d_expression (struct d_info *di)
2712 peek = d_peek_char (di);
2714 return d_expr_primary (di);
2716 return d_template_param (di);
2717 else if (peek == 's' && d_peek_next_char (di) == 'r')
2722 d_advance (di, 2);
2723 type = cplus_demangle_type (di);
2724 name = d_unqualified_name (di);
2725 if (d_peek_char (di) != 'I')
2726 return d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, type, name);
2728 return d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, type,
2729 d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, name,
2730 d_template_args (di)));
2732 else if (peek == 's' && d_peek_next_char (di) == 'p')
2734 d_advance (di, 2);
2735 return d_make_comp (di, DEMANGLE_COMPONENT_PACK_EXPANSION,
2736 d_expression (di), NULL);
2738 else if (peek == 'f' && d_peek_next_char (di) == 'p')
2742 d_advance (di, 2);
2743 index = d_compact_number (di);
2747 return d_make_function_param (di, index);
2750 || (peek == 'o' && d_peek_next_char (di) == 'n'))
2758 d_advance (di, 2);
2760 name = d_unqualified_name (di);
2763 if (d_peek_char (di) == 'I')
2764 return d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, name,
2765 d_template_args (di));
2774 op = d_operator_name (di);
2779 di->expansion += op->u.s_operator.op->len - 2;
2783 return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
2784 cplus_demangle_type (di));
2807 && d_check_char (di, '_'))
2808 operand = d_exprlist (di);
2810 operand = d_expression (di);
2811 return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
2820 left = d_expression (di);
2822 right = d_exprlist (di);
2825 right = d_unqualified_name (di);
2826 if (d_peek_char (di) == 'I')
2827 right = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE,
2828 right, d_template_args (di));
2831 right = d_expression (di);
2833 return d_make_comp (di, DEMANGLE_COMPONENT_BINARY, op,
2834 d_make_comp (di,
2843 first = d_expression (di);
2844 second = d_expression (di);
2845 return d_make_comp (di, DEMANGLE_COMPONENT_TRINARY, op,
2846 d_make_comp (di,
2849 d_make_comp (di,
2852 d_expression (di))));
2866 d_expr_primary (struct d_info *di)
2870 if (! d_check_char (di, 'L'))
2872 if (d_peek_char (di) == '_'
2874 || d_peek_char (di) == 'Z')
2875 ret = cplus_demangle_mangled_name (di, 0);
2882 type = cplus_demangle_type (di);
2890 di->expansion -= type->u.s_builtin.type->len;
2904 if (d_peek_char (di) == 'n')
2907 d_advance (di, 1);
2909 s = d_str (di);
2910 while (d_peek_char (di) != 'E')
2912 if (d_peek_char (di) == '\0')
2914 d_advance (di, 1);
2916 ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s));
2918 if (! d_check_char (di, 'E'))
2928 d_local_name (struct d_info *di)
2932 if (! d_check_char (di, 'Z'))
2935 function = d_encoding (di, 0);
2937 if (! d_check_char (di, 'E'))
2940 if (d_peek_char (di) == 's')
2942 d_advance (di, 1);
2943 if (! d_discriminator (di))
2945 return d_make_comp (di, DEMANGLE_COMPONENT_LOCAL_NAME, function,
2946 d_make_name (di, "string literal",
2954 if (d_peek_char (di) == 'd')
2957 d_advance (di, 1);
2958 num = d_compact_number (di);
2963 name = d_name (di);
2972 if (! d_discriminator (di))
2976 name = d_make_default_arg (di, num, name);
2977 return d_make_comp (di, DEMANGLE_COMPONENT_LOCAL_NAME, function, name);
2987 d_discriminator (struct d_info *di)
2991 if (d_peek_char (di) != '_')
2993 d_advance (di, 1);
2994 discrim = d_number (di);
3003 d_lambda (struct d_info *di)
3009 if (! d_check_char (di, 'U'))
3011 if (! d_check_char (di, 'l'))
3014 tl = d_parmlist (di);
3018 if (! d_check_char (di, 'E'))
3021 num = d_compact_number (di);
3025 ret = d_make_empty (di);
3033 if (! d_add_substitution (di, ret))
3042 d_unnamed_type (struct d_info *di)
3047 if (! d_check_char (di, 'U'))
3049 if (! d_check_char (di, 't'))
3052 num = d_compact_number (di);
3056 ret = d_make_empty (di);
3063 if (! d_add_substitution (di, ret))
3072 d_add_substitution (struct d_info *di, struct demangle_component *dc)
3076 if (di->next_sub >= di->num_subs)
3078 di->subs[di->next_sub] = dc;
3079 ++di->next_sub;
3128 d_substitution (struct d_info *di, int prefix)
3132 if (! d_check_char (di, 'S'))
3135 c = d_next_char (di);
3156 c = d_next_char (di);
3163 if (id >= (unsigned int) di->next_sub)
3166 ++di->did_subs;
3168 return di->subs[id];
3176 verbose = (di->options & DMGL_VERBOSE) != 0;
3181 peek = d_peek_char (di);
3196 di->last_name = d_make_sub (di, p->set_last_name,
3208 di->expansion += len;
3209 return d_make_sub (di, s, len);
4751 struct d_info *di)
4753 di->s = mangled;
4754 di->send = mangled + len;
4755 di->options = options;
4757 di->n = mangled;
4762 di->num_comps = 2 * len;
4763 di->next_comp = 0;
4767 di->num_subs = len;
4768 di->next_sub = 0;
4769 di->did_subs = 0;
4771 di->last_name = NULL;
4773 di->expansion = 0;
4793 struct d_info di;
4811 cplus_demangle_init_info (mangled, options, strlen (mangled), &di);
4815 __extension__ struct demangle_component comps[di.num_comps];
4816 __extension__ struct demangle_component *subs[di.num_subs];
4818 di.comps = comps;
4819 di.subs = subs;
4821 di.comps = alloca (di.num_comps * sizeof (*di.comps));
4822 di.subs = alloca (di.num_subs * sizeof (*di.subs));
4828 dc = cplus_demangle_type (&di);
4831 dc = cplus_demangle_mangled_name (&di, 1);
4835 d_advance (&di, 11);
4836 dc = d_make_comp (&di,
4840 d_make_demangle_mangled_name (&di, d_str (&di)),
4842 d_advance (&di, strlen (d_str (&di)));
4850 if (((options & DMGL_PARAMS) != 0) && d_peek_char (&di) != '\0')
5083 struct d_info di;
5090 cplus_demangle_init_info (mangled, DMGL_GNU_V3, strlen (mangled), &di);
5094 __extension__ struct demangle_component comps[di.num_comps];
5095 __extension__ struct demangle_component *subs[di.num_subs];
5097 di.comps = comps;
5098 di.subs = subs;
5100 di.comps = alloca (di.num_comps * sizeof (*di.comps));
5101 di.subs = alloca (di.num_subs * sizeof (*di.subs));
5104 dc = cplus_demangle_mangled_name (&di, 1);