Lines Matching refs:ctxt
946 /// @param ctxt the context of the parsing.
952 do_indent_to_level(write_context& ctxt,
956 do_indent(ctxt.get_ostream(),
957 get_indent_to_level(ctxt, initial_indent, level));
963 /// @param ctxt the context of the parsing.
969 get_indent_to_level(write_context& ctxt, unsigned initial_indent,
973 level * ctxt.get_config().get_xml_element_indent();
988 /// @param ctxt the context of the parsing.
996 write_context& ctxt,
1002 if (!ctxt.get_annotate())
1005 ostream& o = ctxt.get_ostream();
1021 /// @param ctxt the context of the parsing.
1029 write_context& ctxt,
1035 if (!ctxt.get_annotate())
1038 ostream& o = ctxt.get_ostream();
1052 /// @param ctxt the context of the parsing.
1060 write_context& ctxt,
1066 if (!ctxt.get_annotate())
1069 ostream& o = ctxt.get_ostream();
1086 /// @param ctxt the context of the parsing.
1096 write_context& ctxt,
1102 if (!ctxt.get_annotate())
1105 ostream& o = ctxt.get_ostream();
1131 /// @param ctxt the context of the parsing.
1141 write_context& ctxt,
1147 if (!ctxt.get_annotate())
1150 ostream& o = ctxt.get_ostream();
1183 /// @param ctxt the context of the parsing.
1191 write_context& ctxt,
1197 if (!ctxt.get_annotate())
1200 ostream &o = ctxt.get_ostream();
1234 /// @param ctxt the writer context to use.
1236 write_location(const location& loc, write_context& ctxt)
1241 if (!ctxt.get_show_locs())
1249 ostream &o = ctxt.get_ostream();
1251 if (ctxt.get_short_locs())
1265 /// @param ctxt the @ref writer_context to use.
1268 write_context& ctxt)
1277 write_location(loc, ctxt);
1853 /// @param ctxt the write context to use.
1855 write_naming_typedef(const decl_base_sptr& decl, write_context& ctxt)
1860 ostream &o = ctxt.get_ostream();
1864 string id = ctxt.get_id_for_type(typedef_type);
1866 ctxt.record_type_as_referenced(typedef_type);
1874 /// @param ctxt the @ref write_context to use.
1880 write_type(const type_base_sptr& type, write_context& ctxt, unsigned indent)
1883 ctxt, indent)
1886 ctxt, indent)
1888 ctxt, indent)
1890 <reference_type_def>(type), ctxt, indent)
1892 <array_type_def>(type), ctxt, indent)
1894 ctxt, indent)
1896 ctxt, indent)
1897 || write_class_decl(is_class_type(type), ctxt, indent)
1898 || write_union_decl(is_union_type(type), ctxt, indent)
1900 (dynamic_pointer_cast<function_tdecl>(type), ctxt, indent))
1902 (dynamic_pointer_cast<class_tdecl>(type), ctxt, indent)))
1912 /// @param ctxt the context of the serialization. It contains e.g, the
1920 write_decl(const decl_base_sptr& decl, write_context& ctxt, unsigned indent)
1923 ctxt, indent)
1925 ctxt, indent)
1928 ctxt, indent)
1930 ctxt, indent)
1932 <reference_type_def>(decl), ctxt, indent)
1934 <array_type_def>(decl), ctxt, indent)
1936 ctxt, indent)
1938 ctxt, indent)
1939 || write_var_decl(dynamic_pointer_cast<var_decl>(decl), ctxt,
1942 (decl), ctxt, /*skip_first_parameter=*/true,
1945 ctxt, /*skip_first_parameter=*/false, indent)
1946 || write_class_decl(is_class_type(decl), ctxt, indent)
1947 || write_union_decl(is_union_type(decl), ctxt, indent)
1949 (dynamic_pointer_cast<function_tdecl>(decl), ctxt, indent))
1951 (dynamic_pointer_cast<class_tdecl>(decl), ctxt, indent)))
1965 /// @param ctxt the write context to use.
1970 write_context& ctxt,
1976 if (ctxt.type_is_emitted(type))
1985 ostream& o = ctxt.get_ostream();
1986 const config& c = ctxt.get_config();
2011 write_class_decl_opening_tag(class_type, "", ctxt, indent,
2016 unsigned nb_ws = get_indent_to_level(ctxt, indent, 1);
2017 write_member_type_opening_tag(type, ctxt, nb_ws);
2025 write_union_decl_opening_tag(union_type, "", ctxt, indent,
2030 unsigned nb_ws = get_indent_to_level(ctxt, indent, 1);
2031 write_member_type_opening_tag(type, ctxt, nb_ws);
2042 write_decl(decl, ctxt, indent);
2065 write_context_sptr ctxt(new write_context(env, default_output_stream));
2066 return ctxt;
2075 /// @param ctxt the @ref write_context to set the option for.
2079 set_show_locs(write_context& ctxt, bool flag)
2080 {ctxt.set_show_locs(flag);}
2087 /// @param ctxt the context to set this flag on to.
2091 set_annotate(write_context& ctxt, bool flag)
2092 {ctxt.set_annotate(flag);}
2098 /// @param ctxt the context to set this to.
2102 set_ostream(write_context& ctxt, ostream& os)
2103 {ctxt.set_ostream(os);}
2110 /// @param ctxt the context to set this flag on to.
2114 set_write_architecture(write_context& ctxt, bool flag)
2115 {ctxt.set_write_architecture(flag);}
2122 /// @param ctxt the context to set this flag on to.
2126 set_write_corpus_path(write_context& ctxt, bool flag)
2127 {ctxt.set_write_corpus_path(flag);}
2134 /// @param ctxt the context to set this flag on to.
2138 set_write_comp_dir(write_context& ctxt, bool flag)
2139 {ctxt.set_write_comp_dir(flag);}
2146 /// @param ctxt the context to set this flag on to.
2150 set_short_locs(write_context& ctxt, bool flag)
2151 {ctxt.set_short_locs(flag);}
2158 /// @param ctxt the context to set this flag on to.
2162 set_write_parameter_names(write_context& ctxt, bool flag)
2163 {ctxt.set_write_parameter_names(flag);}
2170 /// @param ctxt the context to set this flag on to.
2174 set_write_elf_needed(write_context& ctxt, bool flag)
2175 {ctxt.set_write_elf_needed(flag);}
2185 /// @param ctxt the context to set this flag on to.
2189 set_write_default_sizes(write_context& ctxt, bool flag)
2190 {ctxt.set_write_default_sizes(flag);}
2196 /// @param ctxt the context to set this property on.
2200 set_type_id_style(write_context& ctxt, type_id_style_kind style)
2201 {ctxt.set_type_id_style(style);}
2207 /// @param ctxt the write context to use.
2217 write_context &ctxt,
2229 write_member_type(*i, ctxt, indent);
2231 write_type(*i, ctxt, indent);
2244 /// @param ctxt the write context to consider.
2254 const write_context& ctxt,
2261 && !ctxt.type_is_emitted(t))
2270 /// @param ctxt the write context to use.
2278 write_referenced_types(write_context & ctxt,
2283 const config& c = ctxt.get_config();
2297 ctxt.get_referenced_types().begin();
2298 i != ctxt.get_referenced_types().end();
2300 if (referenced_type_should_be_emitted(*i, ctxt, tu, is_last))
2304 ctxt.get_referenced_function_types().begin();
2305 i != ctxt.get_referenced_function_types().end();
2307 if (referenced_type_should_be_emitted(*i, ctxt, tu, is_last))
2317 ctxt.sort_types(referenced_types_to_emit,
2329 if (!ctxt.type_is_emitted(t))
2334 write_decl_in_scope(decl, ctxt,
2340 write_function_type(fn_type, ctxt,
2363 ctxt.get_referenced_types().begin();
2364 i != ctxt.get_referenced_types().end();
2366 if (referenced_type_should_be_emitted(*i, ctxt, tu, is_last))
2373 /// @param ctxt the context of the serialization. It contains e.g,
2393 write_translation_unit(write_context& ctxt,
2403 && ctxt.has_non_emitted_referenced_types())
2406 ostream& o = ctxt.get_ostream();
2407 const config& c = ctxt.get_config();
2417 if (ctxt.get_short_locs())
2422 if (!tu.get_compilation_dir_path().empty() && ctxt.get_write_comp_dir())
2440 ctxt, indent + c.get_xml_element_indent());
2455 && !ctxt.type_is_emitted(class_type))
2456 write_type(class_type, ctxt,
2459 if (is_non_canonicalized_type(t) && !ctxt.type_is_emitted(t))
2460 write_type(t, ctxt, indent + c.get_xml_element_indent());
2464 if (!ctxt.decl_is_emitted(decl))
2465 write_decl(decl, ctxt, indent + c.get_xml_element_indent());
2469 write_referenced_types(ctxt, tu, indent, is_last);
2475 ctxt.sort_types(t, sorted_types);
2483 if (fn_type->get_is_artificial() || ctxt.type_is_emitted(fn_type))
2490 write_function_type(fn_type, ctxt, indent + c.get_xml_element_indent());
2495 write_referenced_types(ctxt, tu, indent, is_last);
2508 /// @param ctxt the context of the serialization. It contains e.g, the
2516 write_type_decl(const type_decl_sptr& d, write_context& ctxt, unsigned indent)
2521 ostream& o = ctxt.get_ostream();
2523 annotate(d, ctxt, indent);
2535 write_location(d, ctxt);
2537 o << " id='" << ctxt.get_id_for_type(d) << "'" << "/>\n";
2539 ctxt.record_type_as_emitted(d);
2548 /// @param ctxt the context of the serialization. It contains e.g, the
2557 write_context& ctxt, unsigned indent)
2562 ostream& o = ctxt.get_ostream();
2563 const config &c = ctxt.get_config();
2565 annotate(decl, ctxt, indent);
2577 write_canonical_types_of_scope(*decl, ctxt,
2583 if (ctxt.type_is_emitted(t))
2587 write_decl(*i, ctxt, indent + c.get_xml_element_indent());
2608 /// @param ctxt the write context.
2617 write_context& ctxt,
2623 ostream& o = ctxt.get_ostream();
2628 annotate(decl, ctxt, indent);
2632 << ctxt.get_id_for_type(underlying_type)
2635 ctxt.record_type_as_referenced(underlying_type);
2644 write_location(static_pointer_cast<decl_base>(decl), ctxt);
2648 i = ctxt.get_id_for_type(decl);
2652 ctxt.record_type_as_emitted(decl);
2661 /// @param ctxt the write context.
2669 write_context& ctxt,
2671 {return write_qualified_type_def(decl, "", ctxt, indent);}
2685 /// @param ctxt the context of the serialization.
2693 write_context& ctxt,
2699 ostream& o = ctxt.get_ostream();
2704 annotate(decl->get_canonical_type(), ctxt, indent);
2708 << ctxt.get_id_for_type(pointed_to_type)
2711 ctxt.record_type_as_referenced(pointed_to_type);
2714 (ctxt.get_write_default_sizes()
2721 i = ctxt.get_id_for_type(decl);
2725 write_location(static_pointer_cast<decl_base>(decl), ctxt);
2728 ctxt.record_type_as_emitted(decl);
2737 /// @param ctxt the context of the serialization.
2744 write_context& ctxt,
2746 {return write_pointer_type_def(decl, "", ctxt, indent);}
2760 /// @param ctxt the context of the serialization.
2768 write_context& ctxt,
2774 annotate(decl->get_canonical_type(), ctxt, indent);
2776 ostream& o = ctxt.get_ostream();
2788 o << " type-id='" << ctxt.get_id_for_type(pointed_to_type) << "'";
2790 ctxt.record_type_as_referenced(pointed_to_type);
2793 ctxt.record_type_as_referenced(f);
2796 (ctxt.get_write_default_sizes()
2803 i = ctxt.get_id_for_type(decl);
2806 write_location(static_pointer_cast<decl_base>(decl), ctxt);
2810 ctxt.record_type_as_emitted(decl);
2819 /// @param ctxt the context of the serialization.
2826 write_context& ctxt,
2828 {return write_reference_type_def(decl, "", ctxt, indent);}
2834 /// @param ctxt the context of the serialization.
2841 write_context& ctxt,
2847 annotate(decl, ctxt, indent);
2849 ostream& o = ctxt.get_ostream();
2880 << ctxt.get_id_for_type(underlying_type)
2882 ctxt.record_type_as_referenced(underlying_type);
2885 o << " id='" << ctxt.get_id_for_type(decl) << "'";
2887 write_location(decl->get_location(), ctxt);
2891 ctxt.record_type_as_emitted(decl);
2908 /// @param ctxt the context of the serialization.
2916 write_context& ctxt,
2922 annotate(decl, ctxt, indent);
2924 ostream& o = ctxt.get_ostream();
2932 o << " type-id='" << ctxt.get_id_for_type(element_type) << "'";
2934 ctxt.record_type_as_referenced(element_type);
2940 i = ctxt.get_id_for_type(decl);
2943 write_location(static_pointer_cast<decl_base>(decl), ctxt);
2957 indent + ctxt.get_config().get_xml_element_indent();
2958 write_array_subrange_type(*si, ctxt, local_indent);
2965 ctxt.record_type_as_emitted(decl);
2974 /// @param ctxt the context of the serialization.
2981 write_context& ctxt,
2983 {return write_array_type_def(decl, "", ctxt, indent);}
2997 /// @param ctxt the context of the serialization.
3005 write_context& ctxt,
3013 annotate(decl->get_canonical_type(), ctxt, indent);
3015 ostream& o = ctxt.get_ostream();
3021 write_naming_typedef(decl, ctxt);
3030 write_location(decl, ctxt);
3035 i = ctxt.get_id_for_type(decl);
3038 do_indent(o, indent + ctxt.get_config().get_xml_element_indent());
3040 << ctxt.get_id_for_type(decl->get_underlying_type())
3048 do_indent(o, indent + ctxt.get_config().get_xml_element_indent());
3059 ctxt.record_type_as_emitted(decl);
3068 /// @param ctxt the context of the serialization.
3075 write_context& ctxt,
3077 {return write_enum_type_decl(decl, "", ctxt, indent);}
3084 /// @param ctxt the read context to use.
3091 write_context& ctxt,
3097 ostream &o = ctxt.get_ostream();
3099 annotate(sym, ctxt, indent);
3152 /// @param ctxt the context to consider.
3159 write_context& ctxt,
3166 write_elf_symbol(*it, ctxt, indent);
3176 /// @param ctxt the write context to use for the writting.
3183 write_context& ctxt,
3189 ostream& o = ctxt.get_ostream();
3213 /// @param ctxt the context of the serialization.
3221 write_context& ctxt,
3227 ostream &o = ctxt.get_ostream();
3229 annotate(decl, ctxt, indent);
3238 string type_id = ctxt.get_id_for_type(underlying_type);
3240 ctxt.record_type_as_referenced(underlying_type);
3242 write_location(decl, ctxt);
3246 i = ctxt.get_id_for_type(decl);
3250 ctxt.record_type_as_emitted(decl);
3259 /// @param ctxt the context of the serialization.
3266 write_context& ctxt,
3268 {return write_typedef_decl(decl, "", ctxt, indent);}
3274 /// @param ctxt the context of the serialization.
3283 write_var_decl(const var_decl_sptr& decl, write_context& ctxt,
3289 annotate(decl, ctxt, indent);
3291 ostream &o = ctxt.get_ostream();
3297 o << " type-id='" << ctxt.get_id_for_type(var_type) << "'";
3298 ctxt.record_type_as_referenced(var_type);
3311 write_location(decl, ctxt);
3317 ctxt.record_decl_as_emitted(decl);
3326 /// @param ctxt the context of the serialization.
3335 write_function_decl(const function_decl_sptr& decl, write_context& ctxt,
3341 annotate(decl, ctxt, indent);
3343 ostream &o = ctxt.get_ostream();
3355 write_location(decl, ctxt);
3365 (ctxt.get_write_default_sizes()
3382 do_indent(o, indent + ctxt.get_config().get_xml_element_indent());
3389 annotate(*pi, ctxt,
3390 indent + ctxt.get_config().get_xml_element_indent());
3392 do_indent(o, indent + ctxt.get_config().get_xml_element_indent());
3395 << ctxt.get_id_for_type(parm_type)
3397 ctxt.record_type_as_referenced(parm_type);
3399 if (ctxt.get_write_parameter_names() && !(*pi)->get_name().empty())
3403 write_location((*pi)->get_location(), ctxt);
3409 annotate(return_type , ctxt,
3410 indent + ctxt.get_config().get_xml_element_indent());
3411 do_indent(o, indent + ctxt.get_config().get_xml_element_indent());
3412 o << "<return type-id='" << ctxt.get_id_for_type(return_type) << "'/>\n";
3413 ctxt.record_type_as_referenced(return_type);
3419 ctxt.record_decl_as_emitted(decl);
3428 /// @param ctxt the context of the serialization.
3435 write_context& ctxt, unsigned indent)
3440 ostream &o = ctxt.get_ostream();
3442 annotate(fn_type, ctxt, indent);
3449 (ctxt.get_write_default_sizes()
3457 << ctxt.get_id_for_type(method_type->get_class_type())
3465 interned_string id = ctxt.get_id_for_type(fn_type);
3480 do_indent(o, indent + ctxt.get_config().get_xml_element_indent());
3487 annotate(*pi, ctxt, indent + ctxt.get_config().get_xml_element_indent());
3489 do_indent(o, indent + ctxt.get_config().get_xml_element_indent());
3491 << ctxt.get_id_for_type(parm_type)
3493 ctxt.record_type_as_referenced(parm_type);
3507 annotate(return_type, ctxt, indent + ctxt.get_config().get_xml_element_indent());
3508 do_indent(o, indent + ctxt.get_config().get_xml_element_indent());
3509 o << "<return type-id='" << ctxt.get_id_for_type(return_type) << "'/>\n";
3510 ctxt.record_type_as_referenced(return_type);
3516 ctxt.record_type_as_emitted(fn_type);
3527 /// @param ctxt the write context to use.
3540 write_context& ctxt,
3547 ostream& o = ctxt.get_ostream();
3549 do_indent_to_level(ctxt, indent, 0);
3563 write_naming_typedef(decl, ctxt);
3567 write_location(decl, ctxt);
3575 << ctxt.get_id_for_type(is_type(decl->get_earlier_declaration()))
3581 i = ctxt.get_id_for_type(decl);
3599 /// @param ctxt the write context to use.
3612 write_context& ctxt,
3619 ostream& o = ctxt.get_ostream();
3621 do_indent_to_level(ctxt, indent, 0);
3630 write_naming_typedef(decl, ctxt);
3638 write_location(decl, ctxt);
3644 i = ctxt.get_id_for_type(decl);
3667 /// @param ctxt the context of the serialization.
3673 write_context& ctxt,
3681 annotate(decl, ctxt, indent);
3683 ostream& o = ctxt.get_ostream();
3689 const environment& env = ctxt.get_environment();
3726 write_class_decl_opening_tag(decl, id, ctxt, indent,
3733 unsigned nb_ws = get_indent_to_level(ctxt, indent, 1);
3736 if (!ctxt.type_is_emitted(t))
3737 write_member_type(t, ctxt, nb_ws);
3746 ctxt.record_type_as_emitted(type_base_sptr(t));
3751 write_class_decl_opening_tag(decl, id, ctxt, indent,
3756 unsigned nb_ws = get_indent_to_level(ctxt, indent, 1);
3763 annotate((*base)->get_base_class(), ctxt, nb_ws);
3776 << ctxt.get_id_for_type(base_type)
3779 ctxt.record_type_as_referenced(base_type);
3782 write_canonical_types_of_scope(*decl, ctxt, nb_ws,
3790 write_member_type(*ti, ctxt, nb_ws);
3810 write_var_decl(*data, ctxt, is_static,
3811 get_indent_to_level(ctxt, indent, 2));
3813 do_indent_to_level(ctxt, indent, 1);
3840 write_function_decl(fn, ctxt,
3842 get_indent_to_level(ctxt, indent, 2));
3844 do_indent_to_level(ctxt, indent, 1);
3868 write_function_decl(fn, ctxt,
3870 get_indent_to_level(ctxt, indent, 2));
3872 do_indent_to_level(ctxt, indent, 1);
3889 write_function_tdecl((*fn)->as_function_tdecl(), ctxt,
3890 get_indent_to_level(ctxt, indent, 2));
3906 write_class_tdecl((*cl)->as_class_tdecl(), ctxt,
3907 get_indent_to_level(ctxt, indent, 2));
3912 do_indent_to_level(ctxt, indent, 0);
3917 ctxt.record_type_as_emitted(decl);
3926 /// @param ctxt the context of the serialization.
3933 write_context& ctxt,
3935 {return write_class_decl(decl, "", ctxt, indent);}
3941 /// @param ctxt the context of the serialization.
3949 write_context& ctxt,
3957 annotate(decl, ctxt, indent);
3959 ostream& o = ctxt.get_ostream();
3961 write_union_decl_opening_tag(decl, id, ctxt, indent,
3965 unsigned nb_ws = get_indent_to_level(ctxt, indent, 1);
3971 write_member_type(*ti, ctxt, nb_ws);
3973 write_canonical_types_of_scope(*decl, ctxt, nb_ws,
3993 write_var_decl(*data, ctxt, is_static,
3994 get_indent_to_level(ctxt, indent, 2));
3996 do_indent_to_level(ctxt, indent, 1);
4023 write_function_decl(fn, ctxt,
4025 get_indent_to_level(ctxt, indent, 2));
4027 do_indent_to_level(ctxt, indent, 1);
4044 write_function_tdecl((*fn)->as_function_tdecl(), ctxt,
4045 get_indent_to_level(ctxt, indent, 2));
4061 write_class_tdecl((*cl)->as_class_tdecl(), ctxt,
4062 get_indent_to_level(ctxt, indent, 2));
4067 do_indent_to_level(ctxt, indent, 0);
4072 ctxt.record_type_as_emitted(decl);
4079 write_context& ctxt,
4081 {return write_union_decl(decl, "", ctxt, indent);}
4087 /// @param ctxt the write context to use.
4094 write_context& ctxt,
4097 ostream& o = ctxt.get_ostream();
4099 do_indent_to_level(ctxt, indent, 0);
4120 /// @param ctxt the write context to use.
4124 write_member_type(const type_base_sptr& t, write_context& ctxt, unsigned indent)
4129 ostream& o = ctxt.get_ostream();
4131 write_member_type_opening_tag(t, ctxt, indent);
4133 string id = ctxt.get_id_for_type(t);
4135 unsigned nb_ws = get_indent_to_level(ctxt, indent, 1);
4137 id, ctxt, nb_ws)
4139 id, ctxt, nb_ws)
4141 id, ctxt, nb_ws)
4143 id, ctxt, nb_ws)
4145 id, ctxt, nb_ws)
4147 id, ctxt, nb_ws)
4149 id, ctxt, nb_ws)
4151 id, ctxt, nb_ws));
4153 do_indent_to_level(ctxt, indent, 0);
4163 /// @param ctxt the context of the serialization.
4170 write_context& ctxt,
4176 ostream &o = ctxt.get_ostream();
4177 do_indent_to_level(ctxt, indent, 0);
4180 if (ctxt.type_has_existing_id(decl))
4186 << id_attr_name << "='" << ctxt.get_id_for_type(decl) << "'";
4192 write_location(decl, ctxt);
4196 ctxt.record_type_as_emitted(decl);
4205 /// @param ctxt the context of the serialization.
4213 write_context& ctxt, unsigned indent)
4218 ostream &o = ctxt.get_ostream();
4219 do_indent_to_level(ctxt, indent, 0);
4222 << ctxt.get_id_for_type(decl->get_type())
4229 write_location(decl, ctxt);
4240 /// @param ctxt the context of the serialization.
4248 write_context& ctxt,
4254 ostream& o = ctxt.get_ostream();
4255 do_indent_to_level(ctxt, indent, 0);
4258 if (ctxt.type_has_existing_id(decl))
4262 << ctxt.get_id_for_type(decl) << "'";
4270 unsigned nb_spaces = get_indent_to_level(ctxt, indent, 1);
4275 write_template_parameter(decl, ctxt, nb_spaces);
4277 do_indent_to_level(ctxt, indent, 0);
4280 ctxt.record_type_as_emitted(decl);
4289 /// @param ctxt the context of the serialization.
4297 write_context& ctxt, unsigned indent)
4302 ostream& o = ctxt.get_ostream();
4304 do_indent_to_level(ctxt, indent, 0);
4308 unsigned nb_spaces = get_indent_to_level(ctxt, indent, 1);
4311 ctxt, nb_spaces)
4314 ctxt, nb_spaces)
4317 ctxt, nb_spaces)
4320 ctxt, nb_spaces));
4322 do_indent_to_level(ctxt, indent, 0);
4332 /// @param ctxt the context of the serialization.
4339 write_context& ctxt, unsigned indent)
4342 (dynamic_pointer_cast<type_tparameter>(decl), ctxt, indent))
4345 ctxt, indent))
4348 ctxt, indent))
4351 ctxt, indent)))
4362 write_context& ctxt, unsigned indent)
4367 unsigned nb_spaces = get_indent_to_level(ctxt, indent, 1);
4372 write_template_parameter(*p, ctxt, nb_spaces);
4379 /// @param ctxt the context of the serialization
4384 write_context& ctxt, unsigned indent)
4389 ostream& o = ctxt.get_ostream();
4391 do_indent_to_level(ctxt, indent, 0);
4393 o << "<function-template-decl id='" << ctxt.get_id_for_fn_tmpl(decl) << "'";
4395 write_location(decl, ctxt);
4403 write_template_parameters(decl, ctxt, indent);
4405 write_function_decl(decl->get_pattern(), ctxt,
4407 get_indent_to_level(ctxt, indent, 1));
4409 do_indent_to_level(ctxt, indent, 0);
4421 /// @param ctxt the context of the serializtion.
4429 write_context& ctxt, unsigned indent)
4434 ostream& o = ctxt.get_ostream();
4436 do_indent_to_level(ctxt, indent, 0);
4438 o << "<class-template-decl id='" << ctxt.get_id_for_class_tmpl(decl) << "'";
4440 write_location(decl, ctxt);
4446 write_template_parameters(decl, ctxt, indent);
4448 write_class_decl(decl->get_pattern(), ctxt,
4449 get_indent_to_level(ctxt, indent, 1));
4451 do_indent_to_level(ctxt, indent, 0);
4460 /// @param ctxt the writing context to use.
4462 write_version_info(write_context& ctxt)
4464 ostream& o = ctxt.get_ostream();
4465 const config& c = ctxt.get_config();
4477 /// content (i.e. corpus.is_empty()), nothing is emitted to the ctxt's
4480 /// @param ctxt the write context to use.
4488 write_corpus(write_context& ctxt,
4499 do_indent_to_level(ctxt, indent, 0);
4501 std::ostream& out = ctxt.get_ostream();
4505 write_version_info(ctxt);
4510 if (!ctxt.get_write_corpus_path())
4519 if (ctxt.get_short_locs())
4526 && ctxt.get_write_architecture())
4538 if (ctxt.get_write_elf_needed () && !corpus->get_needed().empty())
4540 do_indent_to_level(ctxt, indent, 1);
4542 write_elf_needed(corpus->get_needed(), ctxt,
4543 get_indent_to_level(ctxt, indent, 2));
4544 do_indent_to_level(ctxt, indent, 1);
4551 do_indent_to_level(ctxt, indent, 1);
4554 write_elf_symbols_table(corpus->get_sorted_fun_symbols(), ctxt,
4555 get_indent_to_level(ctxt, indent, 2));
4557 do_indent_to_level(ctxt, indent, 1);
4564 do_indent_to_level(ctxt, indent, 1);
4567 write_elf_symbols_table(corpus->get_sorted_var_symbols(), ctxt,
4568 get_indent_to_level(ctxt, indent, 2));
4570 do_indent_to_level(ctxt, indent, 1);
4582 write_translation_unit(ctxt, tu,
4583 get_indent_to_level(ctxt, indent, 1),
4587 do_indent_to_level(ctxt, indent, 0);
4590 ctxt.clear_referenced_types();
4598 /// @param ctxt the write context to use.
4606 write_corpus_group(write_context& ctxt,
4614 do_indent_to_level(ctxt, indent, 0);
4616 std::ostream& out = ctxt.get_ostream();
4619 write_version_info(ctxt);
4621 if (!group->get_path().empty() && ctxt.get_write_corpus_path())
4624 if (!group->get_architecture_name().empty() && ctxt.get_write_architecture())
4642 write_corpus(ctxt, *c, get_indent_to_level(ctxt, indent, 1), true);
4644 do_indent_to_level(ctxt, indent, 0);
4666 xml_writer::write_context ctxt(d->get_environment(), o);
4667 xml_writer::set_annotate(ctxt, annotate);
4668 write_decl(d, ctxt, /*indent=*/0);
4710 xml_writer::write_context ctxt(v->get_environment(), o);
4711 xml_writer::set_annotate(ctxt, annotate);
4712 write_var_decl(v, ctxt, /*linkage_name*/true, /*indent=*/0);
4734 xml_writer::write_context ctxt(t.get_environment(), o);
4735 xml_writer::set_annotate(ctxt, annotate);
4736 write_translation_unit(ctxt, t, /*indent=*/0);
4839 /// @param ctxt the context to use.
4845 write_type_record(xml_writer::write_context& ctxt,
4864 string id = ctxt.get_id_for_type (const_cast<type_base*>(type));
4882 /// @param ctxt the write context.
4886 write_canonical_type_ids(xml_writer::write_context& ctxt, ostream& o)
4907 for (const auto &type : ctxt.get_emitted_types_set())
4908 write_type_record(ctxt, type, o);
4919 /// @param ctxt the write context.
4923 write_canonical_type_ids(xml_writer::write_context& ctxt,
4930 write_canonical_type_ids(ctxt, o);