mie: add null IR value

This commit is contained in:
2025-09-08 15:33:25 +01:00
parent 2ff85a7505
commit dd0dcc9c0a
4 changed files with 28 additions and 2 deletions

View File

@@ -2,6 +2,10 @@
#include <mie/ir/value.h>
#include <stdlib.h>
const struct mie_value_type null_value_type = {
.t_id = MIE_VALUE_NONE,
};
extern const struct mie_value_type module_value_type;
extern const struct mie_value_type record_value_type;
extern const struct mie_value_type func_value_type;
@@ -12,7 +16,7 @@ extern const struct mie_value_type const_value_type;
extern const struct mie_value_type data_value_type;
static const struct mie_value_type *value_types[] = {
[MIE_VALUE_NONE] = NULL,
[MIE_VALUE_NONE] = &null_value_type,
[MIE_VALUE_MODULE] = &module_value_type,
[MIE_VALUE_RECORD] = &record_value_type,
[MIE_VALUE_FUNC] = &func_value_type,