Home | History | Annotate | Download | only in m_demangle

Lines Matching refs:di

786 d_make_empty (struct d_info *di)
790 if (di->next_comp >= di->num_comps)
792 p = &di->comps[di->next_comp];
793 ++di->next_comp;
800 d_make_comp (struct d_info *di, enum demangle_component_type type,
890 p = d_make_empty (di);
903 d_make_demangle_mangled_name (struct d_info *di, const char *s)
905 if (d_peek_char (di) != '_' || d_peek_next_char (di) != 'Z')
906 return d_make_name (di, s, strlen (s));
907 d_advance (di, 2);
908 return d_encoding (di, 0);
914 d_make_name (struct d_info *di, const char *s, int len)
918 p = d_make_empty (di);
927 d_make_builtin_type (struct d_info *di,
934 p = d_make_empty (di);
946 d_make_operator (struct d_info *di, const struct demangle_operator_info *op)
950 p = d_make_empty (di);
962 d_make_extended_operator (struct d_info *di, int args,
967 p = d_make_empty (di);
974 d_make_default_arg (struct d_info *di, int num,
977 struct demangle_component *p = d_make_empty (di);
990 d_make_ctor (struct d_info *di, enum gnu_v3_ctor_kinds kind,
995 p = d_make_empty (di);
1004 d_make_dtor (struct d_info *di, enum gnu_v3_dtor_kinds kind,
1009 p = d_make_empty (di);
1018 d_make_template_param (struct d_info *di, long i)
1022 p = d_make_empty (di);
1034 d_make_function_param (struct d_info *di, long i)
1038 p = d_make_empty (di);
1050 d_make_sub (struct d_info *di, const char *name, int len)
1054 p = d_make_empty (di);
1070 cplus_demangle_mangled_name (struct d_info *di, int top_level)
1074 if (! d_check_char (di, '_')
1080 if (! d_check_char (di, 'Z'))
1082 p = d_encoding (di, top_level);
1086 if (top_level && (di->options & DMGL_PARAMS) != 0)
1087 while (d_peek_char (di) == '.'
1088 && (IS_LOWER (d_peek_next_char (di))
1089 || d_peek_next_char (di) == '_'
1090 || IS_DIGIT (d_peek_next_char (di))))
1091 p = d_clone_suffix (di, p);
1155 d_encoding (struct d_info *di, int top_level)
1157 char peek = d_peek_char (di);
1160 return d_special_name (di);
1165 dc = d_name (di);
1167 if (dc != NULL && top_level && (di->options & DMGL_PARAMS) == 0)
1196 peek = d_peek_char (di);
1199 return d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME, dc,
1200 d_bare_function_type (di, has_return_type (dc)));
1217 d_name (struct d_info *di)
1219 char peek = d_peek_char (di);
1225 return d_nested_name (di);
1228 return d_local_name (di);
1232 return d_unqualified_name (di);
1238 if (d_peek_next_char (di) != 't')
1240 dc = d_substitution (di, 0);
1245 d_advance (di, 2);
1246 dc = d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME,
1247 d_make_name (di, "std", 3),
1248 d_unqualified_name (di));
1249 di->expansion += 3;
1253 if (d_peek_char (di) != 'I')
1267 if (! d_add_substitution (di, dc))
1270 dc = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, dc,
1271 d_template_args (di));
1278 dc = d_unqualified_name (di);
1279 if (d_peek_char (di) == 'I')
1284 if (! d_add_substitution (di, dc))
1286 dc = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, dc,
1287 d_template_args (di));
1298 d_nested_name (struct d_info *di)
1303 if (! d_check_char (di, 'N'))
1306 pret = d_cv_qualifiers (di, &ret, 1);
1310 *pret = d_prefix (di);
1314 if (! d_check_char (di, 'E'))
1333 d_prefix (struct d_info *di)
1343 peek = d_peek_char (di);
1354 char peek2 = d_peek_next_char (di);
1357 dc = cplus_demangle_type (di);
1360 dc = d_unqualified_name (di);
1367 dc = d_unqualified_name (di);
1369 dc = d_substitution (di, 1);
1375 dc = d_template_args (di);
1378 dc = d_template_param (di);
1388 d_advance (di, 1);
1397 ret = d_make_comp (di, comb_type, ret, dc);
1399 if (peek != 'S' && d_peek_char (di) != 'E')
1401 if (! d_add_substitution (di, ret))
1416 d_unqualified_name (struct d_info *di)
1420 peek = d_peek_char (di);
1422 return d_source_name (di);
1427 ret = d_operator_name (di);
1429 di->expansion += sizeof "operator" + ret->u.s_operator.op->len - 2;
1433 return d_ctor_dtor_name (di);
1438 d_advance (di, 1);
1440 ret = d_source_name (di);
1443 if (! d_discriminator (di))
1449 switch (d_peek_next_char (di))
1452 return d_lambda (di);
1454 return d_unnamed_type (di);
1466 d_source_name (struct d_info *di)
1471 len = d_number (di);
1474 ret = d_identifier (di, len);
1475 di->last_name = ret;
1482 d_number (struct d_info *di)
1489 peek = d_peek_char (di);
1493 d_advance (di, 1);
1494 peek = d_peek_char (di);
1507 d_advance (di, 1);
1508 peek = d_peek_char (di);
1515 d_number_component (struct d_info *di)
1517 struct demangle_component *ret = d_make_empty (di);
1521 ret->u.s_number.number = d_number (di);
1529 d_identifier (struct d_info *di, int len)
1533 name = d_str (di);
1535 if (di->send - name < len)
1538 d_advance (di, len);
1543 if ((di->options & DMGL_JAVA) != 0
1544 && d_peek_char (di) == '$')
1545 d_advance (di, 1);
1560 di->expansion -= len - sizeof "(anonymous namespace)";
1561 return d_make_name (di, "(anonymous namespace)",
1566 return d_make_name (di, name, len);
1635 d_operator_name (struct d_info *di)
1640 c1 = d_next_char (di);
1641 c2 = d_next_char (di);
1643 return d_make_extended_operator (di, c2 - '0', d_source_name (di));
1645 return d_make_comp (di, DEMANGLE_COMPONENT_CAST,
1646 cplus_demangle_type (di), NULL);
1666 return d_make_operator (di, p);
1679 d_make_character (struct d_info *di, int c)
1682 p = d_make_empty (di);
1692 d_java_resource (struct d_info *di)
1700 len = d_number (di);
1705 if (d_next_char (di) != '_')
1709 str = d_str (di);
1736 next = d_make_character (di, c);
1737 d_advance (di, i);
1738 str = d_str (di);
1750 next = d_make_name (di, str, i);
1751 d_advance (di, i);
1752 str = d_str (di);
1763 p = d_make_comp (di, DEMANGLE_COMPONENT_COMPOUND_NAME, p, next);
1769 p = d_make_comp (di, DEMANGLE_COMPONENT_JAVA_RESOURCE, p, NULL);
1793 d_special_name (struct d_info *di)
1795 di->expansion += 20;
1796 if (d_check_char (di, 'T'))
1798 switch (d_next_char (di))
1801 di->expansion -= 5;
1802 return d_make_comp (di, DEMANGLE_COMPONENT_VTABLE,
1803 cplus_demangle_type (di), NULL);
1805 di->expansion -= 10;
1806 return d_make_comp (di, DEMANGLE_COMPONENT_VTT,
1807 cplus_demangle_type (di), NULL);
1809 return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO,
1810 cplus_demangle_type (di), NULL);
1812 return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO_NAME,
1813 cplus_demangle_type (di), NULL);
1816 if (! d_call_offset (di, 'h'))
1818 return d_make_comp (di, DEMANGLE_COMPONENT_THUNK,
1819 d_encoding (di, 0), NULL);
1822 if (! d_call_offset (di, 'v'))
1824 return d_make_comp (di, DEMANGLE_COMPONENT_VIRTUAL_THUNK,
1825 d_encoding (di, 0), NULL);
1828 if (! d_call_offset (di, '\0'))
1830 if (! d_call_offset (di, '\0'))
1832 return d_make_comp (di, DEMANGLE_COMPONENT_COVARIANT_THUNK,
1833 d_encoding (di, 0), NULL);
1841 derived_type = cplus_demangle_type (di);
1842 offset = d_number (di);
1845 if (! d_check_char (di, '_'))
1847 base_type = cplus_demangle_type (di);
1850 di->expansion += 5;
1851 return d_make_comp (di, DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE,
1856 return d_make_comp (di, DEMANGLE_COMPONENT_TYPEINFO_FN,
1857 cplus_demangle_type (di), NULL);
1859 return d_make_comp (di, DEMANGLE_COMPONENT_JAVA_CLASS,
1860 cplus_demangle_type (di), NULL);
1866 else if (d_check_char (di, 'G'))
1868 switch (d_next_char (di))
1871 return d_make_comp (di, DEMANGLE_COMPONENT_GUARD, d_name (di), NULL);
1875 struct demangle_component *name = d_name (di);
1876 return d_make_comp (di, DEMANGLE_COMPONENT_REFTEMP, name,
1877 d_number_component (di));
1881 return d_make_comp (di, DEMANGLE_COMPONENT_HIDDEN_ALIAS,
1882 d_encoding (di, 0), NULL);
1885 switch (d_next_char (di))
1888 return d_make_comp (di, DEMANGLE_COMPONENT_NONTRANSACTION_CLONE,
1889 d_encoding (di, 0), NULL);
1897 return d_make_comp (di, DEMANGLE_COMPONENT_TRANSACTION_CLONE,
1898 d_encoding (di, 0), NULL);
1902 return d_java_resource (di);
1926 d_call_offset (struct d_info *di, int c)
1929 c = d_next_char (di);
1932 d_number (di);
1935 d_number (di);
1936 if (! d_check_char (di, '_'))
1938 d_number (di);
1943 if (! d_check_char (di, '_'))
1958 d_ctor_dtor_name (struct d_info *di)
1960 if (di->last_name != NULL)
1962 if (di->last_name->type == DEMANGLE_COMPONENT_NAME)
1963 di->expansion += di->last_name->u.s_name.len;
1964 else if (di->last_name->type == DEMANGLE_COMPONENT_SUB_STD)
1965 di->expansion += di->last_name->u.s_string.len;
1967 switch (d_peek_char (di))
1973 switch (d_peek_next_char (di))
1990 d_advance (di, 2);
1991 return d_make_ctor (di, kind, di->last_name);
1998 switch (d_peek_next_char (di))
2015 d_advance (di, 2);
2016 return d_make_dtor (di, kind, di->last_name);
2088 cplus_demangle_type (struct d_info *di)
2109 peek = d_peek_char (di);
2114 pret = d_cv_qualifiers (di, &ret, 0);
2117 *pret = cplus_demangle_type (di);
2118 if (! *pret || ! d_add_substitution (di, ret))
2131 ret = d_make_builtin_type (di,
2133 di->expansion += ret->u.s_builtin.type->len;
2135 d_advance (di, 1);
2139 d_advance (di, 1);
2140 ret = d_make_comp (di, DEMANGLE_COMPONENT_VENDOR_TYPE,
2141 d_source_name (di), NULL);
2145 ret = d_function_type (di);
2152 ret = d_class_enum_type (di);
2156 ret = d_array_type (di);
2160 ret = d_pointer_to_member_type (di);
2164 ret = d_template_param (di);
2165 if (d_peek_char (di) == 'I')
2170 if (! d_add_substitution (di, ret))
2172 ret = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, ret,
2173 d_template_args (di));
2183 peek_next = d_peek_next_char (di);
2188 ret = d_substitution (di, 0);
2191 if (d_peek_char (di) == 'I')
2192 ret = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, ret,
2193 d_template_args (di));
2199 ret = d_class_enum_type (di);
2211 d_advance (di, 1);
2212 ret = d_make_comp (di, DEMANGLE_COMPONENT_RVALUE_REFERENCE,
2213 cplus_demangle_type (di), NULL);
2217 d_advance (di, 1);
2218 ret = d_make_comp (di, DEMANGLE_COMPONENT_POINTER,
2219 cplus_demangle_type (di), NULL);
2223 d_advance (di, 1);
2224 ret = d_make_comp (di, DEMANGLE_COMPONENT_REFERENCE,
2225 cplus_demangle_type (di), NULL);
2229 d_advance (di, 1);
2230 ret = d_make_comp (di, DEMANGLE_COMPONENT_COMPLEX,
2231 cplus_demangle_type (di), NULL);
2235 d_advance (di, 1);
2236 ret = d_make_comp (di, DEMANGLE_COMPONENT_IMAGINARY,
2237 cplus_demangle_type (di), NULL);
2241 d_advance (di, 1);
2242 ret = d_source_name (di);
2243 ret = d_make_comp (di, DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL,
2244 cplus_demangle_type (di), ret);
2249 d_advance (di, 1);
2250 peek = d_next_char (di);
2256 ret = d_make_comp (di, DEMANGLE_COMPONENT_DECLTYPE,
2257 d_expression (di), NULL);
2258 if (ret && d_next_char (di) != 'E')
2264 ret = d_make_comp (di, DEMANGLE_COMPONENT_PACK_EXPANSION,
2265 cplus_demangle_type (di), NULL);
2270 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[26]);
2271 di->expansion += ret->u.s_builtin.type->len;
2275 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[27]);
2276 di->expansion += ret->u.s_builtin.type->len;
2280 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[28]);
2281 di->expansion += ret->u.s_builtin.type->len;
2285 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[29]);
2286 di->expansion += ret->u.s_builtin.type->len;
2290 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[30]);
2291 di->expansion += ret->u.s_builtin.type->len;
2295 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[31]);
2296 di->expansion += ret->u.s_builtin.type->len;
2301 ret = d_make_empty (di);
2303 if ((ret->u.s_fixed.accum = IS_DIGIT (d_peek_char (di))))
2305 d_number (di);
2306 ret->u.s_fixed.length = cplus_demangle_type (di);
2309 d_number (di);
2310 peek = d_next_char (di);
2315 ret = d_vector_type (di);
2320 ret = d_make_builtin_type (di, &cplus_demangle_builtin_types[32]);
2321 di->expansion += ret->u.s_builtin.type->len;
2335 if (! d_add_substitution (di, ret))
2345 d_cv_qualifiers (struct d_info *di,
2352 peek = d_peek_char (di);
2357 d_advance (di, 1);
2363 di->expansion += sizeof "restrict";
2370 di->expansion += sizeof "volatile";
2377 di->expansion += sizeof "const";
2380 *pret = d_make_comp (di, t, NULL, NULL);
2385 peek = d_peek_char (di);
2416 d_function_type (struct d_info *di)
2420 if (! d_check_char (di, 'F'))
2422 if (d_peek_char (di) == 'Y')
2426 d_advance (di, 1);
2428 ret = d_bare_function_type (di, 1);
2429 if (! d_check_char (di, 'E'))
2437 d_parmlist (struct d_info *di)
2448 char peek = d_peek_char (di);
2451 type = cplus_demangle_type (di);
2454 *ptl = d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, type, NULL);
2471 di->expansion -= d_left (tl)->u.s_builtin.type->len;
2481 d_bare_function_type (struct d_info *di, int has_return_tipe)
2489 peek = d_peek_char (di);
2492 d_advance (di, 1);
2498 return_type = cplus_demangle_type (di);
2505 tl = d_parmlist (di);
2509 return d_make_comp (di, DEMANGLE_COMPONENT_FUNCTION_TYPE,
2516 d_class_enum_type (struct d_info *di)
2518 return d_name (di);
2526 d_array_type (struct d_info *di)
2531 if (! d_check_char (di, 'A'))
2534 peek = d_peek_char (di);
2541 s = d_str (di);
2544 d_advance (di, 1);
2545 peek = d_peek_char (di);
2548 dim = d_make_name (di, s, d_str (di) - s);
2554 dim = d_expression (di);
2559 if (! d_check_char (di, '_'))
2562 return d_make_comp (di, DEMANGLE_COMPONENT_ARRAY_TYPE, dim,
2563 cplus_demangle_type (di));
2570 d_vector_type (struct d_info *di)
2575 peek = d_peek_char (di);
2578 d_advance (di, 1);
2579 dim = d_expression (di);
2582 dim = d_number_component (di);
2587 if (! d_check_char (di, '_'))
2590 return d_make_comp (di, DEMANGLE_COMPONENT_VECTOR_TYPE, dim,
2591 cplus_demangle_type (di));
2597 d_pointer_to_member_type (struct d_info *di)
2603 if (! d_check_char (di, 'M'))
2606 cl = cplus_demangle_type (di);
2624 pmem = d_cv_qualifiers (di, &mem, 1);
2627 *pmem = cplus_demangle_type (di);
2633 if (! d_add_substitution (di, mem))
2637 return d_make_comp (di, DEMANGLE_COMPONENT_PTRMEM_TYPE, cl, mem);
2643 d_compact_number (struct d_info *di)
2646 if (d_peek_char (di) == '_')
2648 else if (d_peek_char (di) == 'n')
2651 num = d_number (di) + 1;
2653 if (! d_check_char (di, '_'))
2663 d_template_param (struct d_info *di)
2667 if (! d_check_char (di, 'T'))
2670 param = d_compact_number (di);
2674 ++di->did_subs;
2676 return d_make_template_param (di, param);
2682 d_template_args (struct d_info *di)
2691 hold_last_name = di->last_name;
2693 if (! d_check_char (di, 'I'))
2696 if (d_peek_char (di) == 'E')
2699 d_advance (di, 1);
2700 return d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, NULL, NULL);
2709 a = d_template_arg (di);
2713 *pal = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, a, NULL);
2718 if (d_peek_char (di) == 'E')
2720 d_advance (di, 1);
2725 di->last_name = hold_last_name;
2736 d_template_arg (struct d_info *di)
2740 switch (d_peek_char (di))
2743 d_advance (di, 1);
2744 ret = d_expression (di);
2745 if (! d_check_char (di, 'E'))
2750 return d_expr_primary (di);
2754 return d_template_args (di);
2757 return cplus_demangle_type (di);
2764 d_exprlist (struct d_info *di)
2769 if (d_peek_char (di) == 'E')
2771 d_advance (di, 1);
2772 return d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, NULL, NULL);
2777 struct demangle_component *arg = d_expression (di);
2781 *p = d_make_comp (di, DEMANGLE_COMPONENT_ARGLIST, arg, NULL);
2786 if (d_peek_char (di) == 'E')
2788 d_advance (di, 1);
2808 d_expression (struct d_info *di)
2812 peek = d_peek_char (di);
2814 return d_expr_primary (di);
2816 return d_template_param (di);
2817 else if (peek == 's' && d_peek_next_char (di) == 'r')
2822 d_advance (di, 2);
2823 type = cplus_demangle_type (di);
2824 name = d_unqualified_name (di);
2825 if (d_peek_char (di) != 'I')
2826 return d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, type, name);
2828 return d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, type,
2829 d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, name,
2830 d_template_args (di)));
2832 else if (peek == 's' && d_peek_next_char (di) == 'p')
2834 d_advance (di, 2);
2835 return d_make_comp (di, DEMANGLE_COMPONENT_PACK_EXPANSION,
2836 d_expression (di), NULL);
2838 else if (peek == 'f' && d_peek_next_char (di) == 'p')
2842 d_advance (di, 2);
2843 if (d_peek_char (di) == 'T')
2846 d_advance (di, 1);
2851 index = d_compact_number (di) + 1;
2855 return d_make_function_param (di, index);
2858 || (peek == 'o' && d_peek_next_char (di) == 'n'))
2866 d_advance (di, 2);
2868 name = d_unqualified_name (di);
2871 if (d_peek_char (di) == 'I')
2872 return d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE, name,
2873 d_template_args (di));
2882 op = d_operator_name (di);
2887 di->expansion += op->u.s_operator.op->len - 2;
2891 return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
2892 cplus_demangle_type (di));
2915 && d_check_char (di, '_'))
2916 operand = d_exprlist (di);
2918 operand = d_expression (di);
2919 return d_make_comp (di, DEMANGLE_COMPONENT_UNARY, op,
2928 left = d_expression (di);
2930 right = d_exprlist (di);
2933 right = d_unqualified_name (di);
2934 if (d_peek_char (di) == 'I')
2935 right = d_make_comp (di, DEMANGLE_COMPONENT_TEMPLATE,
2936 right, d_template_args (di));
2939 right = d_expression (di);
2941 return d_make_comp (di, DEMANGLE_COMPONENT_BINARY, op,
2942 d_make_comp (di,
2951 first = d_expression (di);
2952 second = d_expression (di);
2953 return d_make_comp (di, DEMANGLE_COMPONENT_TRINARY, op,
2954 d_make_comp (di,
2957 d_make_comp (di,
2960 d_expression (di))));
2974 d_expr_primary (struct d_info *di)
2978 if (! d_check_char (di, 'L'))
2980 if (d_peek_char (di) == '_'
2982 || d_peek_char (di) == 'Z')
2983 ret = cplus_demangle_mangled_name (di, 0);
2990 type = cplus_demangle_type (di);
2998 di->expansion -= type->u.s_builtin.type->len;
3012 if (d_peek_char (di) == 'n')
3015 d_advance (di, 1);
3017 s = d_str (di);
3018 while (d_peek_char (di) != 'E')
3020 if (d_peek_char (di) == '\0')
3022 d_advance (di, 1);
3024 ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s));
3026 if (! d_check_char (di, 'E'))
3036 d_local_name (struct d_info *di)
3040 if (! d_check_char (di, 'Z'))
3043 function = d_encoding (di, 0);
3045 if (! d_check_char (di, 'E'))
3048 if (d_peek_char (di) == 's')
3050 d_advance (di, 1);
3051 if (! d_discriminator (di))
3053 return d_make_comp (di, DEMANGLE_COMPONENT_LOCAL_NAME, function,
3054 d_make_name (di, "string literal",
3062 if (d_peek_char (di) == 'd')
3065 d_advance (di, 1);
3066 num = d_compact_number (di);
3071 name = d_name (di);
3080 if (! d_discriminator (di))
3084 name = d_make_default_arg (di, num, name);
3085 return d_make_comp (di, DEMANGLE_COMPONENT_LOCAL_NAME, function, name);
3095 d_discriminator (struct d_info *di)
3099 if (d_peek_char (di) != '_')
3101 d_advance (di, 1);
3102 discrim = d_number (di);
3111 d_lambda (struct d_info *di)
3117 if (! d_check_char (di, 'U'))
3119 if (! d_check_char (di, 'l'))
3122 tl = d_parmlist (di);
3126 if (! d_check_char (di, 'E'))
3129 num = d_compact_number (di);
3133 ret = d_make_empty (di);
3141 if (! d_add_substitution (di, ret))
3150 d_unnamed_type (struct d_info *di)
3155 if (! d_check_char (di, 'U'))
3157 if (! d_check_char (di, 't'))
3160 num = d_compact_number (di);
3164 ret = d_make_empty (di);
3171 if (! d_add_substitution (di, ret))
3181 d_clone_suffix (struct d_info *di, struct demangle_component *encoding)
3183 const char *suffix = d_str (di);
3199 d_advance (di, pend - suffix);
3200 n = d_make_name (di, suffix, pend - suffix);
3201 return d_make_comp (di, DEMANGLE_COMPONENT_CLONE, encoding, n);
3207 d_add_substitution (struct d_info *di, struct demangle_component *dc)
3211 if (di->next_sub >= di->num_subs)
3213 di->subs[di->next_sub] = dc;
3214 ++di->next_sub;
3263 d_substitution (struct d_info *di, int prefix)
3267 if (! d_check_char (di, 'S'))
3270 c = d_next_char (di);
3291 c = d_next_char (di);
3298 if (id >= (unsigned int) di->next_sub)
3301 ++di->did_subs;
3303 return di->subs[id];
3311 verbose = (di->options & DMGL_VERBOSE) != 0;
3316 peek = d_peek_char (di);
3331 di->last_name = d_make_sub (di, p->set_last_name,
3343 di->expansion += len;
3344 return d_make_sub (di, s, len);
5009 struct d_info *di)
5011 di->s = mangled;
5012 di->send = mangled + len;
5013 di->options = options;
5015 di->n = mangled;
5020 di->num_comps = 2 * len;
5021 di->next_comp = 0;
5025 di->num_subs = len;
5026 di->next_sub = 0;
5027 di->did_subs = 0;
5029 di->last_name = NULL;
5031 di->expansion = 0;
5051 struct d_info di;
5069 cplus_demangle_init_info (mangled, options, strlen (mangled), &di);
5073 __extension__ struct demangle_component comps[di.num_comps];
5074 __extension__ struct demangle_component *subs[di.num_subs];
5076 di.comps = comps;
5077 di.subs = subs;
5079 di.comps = alloca (di.num_comps * sizeof (*di.comps));
5080 di.subs = alloca (di.num_subs * sizeof (*di.subs));
5086 dc = cplus_demangle_type (&di);
5089 dc = cplus_demangle_mangled_name (&di, 1);
5093 d_advance (&di, 11);
5094 dc = d_make_comp (&di,
5098 d_make_demangle_mangled_name (&di, d_str (&di)),
5100 d_advance (&di, strlen (d_str (&di)));
5108 if (((options & DMGL_PARAMS) != 0) && d_peek_char (&di) != '\0')
5341 struct d_info di;
5348 cplus_demangle_init_info (mangled, DMGL_GNU_V3, strlen (mangled), &di);
5352 __extension__ struct demangle_component comps[di.num_comps];
5353 __extension__ struct demangle_component *subs[di.num_subs];
5355 di.comps = comps;
5356 di.subs = subs;
5358 di.comps = alloca (di.num_comps * sizeof (*di.comps));
5359 di.subs = alloca (di.num_subs * sizeof (*di.subs));
5362 dc = cplus_demangle_mangled_name (&di, 1);