GCC Middle and Back End API Reference
|
#include <simple-diagnostic-path.h>
Public Member Functions | |
simple_diagnostic_path (pretty_printer *event_pp) | |
unsigned | num_events () const final override |
const diagnostic_event & | get_event (int idx) const final override |
unsigned | num_threads () const final override |
const diagnostic_thread & | get_thread (diagnostic_thread_id_t) const final override |
bool | same_function_p (int event_idx_a, int event_idx_b) const final override |
diagnostic_thread_id_t | add_thread (const char *name) |
diagnostic_event_id_t | add_event (location_t loc, tree fndecl, int depth, const char *fmt,...) ATTRIBUTE_GCC_DIAG(5 |
diagnostic_event_id_t diagnostic_event_id_t | add_thread_event (diagnostic_thread_id_t thread_id, location_t loc, tree fndecl, int depth, const char *fmt,...) ATTRIBUTE_GCC_DIAG(6 |
diagnostic_event_id_t diagnostic_event_id_t void | connect_to_next_event () |
void | disable_event_localization () |
bool | interprocedural_p () const |
bool | multithreaded_p () 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 |
A simple implementation of diagnostic_path, as a vector of simple_diagnostic_event instances.
simple_diagnostic_path::simple_diagnostic_path | ( | pretty_printer * | event_pp | ) |
class simple_diagnostic_path : public diagnostic_path.
References add_thread().
diagnostic_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.
diagnostic_thread_id_t simple_diagnostic_path::add_thread | ( | const char * | name | ) |
References m_threads.
Referenced by simple_diagnostic_path().
diagnostic_event_id_t simple_diagnostic_path::add_thread_event | ( | diagnostic_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 m_localize_events.
|
finaloverridevirtual |
Implementation of diagnostic_path::get_event vfunc for simple_diagnostic_path: simply return the event in the vec.
Implements diagnostic_path.
References m_events.
|
privateinherited |
class diagnostic_path.
Subroutine of diagnostic_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 i.
|
finaloverridevirtual |
Implements diagnostic_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 diagnostic_event::get_stack_depth(), and i.
|
inherited |
|
finaloverridevirtual |
Implementation of diagnostic_path::num_events vfunc for simple_diagnostic_path: simply get the number of events in the vec.
Implements diagnostic_path.
References m_events.
|
finaloverridevirtual |
Implements diagnostic_path.
References m_threads.
|
finaloverridevirtual |
Implements diagnostic_path.
References m_events.
|
private |
Referenced by add_event(), and add_thread_event().
|
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(), and disable_event_localization().
|
private |
Referenced by add_thread(), get_thread(), and num_threads().