GCC Middle and Back End API Reference
|
#include <json.h>
Public Member Functions | |
~array () | |
enum kind | get_kind () const final override |
void | print (pretty_printer *pp, bool formatted) const final override |
void | append (value *v) |
void | dump (FILE *, bool formatted) const |
Private Attributes | |
auto_vec< value * > | m_elements |
Subclass of value for arrays.
array::~array | ( | ) |
class json::array, a subclass of json::value, representing an ordered collection of values.
json::array's dtor.
References FOR_EACH_VEC_ELT, i, and m_elements.
Append non-NULL value V to a json::array, taking ownership of V.
References gcc_assert, and m_elements.
Referenced by sarif_thread_flow::add_location(), sarif_invocation::add_notification_for_ice(), sarif_result::add_related_location(), sarif_builder::end_diagnostic(), optrecord_json_writer::inlining_chain_to_json(), sarif_builder::make_result_object(), json_output_format::on_end_diagnostic(), optrecord_json_writer::optinfo_to_json(), optrecord_json_writer::optrecord_json_writer(), and output_intermediate_json_line().
class json::value.
Dump this json::value tree to OUTF. The key/value pairs of json::objects are printed in the order in which the keys were originally inserted.
References ggc_alloc(), pp_buffer, pp_flush(), and json::value::print().
Referenced by json_output_format::flush_to_file(), and generate_results().
Implements json::value.
References json::JSON_ARRAY.
|
finaloverridevirtual |
Implementation of json::value::print for json::array.
Implements json::value.
References FOR_EACH_VEC_ELT, ggc_alloc(), i, m_elements, pp_character(), pp_indent(), pp_indentation, pp_newline(), pp_space, pp_string(), and json::value::print().
Referenced by optrecord_json_writer::write().