Move byte for unyped pointers
This commit is contained in:
@ -32,7 +32,7 @@ namespace gcc
|
||||
{
|
||||
return "Float";
|
||||
}
|
||||
else if (type == elna_char_type_node)
|
||||
else if (type == unsigned_char_type_node)
|
||||
{
|
||||
return "Char";
|
||||
}
|
||||
|
@ -246,7 +246,9 @@ namespace gcc
|
||||
|
||||
void generic_visitor::visit(boot::number_literal<unsigned char> *character)
|
||||
{
|
||||
this->current_expression = build_int_cstu(elna_char_type_node, character->number());
|
||||
auto symbol = this->symbol_map->lookup("Char");
|
||||
|
||||
this->current_expression = build_int_cstu(symbol->payload, character->number());
|
||||
}
|
||||
|
||||
void generic_visitor::visit(boot::number_literal<nullptr_t> *)
|
||||
|
@ -10,10 +10,8 @@ namespace gcc
|
||||
{
|
||||
void init_ttree()
|
||||
{
|
||||
elna_char_type_node = make_unsigned_type(8);
|
||||
elna_string_type_node = build_pointer_type(
|
||||
build_qualified_type(char_type_node, TYPE_QUAL_CONST)); /* const char* */
|
||||
TYPE_STRING_FLAG(elna_char_type_node) = 1;
|
||||
}
|
||||
|
||||
bool is_pointer_type(tree type)
|
||||
@ -77,7 +75,8 @@ namespace gcc
|
||||
initial_table->enter("Word", boot::make_info(size_type_node));
|
||||
initial_table->enter("Bool", boot::make_info(boolean_type_node));
|
||||
initial_table->enter("Float", boot::make_info(double_type_node));
|
||||
initial_table->enter("Char", boot::make_info(elna_char_type_node));
|
||||
initial_table->enter("Char", boot::make_info(unsigned_char_type_node));
|
||||
initial_table->enter("Byte", boot::make_info(make_unsigned_type(8)));
|
||||
initial_table->enter("String", boot::make_info(elna_string_type_node));
|
||||
|
||||
return initial_table;
|
||||
|
Reference in New Issue
Block a user