| GCC Middle and Back End API Reference
    | 
#include <diagnostic-context-rich-location.h>


| Public Member Functions | |
| lazy_diagnostic_context_path (const tree_logical_location_manager &logical_loc_mgr, location_t location, gimple *stmt) | |
| std::unique_ptr< diagnostics::paths::path > | make_inner_path () const final override | 
| 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 | 
| Data Fields | |
| const tree_logical_location_manager & | m_logical_loc_mgr | 
| location_t | m_location | 
| gimple * | m_stmt | 
| Private Member Functions | |
| void | lazily_generate_path () const | 
| bool | get_first_event_in_a_function (unsigned *out_idx) const | 
| Private Attributes | |
| std::unique_ptr< path > | m_inner_path | 
A rich_location subclass that lazily populates a diagnostic_path with diagnostic context events, but only if the path is actually to be used. Copyright (C) 2025 Free Software Foundation, Inc. Contributed by Qing Zhao<qing.zhao@oracle.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
| 
 | inline | 
References diagnostics::paths::lazy_path::lazy_path(), m_location, m_logical_loc_mgr, and m_stmt.
| 
 | inlineinherited | 
References generated_p(), and m_inner_path.
Referenced by generated_p().
| 
 | finaloverridevirtualinherited | 
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().
| 
 | finaloverridevirtualinherited | 
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().
| 
 | privateinherited | 
References gcc_assert, m_inner_path, and make_inner_path().
Referenced by get_event(), get_thread(), num_events(), num_threads(), and same_function_p().
| 
 | finaloverridevirtual | 
Implemenation of the method make_inner_path of the class lazy_diagnostic_context_path.
Implements diagnostics::paths::lazy_path.
References CDI_DOMINATORS, cfun, dom_info_available_p(), ENTRY_BLOCK_PTR_FOR_FN, find_edge(), gcc_assert, get_immediate_dominator(), gimple_bb(), gimple_location(), global_dc, gsi_last_bb(), gsi_stmt(), LOCATION_LOCUS, m_location, m_logical_loc_mgr, m_stmt, NULL, diagnostics::paths::path::path(), single_pred(), single_pred_p(), stmt_ends_bb_p(), and UNKNOWN_LOCATION.
| 
 | inherited | 
| 
 | finaloverridevirtualinherited | 
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.
| 
 | finaloverridevirtualinherited | 
Implements diagnostics::paths::path.
References lazily_generate_path(), and m_inner_path.
| 
 | finaloverridevirtualinherited | 
Implements diagnostics::paths::path.
References lazily_generate_path(), and m_inner_path.
| 
 | mutableprivateinherited | 
Referenced by generated_p(), get_event(), get_thread(), lazily_generate_path(), num_events(), num_threads(), and same_function_p().
| location_t lazy_diagnostic_context_path::m_location | 
Referenced by lazy_diagnostic_context_path(), and make_inner_path().
| const tree_logical_location_manager& lazy_diagnostic_context_path::m_logical_loc_mgr | 
Referenced by lazy_diagnostic_context_path(), and make_inner_path().
| gimple* lazy_diagnostic_context_path::m_stmt | 
Referenced by lazy_diagnostic_context_path(), and make_inner_path().