From f3a556d9071c30f1848a4ffb1f5f2ada5a32c7d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=B6tz=20Lindenmaier?= Date: Thu, 20 Nov 2003 14:23:34 +0000 Subject: [PATCH] save name of compiled file in irprog. [r2067] --- ir/ir/irprog.c | 15 ++++++++++++++- ir/ir/irprog.h | 4 ++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ir/ir/irprog.c b/ir/ir/irprog.c index 53759f4b5..6a891afa1 100644 --- a/ir/ir/irprog.c +++ b/ir/ir/irprog.c @@ -57,6 +57,7 @@ ir_prog *new_ir_prog (void) { /* res->obst = (struct obstack *) xmalloc (sizeof (struct obstack)); */ res->graphs = NEW_ARR_F (ir_graph *, 1); res->types = NEW_ARR_F (type *, 1); + res->name = NULL; #ifdef DEBUG_libfirm res->max_node_nr = 0; @@ -174,7 +175,19 @@ int get_irp_new_node_nr() { } #endif -ir_graph *get_const_code_irg() +/** File name / executable name or the like **/ +void set_irp_prog_name(ident *name) { + irp->name = name; +} +ident *get_irp_prog_ident(void) { + return irp->name; +} +const char *get_irp_prog_name(void) { + return get_id_str(irp->name); +} + + +ir_graph *get_const_code_irg(void) { return irp->const_code_irg; } diff --git a/ir/ir/irprog.h b/ir/ir/irprog.h index 23ac06936..08c829b41 100644 --- a/ir/ir/irprog.h +++ b/ir/ir/irprog.h @@ -117,6 +117,10 @@ void set_irp_type(int pos, type *typ); /** Returns the "global" type of the irp. */ type *get_glob_type(void); +/** File name / executable name or the like. Initially NULL! **/ +void set_irp_prog_name (ident *name); +ident *get_irp_prog_ident(void); +const char *get_irp_prog_name (void); /** * Returns an irgraph that only contains constant -- 2.20.1