Local_Normal_Binding_Container_Variable

class Local_Normal_Binding_Container_Variable (concrete, logical)

C++17 structured binding: compiler-generated variable for the container

Implemented interfaces:
Direct parents:
Ancestor classes and implemented interfaces:

Binding_Container_Interface, Declarative_Node, General_Object_Interface, Initialization_Start_End_Interface, Local_Normal_Variable, Local_Variable, Logical_IR_Root, Named_Entity, Nonmember_Variable, Object, Primary_Link_Object_Interface, Stack_Object, Symbol, Template_Base_Interface, Typed_Object, Variable

Field

Kind

Type

Description

Initialization (from Variable)

semantic

class Instruction

If there is either:

  1. A single instruction that uses a Direct_Full_Write_Operand to initialize the variable, or

  2. A Direct_Call_Instruction calling a constructor that fully initializes the variable

then the Initialization edge will point to that instruction. Otherwise, it will be null.

Because constructors return type void, the two cases can be distinguished by checking whether Initialization.Left is NoNode.

Note that the variable can still be modified after it is initialized. Only when (!has_definition && !address_taken), it is guaranteed that the variable’s value is equal to that computed by the Initialization instruction.

Its_Type (from Typed_Object)

semantic

class Type

the normalized, ‘underlying’ type

Object_Flags (from Typed_Object)

attribute

bitfield Object_Flags_Type

bits like “address taken” and “is pointer”

Parent (from Logical_IR_Root)

semantic

class Logical_IR_Root

Physical (from Logical_IR_Root)

semantic to physical

class Physical_IR_Root

Bindings (from Binding_Container_Interface)

semantic

list of class Binding_Variable_Interface

Base_Template (from Template_Base_Interface)

semantic

class Symbol

usually, a Template_Interface, but could also be a normal method/nested class inside a template

Template_Arguments (from Template_Base_Interface)

syntactic

list of class Template_Argument

Is_Partial_Specialization (from Template_Base_Interface)

attribute

builtin Boolean

Is_Full_Specialization (from Template_Base_Interface)

attribute

builtin Boolean

Is_Template_Instance (from Template_Base_Interface)

attribute

builtin Boolean

Link_Flags (from Primary_Link_Object_Interface)

attribute

bitfield Link_Flags_Type

Component (from Primary_Link_Object_Interface)

attribute

builtin String

for local-to-library elements: name of DLL/.so when linked (sealed) for unit-local constexpr variables: name of file

Initialization_Start (from Initialization_Start_End_Interface)

semantic

class Execution_Node

Start of the variable’s initialization. If set to an instruction, that instruction is part of the variable’s initialization. If set to a block, the variable’s initialization begins with the tail jump of that block, but does not include the block’s code. Use is_part_of_variable_initialization() to determine if an instruction is between Initialization_Start and Initialization_End.

Initialization_End (from Initialization_Start_End_Interface)

semantic

class Execution_Node

If set to an instruction, it is the first instruction after those responsible for the variable’s initialization. If set to a block, the initialization includes all instructions in that block but not the block’s tail jump. In other words: A block is used to refer to the “instruction-after-last” in that block; all instructions between Initialization_Start (inclusive) to Initialization_End (exclusive) belong to the variable’s initializer. If Initialization_Start==Initialization_End, then the variable has no initializer.

Name (from Named_Entity)

attribute

builtin String