GCC Middle and Back End API Reference
inlining_iterator Class Reference

#include <inlining-iterator.h>

Public Member Functions

 inlining_iterator (location_t loc)
 
bool done_p () const
 
void next ()
 
tree get_fndecl () const
 
location_t get_callsite () const
 
tree get_block () const
 

Private Member Functions

void prepare_iteration ()
 

Private Attributes

tree m_abstract_origin
 
location_t m_callsite
 
tree m_fndecl
 
tree m_next_abstract_origin
 

Detailed Description

Iterator for walking a chain of inlining locations.
   Copyright (C) 2022-2024 Free Software Foundation, Inc.
   Contributed by David Malcolm <dmalcolm@redhat.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/>.   
Iterator for walking a chain of inlining locations.

The fndecls and locations will be traversed from innermost to outermost.
For example, given:

 inline void inner (void)
 {
    ...LOCATION HERE...
 }
 void outer (void)
 {
    inner (); <-- CALLSITE
 }

then the fndecl will be "inner" on the initial iteration, and "outer" on
the second (final) iteration.

Compare with lhd_print_error_function, cp_print_error_function,
and optrecord_json_writer::inlining_chain_to_json.   

Constructor & Destructor Documentation

◆ inlining_iterator()

inlining_iterator::inlining_iterator ( location_t loc)
inline

References prepare_iteration().

Member Function Documentation

◆ done_p()

bool inlining_iterator::done_p ( ) const
inline

◆ get_block()

tree inlining_iterator::get_block ( ) const
inline

References m_abstract_origin.

◆ get_callsite()

location_t inlining_iterator::get_callsite ( ) const
inline

References m_callsite.

◆ get_fndecl()

tree inlining_iterator::get_fndecl ( ) const
inline

References m_fndecl.

Referenced by inlining_info::inlining_info().

◆ next()

void inlining_iterator::next ( )
inline

◆ prepare_iteration()

Field Documentation

◆ m_abstract_origin

tree inlining_iterator::m_abstract_origin
private

◆ m_callsite

location_t inlining_iterator::m_callsite
private

Referenced by get_callsite(), and prepare_iteration().

◆ m_fndecl

tree inlining_iterator::m_fndecl
private

Referenced by get_fndecl(), and prepare_iteration().

◆ m_next_abstract_origin

tree inlining_iterator::m_next_abstract_origin
private

Referenced by next(), and prepare_iteration().


The documentation for this class was generated from the following file: