case TYPE_POINTER:
hash = hash_pointer_type((const pointer_type_t*) type);
break;
+ case TYPE_BUILTIN:
+ hash = hash_ptr(((const builtin_type_t*) type)->symbol);
+ break;
}
unsigned some_prime = 99991;
return type1->symbol == type2->symbol;
}
+static
+int builtin_types_equal(const builtin_type_t *type1,
+ const builtin_type_t *type2)
+{
+ return type1->symbol == type2->symbol;
+}
+
static
int types_equal(const type_t *type1, const type_t *type2)
{
case TYPE_POINTER:
return pointer_types_equal((const pointer_type_t*) type1,
(const pointer_type_t*) type2);
+ case TYPE_BUILTIN:
+ return builtin_types_equal((const builtin_type_t*) type1,
+ (const builtin_type_t*) type2);
}
abort();