GCC Middle and Back End API Reference
|
#include <lazy-paths.h>
Public Member Functions | |
virtual | ~lazy_path () |
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 |
bool | generated_p () const |
bool | interprocedural_p () const |
bool | multithreaded_p () const |
const logical_locations::manager & | get_logical_location_manager () const |
Protected Member Functions | |
lazy_path (const logical_locations::manager &logical_loc_mgr) |
Private Member Functions | |
void | lazily_generate_path () const |
virtual std::unique_ptr< path > | make_inner_path () const =0 |
bool | get_first_event_in_a_function (unsigned *out_idx) const |
Private Attributes | |
std::unique_ptr< path > | m_inner_path |
const logical_locations::manager & | m_logical_loc_mgr |
An implementation of diagnostics::paths::path which has a trivial ctor and lazily creates another path the first time the path is queried, deferring to this inner path for all queries. Use this to avoid expensive path creation logic when creating rich_location instances, so that expense can be deferred until the path is actually used by a diagnostic, and thus avoided for warnings that are disabled.
|
inlinevirtual |
|
inlineprotected |
References diagnostics::paths::path::path().
Referenced by lazy_diagnostic_context_path::lazy_diagnostic_context_path().
|
inline |
References generated_p(), and m_inner_path.
Referenced by generated_p().
|
finaloverridevirtual |
Implements diagnostics::paths::path.
References lazily_generate_path(), and m_inner_path.
|
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 lazily_generate_path(), and m_inner_path.
|
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().
|
private |
References gcc_assert, m_inner_path, and make_inner_path().
Referenced by get_event(), get_thread(), num_events(), num_threads(), and same_function_p().
|
privatepure virtual |
Implemented in lazy_diagnostic_context_path.
Referenced by lazily_generate_path().
|
inherited |
|
finaloverridevirtual |
class lazy_path : public path.
Implementation of path vfuncs in terms of a lazily-generated path.
Implements diagnostics::paths::path.
References lazily_generate_path(), and m_inner_path.
|
finaloverridevirtual |
Implements diagnostics::paths::path.
References lazily_generate_path(), and m_inner_path.
|
finaloverridevirtual |
Implements diagnostics::paths::path.
References lazily_generate_path(), and m_inner_path.
|
mutableprivate |
Referenced by generated_p(), get_event(), get_thread(), lazily_generate_path(), num_events(), num_threads(), and same_function_p().
|
privateinherited |
Referenced by get_first_event_in_a_function(), get_logical_location_manager(), and path().