Index strings

This commit is contained in:
2025-02-12 20:47:47 +01:00
parent f991686330
commit 62d9398772
10 changed files with 166 additions and 76 deletions

View File

@ -45,6 +45,23 @@ namespace gcc
return is_integral_type(type) || type == elna_float_type_node;
}
bool is_array_type(tree type)
{
gcc_assert(TYPE_P(type));
return TREE_CODE(type) == ARRAY_TYPE;
}
bool is_procedure_type(tree type)
{
gcc_assert(TYPE_P(type));
return TREE_CODE(type) == FUNCTION_TYPE;
}
bool is_void_type(tree type)
{
return type == NULL_TREE || type == void_type_node;
}
bool are_compatible_pointers(tree lhs, tree rhs)
{
tree lhs_type = TREE_TYPE(lhs);
@ -149,7 +166,7 @@ namespace gcc
return fold_build2(POINTER_DIFF_EXPR, ssizetype, left, right);
}
}
return error_mark_node;
gcc_unreachable();
}
tree build_binary_operation(bool condition, boot::binary_expression *expression,