Use -> arrow for the return types

This commit is contained in:
2025-02-12 13:32:59 +01:00
parent cd949c4be7
commit f991686330
7 changed files with 60 additions and 46 deletions

View File

@ -30,10 +30,15 @@ namespace gcc
elna_int_type_node = long_integer_type_node;
elna_word_type_node = size_type_node;
elna_char_type_node = unsigned_char_type_node;
elna_bool_type_node = boolean_type_node;
elna_byte_type_node = make_unsigned_type(8);
elna_float_type_node = double_type_node;
elna_bool_type_node = boolean_type_node;
elna_bool_true_node = boolean_true_node;
elna_bool_false_node = boolean_false_node;
elna_pointer_nil_node = null_pointer_node;
elna_string_type_node = make_node(RECORD_TYPE);
tree string_ptr_type = build_pointer_type_for_mode(elna_char_type_node, VOIDmode, true);
tree record_chain = NULL_TREE;

View File

@ -323,7 +323,7 @@ namespace gcc
void generic_visitor::visit(boot::number_literal<bool> *boolean)
{
this->current_expression = build_int_cst_type(elna_bool_type_node, boolean->number());
this->current_expression = boolean->number() ? boolean_true_node : boolean_false_node;
}
void generic_visitor::visit(boot::number_literal<unsigned char> *character)
@ -333,7 +333,7 @@ namespace gcc
void generic_visitor::visit(boot::number_literal<nullptr_t> *)
{
this->current_expression = null_pointer_node;
this->current_expression = elna_pointer_nil_node;
}
void generic_visitor::visit(boot::number_literal<std::string> *string)

View File

@ -50,7 +50,7 @@ namespace gcc
tree lhs_type = TREE_TYPE(lhs);
tree rhs_type = TREE_TYPE(rhs);
return (is_pointer_type(lhs_type) && rhs == null_pointer_node)
return (is_pointer_type(lhs_type) && rhs == elna_pointer_nil_node)
|| (is_pointer_type(lhs_type) && lhs_type == rhs_type);
}