From 4db6e89a662ecb5f3a30cac95d758a3059af24b0 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 6 Apr 2010 14:45:11 +0000 Subject: [PATCH] error out when compiling multiple source files to firm graphs - this is not supported currently [r27349] --- main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.c b/main.c index 93b4dbe..2d1cd9c 100644 --- a/main.c +++ b/main.c @@ -1273,6 +1273,7 @@ int main(int argc, char **argv) } file_list_entry_t *file; + bool already_constructed_firm = false; for (file = files; file != NULL; file = file->next) { char asm_tempfile[1024]; const char *filename = file->name; @@ -1435,7 +1436,11 @@ do_parsing: ir_timer_t *t_construct = ir_timer_new(); timer_register(t_construct, "Frontend: Graph construction"); timer_push(t_construct); + if (already_constructed_firm) { + panic("compiling multiple files/translation units not possible"); + } translation_unit_to_firm(unit); + already_constructed_firm = true; timer_pop(t_construct); graph_built: -- 2.20.1