Set variable declaration context

This commit is contained in:
2025-01-04 20:24:34 +01:00
parent a7b0c53d23
commit 98c13f0be3
4 changed files with 103 additions and 12 deletions

View File

@ -22,5 +22,45 @@ namespace gcc
return TREE_CODE(type) == POINTER_TYPE
&& TYPE_MAIN_VARIANT(TREE_TYPE(type)) == char_type_node;
}
tree tree_chain_base::head()
{
return first;
}
void tree_chain_base::append(tree t)
{
gcc_assert(t != NULL_TREE);
if (this->first == NULL_TREE)
{
this->first = this->last = t;
}
else
{
chain(t);
this->last = t;
}
}
void tree_chain::chain(tree t)
{
TREE_CHAIN(this->last) = t;
}
tree_symbol_mapping::tree_symbol_mapping(tree bind_expression, tree block)
: m_bind_expression(bind_expression), m_block(block)
{
}
tree tree_symbol_mapping::bind_expression()
{
return m_bind_expression;
}
tree tree_symbol_mapping::block()
{
return m_block;
}
}
}