GCC Middle and Back End API Reference
sarif_invocation Class Reference
Inheritance diagram for sarif_invocation:
Collaboration diagram for sarif_invocation:

Public Member Functions

 sarif_invocation ()
 
void add_notification_for_ice (diagnostic_context *context, const diagnostic_info &diagnostic, sarif_builder *builder)
 
void prepare_to_flush (diagnostic_context *context)
 
sarif_property_bagget_or_create_properties ()
 
enum kind get_kind () const final override
 
void print (pretty_printer *pp, bool formatted) const final override
 
void set (const char *key, value *v)
 
valueget (const char *key) const
 
void set_string (const char *key, const char *utf8_value)
 
void set_integer (const char *key, long v)
 
void set_float (const char *key, double v)
 
void set_bool (const char *key, bool v)
 
void dump (FILE *, bool formatted) const
 

Private Types

typedef hash_map< char *, value *, simple_hashmap_traits< nofree_string_hash, value * > > map_t
 

Private Attributes

json::arraym_notifications_arr
 
bool m_success
 
map_t m_map
 
auto_vec< const char * > m_keys
 

Detailed Description

Subclass of json::object for SARIF invocation objects
(SARIF v2.1.0 section 3.20).   

Member Typedef Documentation

◆ map_t

Constructor & Destructor Documentation

◆ sarif_invocation()

sarif_invocation::sarif_invocation ( )
inline

Member Function Documentation

◆ add_notification_for_ice()

void sarif_invocation::add_notification_for_ice ( diagnostic_context * context,
const diagnostic_info & diagnostic,
sarif_builder * builder )
class sarif_invocation : public sarif_object.   
Handle an internal compiler error DIAGNOSTIC occurring on CONTEXT.
Add an object representing the ICE to the notifications array.   

References json::array::append(), ggc_alloc(), m_notifications_arr, and m_success.

Referenced by sarif_builder::end_diagnostic().

◆ dump()

void value::dump ( FILE * outf,
bool formatted ) const
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 ggc_alloc(), pp_buffer, pp_flush(), and json::value::print().

Referenced by json_output_format::flush_to_file(), and generate_results().

◆ get()

value * object::get ( const char * key) const
inherited
Get the json::value * for KEY.

The object retains ownership of the value.   

References gcc_assert, json::object::get(), json::object::m_map, and NULL.

Referenced by json::object::get(), and sarif_object::get_or_create_properties().

◆ get_kind()

enum kind json::object::get_kind ( ) const
inlinefinaloverridevirtualinherited

Implements json::value.

References json::JSON_OBJECT.

◆ get_or_create_properties()

sarif_property_bag & sarif_object::get_or_create_properties ( )
inherited
class sarif_object : public json::object.   

References json::object::get(), ggc_alloc(), json::JSON_OBJECT, and json::object::set().

◆ prepare_to_flush()

◆ print()

void object::print ( pretty_printer * pp,
bool formatted ) const
finaloverridevirtualinherited

◆ set()

◆ set_bool()

void object::set_bool ( const char * key,
bool v )
inherited
Set value of KEY within this object to the JSON
literal true or false, based on V.   

References json::object::set().

Referenced by prepare_to_flush().

◆ set_float()

void object::set_float ( const char * key,
double v )
inherited
Set value of KEY within this object to a JSON
floating point value based on V.   

References json::object::set().

Referenced by make_json_for_timevar_time_def().

◆ set_integer()

◆ set_string()

Field Documentation

◆ m_keys

auto_vec<const char *> json::object::m_keys
privateinherited

◆ m_map

map_t json::object::m_map
privateinherited

◆ m_notifications_arr

json::array* sarif_invocation::m_notifications_arr
private

◆ m_success

bool sarif_invocation::m_success
private

The documentation for this class was generated from the following file: