diff options
-rw-r--r-- | builtin.c | 4 | ||||
-rw-r--r-- | target.h | 4 |
2 files changed, 8 insertions, 0 deletions
@@ -391,6 +391,9 @@ static void declare_builtin(int stream, const struct builtin_fn *entry) static void declare_builtins(int stream, const struct builtin_fn tbl[]) { + if (!tbl) + return; + while (tbl->name) declare_builtin(stream, tbl++); } @@ -586,5 +589,6 @@ static const struct builtin_fn builtins_common[] = { void init_builtins(int stream) { declare_builtins(stream, builtins_common); + declare_builtins(stream, arch_target->builtins); init_linearized_builtins(stream); } @@ -54,6 +54,8 @@ extern int bits_in_enum; extern int enum_alignment; +struct builtin_fn; + struct target { enum machine mach; enum bitness bitness; @@ -71,6 +73,8 @@ struct target { const struct target *target_32bit; const struct target *target_64bit; + const struct builtin_fn *builtins; + void (*init)(const struct target *self); void (*predefine)(const struct target *self); }; |