GCC Middle and Back End API Reference
tree_logical_location Class Reference

#include <tree-logical-location.h>

Inheritance diagram for tree_logical_location:
Collaboration diagram for tree_logical_location:

Public Member Functions

 tree_logical_location (tree decl)
 
const char * get_short_name () const final override
 
const char * get_name_with_scope () const final override
 
const char * get_internal_name () const final override
 
enum logical_location_kind get_kind () const final override
 
label_text get_name_for_path_output () const final override
 
bool function_p () const
 

Static Protected Member Functions

static const char * get_short_name_for_tree (tree)
 
static const char * get_name_with_scope_for_tree (tree)
 
static const char * get_internal_name_for_tree (tree)
 
static enum logical_location_kind get_kind_for_tree (tree)
 
static label_text get_name_for_tree_for_path_output (tree)
 

Private Attributes

tree m_decl
 

Detailed Description

Concrete subclass of logical_location, with reference to a specific
tree.   

Constructor & Destructor Documentation

◆ tree_logical_location()

tree_logical_location::tree_logical_location ( tree decl)
inline

Member Function Documentation

◆ function_p()

◆ get_internal_name()

const char * tree_logical_location::get_internal_name ( ) const
finaloverridevirtual

◆ get_internal_name_for_tree()

const char * compiler_logical_location::get_internal_name_for_tree ( tree decl)
staticprotectedinherited
Get a string for DECL suitable for use by the SARIF logicalLocation
"decoratedName" property (SARIF v2.1.0 section 3.33.6).   

References DECL_ASSEMBLER_NAME, gcc_assert, HAS_DECL_ASSEMBLER_NAME_P, IDENTIFIER_POINTER, and NULL.

Referenced by current_fndecl_logical_location::get_internal_name(), and get_internal_name().

◆ get_kind()

enum logical_location_kind tree_logical_location::get_kind ( ) const
finaloverridevirtual

◆ get_kind_for_tree()

enum logical_location_kind compiler_logical_location::get_kind_for_tree ( tree decl)
staticprotectedinherited

◆ get_name_for_path_output()

label_text tree_logical_location::get_name_for_path_output ( ) const
finaloverridevirtual

◆ get_name_for_tree_for_path_output()

label_text compiler_logical_location::get_name_for_tree_for_path_output ( tree decl)
staticprotectedinherited

◆ get_name_with_scope()

const char * tree_logical_location::get_name_with_scope ( ) const
finaloverridevirtual

◆ get_name_with_scope_for_tree()

const char * compiler_logical_location::get_name_with_scope_for_tree ( tree decl)
staticprotectedinherited
Get a string for DECL suitable for use by the SARIF logicalLocation
"fullyQualifiedName" property (SARIF v2.1.0 section 3.33.5).   

References lang_hooks::decl_printable_name, gcc_assert, and identifier_to_locale().

Referenced by current_fndecl_logical_location::get_name_with_scope(), and get_name_with_scope().

◆ get_short_name()

const char * tree_logical_location::get_short_name ( ) const
finaloverridevirtual
class tree_logical_location : public compiler_logical_location.   
Implementation of the logical_location vfuncs, using m_decl.   

Implements logical_location.

References gcc_assert, compiler_logical_location::get_short_name_for_tree(), and m_decl.

◆ get_short_name_for_tree()

const char * compiler_logical_location::get_short_name_for_tree ( tree decl)
staticprotectedinherited
Subclasses of logical_location with knowledge of "tree".
   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/>.   
class compiler_logical_location : public logical_location.   
Get a string for DECL suitable for use by the SARIF logicalLocation
"name" property (SARIF v2.1.0 section 3.33.4).   

References lang_hooks::decl_printable_name, gcc_assert, and identifier_to_locale().

Referenced by current_fndecl_logical_location::get_short_name(), and get_short_name().

Field Documentation

◆ m_decl

tree tree_logical_location::m_decl
private

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