aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-03-09 13:11:57 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-03-09 13:11:57 -0500
commit0921f3723bf7fe7539aa7a5dfdbd921f445777af (patch)
tree8908988b412f30545af20f2ec4879091bcdf7667 /types.c
parentb33aa8c11f6a35428a91095d5e0a902174ce7cf5 (diff)
Remove dead code
Diffstat (limited to 'types.c')
-rw-r--r--types.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/types.c b/types.c
index 47c0103f..e1f3026d 100644
--- a/types.c
+++ b/types.c
@@ -187,29 +187,6 @@ precision_cmp_e compare_precision(type_t *a, type_t *b)
else return NUM_PRECISION_INCOMPARABLE;
}
-bool is_orderable(type_t *t)
-{
- switch (t->tag) {
- case ArrayType: return is_orderable(Match(t, ArrayType)->item_type);
- case PointerType: case FunctionType: case TableType: return false;
- case StructType: {
- for (arg_t *field = Match(t, StructType)->fields; field; field = field->next) {
- if (!is_orderable(field->type))
- return false;
- }
- return true;
- }
- case EnumType: {
- for (tag_t *tag = Match(t, EnumType)->tags; tag; tag = tag->next) {
- if (tag->type && !is_orderable(tag->type))
- return false;
- }
- return true;
- }
- default: return true;
- }
-}
-
bool has_heap_memory(type_t *t)
{
switch (t->tag) {