| GCC Middle and Back End API Reference
    | 
#include <simple-diagnostic-path.h>


| Public Types | |
| using | thread = diagnostics::paths::thread | 
| using | thread_id_t = diagnostics::paths::thread_id_t | 
| using | event = diagnostics::paths::event | 
| using | event_id_t = diagnostics::paths::event_id_t | 
| Public Member Functions | |
| simple_diagnostic_path (const tree_logical_location_manager &logical_loc_mgr, pretty_printer *event_pp) | |
| unsigned | num_events () const final override | 
| const event & | get_event (int idx) const final override | 
| unsigned | num_threads () const final override | 
| const thread & | get_thread (thread_id_t) const final override | 
| bool | same_function_p (int event_idx_a, int event_idx_b) const final override | 
| thread_id_t | add_thread (const char *name) | 
| event_id_t | add_event (location_t loc, tree fndecl, int depth, const char *fmt,...) ATTRIBUTE_GCC_DIAG(5 | 
| event_id_t event_id_t | add_thread_event (thread_id_t thread_id, location_t loc, tree fndecl, int depth, const char *fmt,...) ATTRIBUTE_GCC_DIAG(6 | 
| event_id_t event_id_t void | connect_to_next_event () | 
| void | disable_event_localization () | 
| bool | interprocedural_p () const | 
| bool | multithreaded_p () const | 
| const logical_locations::manager & | get_logical_location_manager () const | 
| Private Member Functions | |
| bool | get_first_event_in_a_function (unsigned *out_idx) const | 
| Private Attributes | |
| auto_delete_vec< simple_diagnostic_thread > | m_threads | 
| auto_delete_vec< simple_diagnostic_event > | m_events | 
| pretty_printer * | m_event_pp | 
| bool | m_localize_events | 
| const logical_locations::manager & | m_logical_loc_mgr | 
A simple implementation of diagnostic_path, as a vector of simple_diagnostic_event instances.
| simple_diagnostic_path::simple_diagnostic_path | ( | const tree_logical_location_manager & | logical_loc_mgr, | 
| pretty_printer * | event_pp ) | 
class simple_diagnostic_path : public diagnostics::paths::path.
References add_thread(), m_event_pp, m_localize_events, diagnostics::paths::path::path(), and true.
| event_id_t simple_diagnostic_path::add_event | ( | location_t | loc, | 
| tree | fndecl, | ||
| int | depth, | ||
| const char * | fmt, | ||
| ... ) | 
Add an event to this path at LOC within function FNDECL at stack depth DEPTH. Use m_context's printer to format FMT, as the text of the new event. Localize FMT iff m_localize_events is set. Return the id of the new event.
References _, ap, line_table, m_event_pp, m_events, m_localize_events, pp_clear_output_area(), pp_format(), pp_formatted_text(), pp_output_formatted_text(), and UNKNOWN_LOCATION.
| thread_id_t simple_diagnostic_path::add_thread | ( | const char * | name | ) | 
References m_threads.
Referenced by simple_diagnostic_path().
| event_id_t simple_diagnostic_path::add_thread_event | ( | thread_id_t | thread_id, | 
| location_t | loc, | ||
| tree | fndecl, | ||
| int | depth, | ||
| const char * | fmt, | ||
| ... ) | 
References _, ap, line_table, m_event_pp, m_events, pp_clear_output_area(), pp_format(), pp_formatted_text(), pp_output_formatted_text(), and UNKNOWN_LOCATION.
| void simple_diagnostic_path::connect_to_next_event | ( | ) | 
Mark the most recent event on this path (which must exist) as being connected to the next one to be added.
References gcc_assert, and m_events.
| 
 | inline | 
References disable_event_localization(), and m_localize_events.
Referenced by disable_event_localization().
| 
 | finaloverridevirtual | 
Implementation of path::get_event vfunc for simple_diagnostic_path: simply return the event in the vec.
Implements diagnostics::paths::path.
References m_events.
| 
 | privateinherited | 
class diagnostics::paths::path.
Subroutine of path::interprocedural_p. Look for the first event in this path that is within a function i.e. has a non-null logical location for which function_p is true. If found, write its index to *OUT_IDX and return true. Otherwise return false.
References get_event(), diagnostics::paths::event::get_logical_location(), i, m_logical_loc_mgr, and num_events().
Referenced by interprocedural_p().
| 
 | inlineinherited | 
References m_logical_loc_mgr.
Referenced by diagnostics::text_sink::print_path().
| 
 | finaloverridevirtual | 
Implements diagnostics::paths::path.
References m_threads.
| 
 | inherited | 
Return true if the events in this path involve more than one function, or false if it is purely intraprocedural.
References get_event(), get_first_event_in_a_function(), diagnostics::paths::event::get_stack_depth(), i, num_events(), and same_function_p().
| 
 | inherited | 
| 
 | inlinefinaloverridevirtual | 
Implements diagnostics::paths::path.
| 
 | inlinefinaloverridevirtual | 
Implements diagnostics::paths::path.
| 
 | finaloverridevirtual | 
Implements diagnostics::paths::path.
References m_events.
| 
 | private | 
Referenced by add_event(), add_thread_event(), and simple_diagnostic_path().
| 
 | private | 
Referenced by add_event(), add_thread_event(), connect_to_next_event(), get_event(), num_events(), and same_function_p().
| 
 | private | 
Referenced by add_event(), disable_event_localization(), and simple_diagnostic_path().
| 
 | privateinherited | 
Referenced by get_first_event_in_a_function(), get_logical_location_manager(), and path().
| 
 | private | 
Referenced by add_thread(), get_thread(), and num_threads().