21#ifndef GCC_SELFTEST_DIAGNOSTIC_PATH_H
22#define GCC_SELFTEST_DIAGNOSTIC_PATH_H
41class test_diagnostic_event :
public diagnostic_event
44 test_diagnostic_event (location_t loc,
49 ~test_diagnostic_event ();
52 int get_stack_depth () const
final override {
return m_depth; }
53 void print_desc (pretty_printer &pp)
const final override
61 meaning get_meaning () const
final override
65 bool connect_to_next_event_p () const
final override
67 return m_connected_to_next_event;
74 void connect_to_next_event ()
76 m_connected_to_next_event =
true;
84 bool m_connected_to_next_event;
90class test_diagnostic_thread :
public diagnostic_thread
93 test_diagnostic_thread (
const char *name) : m_name (name) {}
94 label_text
get_name (
bool)
const final override
96 return label_text::borrow (m_name);
109class test_diagnostic_path :
public diagnostic_path
112 test_diagnostic_path (pretty_printer *event_pp);
114 unsigned num_events () const
final override;
115 const diagnostic_event & get_event (
int idx) const
final override;
116 unsigned num_threads () const
final override;
117 const diagnostic_thread &
120 same_function_p (
int event_idx_a,
121 int event_idx_b) const
final override;
125 diagnostic_event_id_t add_event (location_t loc, const
char *funcname,
int depth,
126 const
char *fmt, ...)
128 diagnostic_event_id_t
130 location_t loc, const
char *funcname,
int depth,
131 const
char *fmt, ...)
134 void connect_to_next_event ();
136 void add_entry (const
char *callee_name,
int stack_depth,
138 void add_return (const
char *caller_name,
int stack_depth,
140 void add_call (const
char *caller_name,
141 int caller_stack_depth,
142 const
char *callee_name,
147 logical_location_from_funcname (const
char *funcname);
149 test_logical_location_manager m_test_logical_loc_mgr;
150 auto_delete_vec<test_diagnostic_thread> m_threads;
151 auto_delete_vec<test_diagnostic_event> m_events;
154 pretty_printer *m_event_pp;
#define ATTRIBUTE_GCC_DIAG(m, n)
Definition diagnostic-core.h:103
int diagnostic_thread_id_t
Definition diagnostic-event-id.h:70
void final(rtx_insn *first, FILE *file, int optimize_p)
Definition final.cc:2008
static location_t get_location(const gimple *stmt)
Definition gimple-ssa-warn-access.cc:78
logical_location_manager::key logical_location
Definition logical-location.h:173
Definition dump-context.h:31
void pp_string(pretty_printer *pp, const char *str)
Definition pretty-print.cc:2650
const char * get_name(tree t)
Definition tree.cc:11897