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

struct definition of the type node structures. More...

#include <tree_node.hpp>

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

Public Types

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

Public Member Functions

 type_node (unsigned int i)
 constructor More...
 
void visit (tree_node_visitor *const v) const override
 virtual function used to traverse the tree_node data structure. 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

TreeVocabularyTokenTypes_TokenEnum qual
 qual is the set of type qualifiers for this type. More...
 
tree_nodeRef name
 name field contains info on the name used in the program for this type.It is either a TYPE_DECL node, for types that are typedefs, or an IDENTIFIER_NODE in the case of structs, unions or enums that are known with a tag, or zero for types that have no special name. More...
 
tree_nodeRef unql
 unql field, in any member of such a chain, points to the start of the chain. More...
 
tree_nodeRef size
 size field contains a tree that is an expression for the size in bits. More...
 
tree_nodeRef scpe
 context/scope of the type object. More...
 
unsigned int algn
 algn field is the alignment necessary for objects of this type. More...
 
bool packed_flag
 Indicated that objects of this type should be laid out in as compact a way as possible. More...
 
bool system_flag
 system flag: it's true when this is a system variable More...
 
bool libbambu_flag
 it is true when this is a declared inside libbambu 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

struct definition of the type node structures.

struct definition of the field type_node. The tree walker structure of this field is: (qual)? (name)? (unql)? (size)? (scpe)? (algn)?

Definition at line 1318 of file tree_node.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

visitor enum

Enumerator
GETID 
GETID 
GETID 
GETID 

Definition at line 1380 of file tree_node.hpp.

Constructor & Destructor Documentation

◆ type_node()

type_node::type_node ( unsigned int  i)
explicit

constructor

Definition at line 394 of file tree_node.cpp.

Member Function Documentation

◆ visit()

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

virtual function used to traverse the tree_node data structure.

Parameters
vis a reference to the tree_node visitor class

Reimplemented from tree_node.

Reimplemented in vector_type, union_type, type_argument_pack, reference_type, record_type, real_type, pointer_type, method_type, integer_type, function_type, enumeral_type, complex_type, type_pack_expansion, and array_type.

Definition at line 404 of file tree_node.cpp.

References ALL_VISIT, name, scpe, size, unql, VISIT_MEMBER, and VISIT_SC.

Referenced by memory_tag::visit(), cst_node::visit(), error_mark::visit(), array_type::visit(), gimple_asm::visit(), baselink::visit(), gimple_bind::visit(), binfo::visit(), and block::visit().

Here is the caller graph for this function:

Field Documentation

◆ algn

unsigned int type_node::algn

algn field is the alignment necessary for objects of this type.

The value is an int, measured in bits. (macro TYPE_ALIGN)

Definition at line 1362 of file tree_node.hpp.

Referenced by GimpleWriter::GimpleWriter(), and raw_writer::write_when_not_null_point_to().

◆ libbambu_flag

bool type_node::libbambu_flag

it is true when this is a declared inside libbambu

Definition at line 1371 of file tree_node.hpp.

Referenced by raw_writer::write_when_not_null_point_to().

◆ name

tree_nodeRef type_node::name

name field contains info on the name used in the program for this type.It is either a TYPE_DECL node, for types that are typedefs, or an IDENTIFIER_NODE in the case of structs, unions or enums that are known with a tag, or zero for types that have no special name.

(macro TYPE_NAME)

Definition at line 1337 of file tree_node.hpp.

Referenced by GimpleWriter::GimpleWriter(), visit(), and raw_writer::write_when_not_null_point_to().

◆ packed_flag

bool type_node::packed_flag

Indicated that objects of this type should be laid out in as compact a way as possible.

Definition at line 1365 of file tree_node.hpp.

Referenced by raw_writer::write_when_not_null_point_to().

◆ qual

qual is the set of type qualifiers for this type.

here is represented as token type: (TOK_QUAL_R | TOK_QUAL_V | TOK_QUAL_VR | TOK_QUAL_C | TOK_QUAL_CR | TOK_QUAL_CV | TOK_QUAL_CVR ) (macro: TYPE_QUAL_CONST, TYPE_QUAL_VOLATILE, TYPE_QUAL_RESTRICT)

Definition at line 1328 of file tree_node.hpp.

Referenced by GimpleWriter::GimpleWriter(), and raw_writer::write_when_not_null_point_to().

◆ scpe

tree_nodeRef type_node::scpe

context/scope of the type object.

(macro TYPE_CONTEXT)

Definition at line 1355 of file tree_node.hpp.

Referenced by visit(), and raw_writer::write_when_not_null_point_to().

◆ size

tree_nodeRef type_node::size

size field contains a tree that is an expression for the size in bits.

(macro TYPE_SIZE)

Definition at line 1349 of file tree_node.hpp.

Referenced by GimpleWriter::GimpleWriter(), visit(), and raw_writer::write_when_not_null_point_to().

◆ system_flag

bool type_node::system_flag

system flag: it's true when this is a system variable

Definition at line 1368 of file tree_node.hpp.

Referenced by raw_writer::write_when_not_null_point_to().

◆ unql

tree_nodeRef type_node::unql

unql field, in any member of such a chain, points to the start of the chain.

(macro TYPE_MAIN_VARIANT)

Definition at line 1343 of file tree_node.hpp.

Referenced by GimpleWriter::GimpleWriter(), visit(), and 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:04:09 for PandA-2024.02 by doxygen 1.8.13