Implement pointers

This commit is contained in:
2025-01-10 23:17:18 +01:00
parent 954425f4bd
commit 35c32fcf3f
15 changed files with 131 additions and 915 deletions

View File

@ -16,10 +16,15 @@ namespace gcc
TYPE_STRING_FLAG(elna_char_type_node) = 1;
}
bool is_string_type(tree type)
bool is_pointer_type(tree type)
{
gcc_assert(TYPE_P(type));
return TREE_CODE(type) == POINTER_TYPE
return TREE_CODE(type) == POINTER_TYPE;
}
bool is_string_type(tree type)
{
return is_pointer_type(type)
&& TYPE_MAIN_VARIANT(TREE_TYPE(type)) == char_type_node;
}