PandA-2024.02
Public Types | Public Member Functions | Data Fields
constructor Struct Reference

Constructor: return an aggregate value made from specified components. More...

#include <tree_node.hpp>

Inheritance diagram for constructor:
Inheritance graph
[legend]
Collaboration diagram for constructor:
Collaboration graph
[legend]

Public Types

enum  { GETID =(tree_node) = 0, GETID =(tree_node) = 0 }
 visitor enum More...
 

Public Member Functions

 constructor (unsigned int i)
 constructor More...
 
void add_idx_valu (const tree_nodeRef &idx, const tree_nodeRef &valu)
 Add a pair <index value>=""> to the list of idx_val. More...
 
void add_valu (const tree_nodeRef &valu)
 Add a pair <null, value> to the list of idx_val. More...
 
void visit (tree_node_visitor *const v) const override
 Redefinition of get_kind_text. More...
 
- Public Member Functions inherited from tree_node
 tree_node (unsigned int i)
 Constructor. More...
 
virtual ~tree_node ()=default
 Destructor. More...
 
virtual enum kind get_kind () const =0
 Virtual function returning the type of the actual class. More...
 
virtual std::string get_kind_text () const =0
 Virtual function returning the name of the actual class. More...
 
std::string ToString () const
 Print this node as string in gimple format. More...
 

Data Fields

tree_nodeRef type
 type field is the type of the node More...
 
std::vector< std::pair< tree_nodeRef, tree_nodeRef > > list_of_idx_valu
 store the list initializers: <index, value> More...
 
- Data Fields inherited from tree_node
const unsigned int index
 Represent the index read from the raw file and the index-1 of the vector of tree_node associated to the functions vector present in the tree_manager. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from tree_node
static enum kind get_kind (const std::string &name)
 Given a string, return the corresponding kind. More...
 
static std::string GetString (const enum kind k)
 Given a kind, return the corresponding string. More...
 

Detailed Description

Constructor: return an aggregate value made from specified components.

In C, this is used only for structure and array initializers. The operand is a sequence of component values made out of a VEC of struct constructor_elt.

For ARRAY_TYPE: The field INDEX of each constructor_elt is the corresponding index. If the index is a RANGE_EXPR, it is a short-hand for many nodes, one for each index in the range. (If the corresponding field VALUE has side-effects, they are evaluated once for each element. Wrap the value in a SAVE_EXPR if you want to evaluate side effects only once.)

For RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE: The field INDEX of each node is a FIELD_DECL.

Definition at line 2434 of file tree_node.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

visitor enum

Enumerator
GETID 
GETID 

Definition at line 2479 of file tree_node.hpp.

Constructor & Destructor Documentation

◆ constructor()

constructor::constructor ( unsigned int  i)
inlineexplicit

constructor

Definition at line 2437 of file tree_node.hpp.

Member Function Documentation

◆ add_idx_valu()

void constructor::add_idx_valu ( const tree_nodeRef idx,
const tree_nodeRef valu 
)
inline

Add a pair <index value>=""> to the list of idx_val.

Parameters
idxis the index.
valis the value.

Definition at line 2452 of file tree_node.hpp.

◆ add_valu()

void constructor::add_valu ( const tree_nodeRef valu)
inline

Add a pair <null, value> to the list of idx_val.

Parameters
valis the value.

Definition at line 2461 of file tree_node.hpp.

References GET_KIND, and GET_KIND_TEXT.

◆ visit()

void constructor::visit ( tree_node_visitor *const  v) const
overridevirtual

Redefinition of get_kind_text.

Redefinition of get_kind. virtual function used to traverse the tree_node data structure.

Parameters
vis a reference to the tree_node visitor class

Reimplemented from tree_node.

Definition at line 683 of file tree_node.cpp.

References ALL_VISIT, test_panda::type, gimple_call::visit(), VISIT_MEMBER, and VISIT_MEMBER_NAMED.

Here is the call graph for this function:

Field Documentation

◆ list_of_idx_valu

std::vector<std::pair<tree_nodeRef, tree_nodeRef> > constructor::list_of_idx_valu

store the list initializers: <index, value>

Definition at line 2445 of file tree_node.hpp.

Referenced by hls_div_cg_ext::recursive_examinate(), VarDeclFix::recursive_examinate(), and raw_writer::write_when_not_null_point_to().

◆ type

tree_nodeRef constructor::type

type field is the type of the node

Definition at line 2442 of file tree_node.hpp.

Referenced by raw_writer::write_when_not_null_point_to().


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

Generated on Mon Feb 12 2024 13:03:48 for PandA-2024.02 by doxygen 1.8.13