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 | append_string (const char *utf8_value) |
template<typename JsonType > | |
void | append (std::unique_ptr< JsonType > v) |
size_t | size () const |
value * | operator[] (size_t i) const |
value ** | begin () |
value ** | end () |
const value *const * | begin () const |
const value *const * | end () const |
size_t | length () const |
value * | get (size_t idx) const |
void | dump (FILE *, bool formatted) const |
void DEBUG_FUNCTION | dump () 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.
|
inline |
References append().
void array::append | ( | value * | v | ) |
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(), optrecord_json_writer::add_pass_list(), sarif_location_manager::add_related_location(), append(), append_string(), bt_callback(), sarif_code_flow::get_or_append_thread_flow(), optrecord_json_writer::inlining_chain_to_json(), sarif_location::lazily_add_relationship_object(), timer::make_json(), optrecord_json_writer::optinfo_to_json(), optrecord_json_writer::optrecord_json_writer(), output_intermediate_json_line(), and output_json_intermediate_file().
void array::append_string | ( | const char * | utf8_value | ) |
References append(), and gcc_assert.
Referenced by sarif_location_relationship::lazily_add_kind(), optrecord_json_writer::optinfo_to_json(), and optrecord_json_writer::pass_to_json().
|
inline |
References m_elements.
|
inline |
References m_elements.
|
inherited |
A convenience function for debugging. Dump to stderr with formatting, and a trailing newline.
References json::value::dump().
Referenced by json::value::dump().
|
inherited |
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 output_buffer::m_stream, pp_buffer(), pp_flush(), and json::value::print().
Referenced by generate_results().
|
inline |
References m_elements.
|
inline |
References m_elements.
|
inline |
References m_elements.
Referenced by sarif_code_flow::sarif_code_flow().
|
inlinefinaloverridevirtual |
Implements json::value.
References json::JSON_ARRAY.
|
inline |
References m_elements.
|
inline |
References i, and m_elements.
|
finaloverridevirtual |
Implementation of json::value::print for json::array.
Implements json::value.
References FOR_EACH_VEC_ELT, 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().
|
inline |
References m_elements.
Referenced by sarif_thread_flow::add_location(), bt_callback(), and sarif_code_flow::get_or_append_thread_flow().