# include "typegmod.h"
#define GLOBAL_TYPE_NAME "GlobalType"
+#define INITAL_PROG_NAME "no_name_set"
/* A variable from where everything in the ir can be accessed. */
ir_prog *irp;
/* res->obst = (struct obstack *) xmalloc (sizeof (struct obstack)); */
res->graphs = NEW_ARR_F (ir_graph *, 0);
res->types = NEW_ARR_F (type *, 0);
- res->name = new_id_from_str("no_name_set");
+ res->name = new_id_from_str(INITAL_PROG_NAME);
#ifdef DEBUG_libfirm
res->max_node_nr = 0;
#endif
- res->glob_type = new_type_class(id_from_str (GLOBAL_TYPE_NAME,
- strlen(GLOBAL_TYPE_NAME)));
+ res->glob_type = new_type_class(new_id_from_str (GLOBAL_TYPE_NAME));
/* Remove type from type list. Must be treated differently than
other types. */
remove_irp_type_from_list(res->glob_type);
res->const_code_irg = new_const_code_irg();
- res->outs_state = no_outs;
+ res->outs_state = outs_none;
res->ip_outedges = NULL;
return res;
void set_irp_irg(int pos, ir_graph *irg) {
assert (irp && irg);
assert (pos < (ARR_LEN((irp)->graphs)));
- /* Strangely the first element of the array is NULL. Why?? */
irp->graphs[pos] = irg;
}
void set_irp_type(int pos, type *typ) {
assert (irp && typ);
assert (pos < (ARR_LEN((irp)->types)));
- /* Strangely the first element of the array is NULL. Why?? */
irp->types[pos] = typ;
}
void set_irp_prog_name(ident *name) {
irp->name = name;
}
+int irp_prog_name_is_set(void) {
+ return irp->name != new_id_from_str(INITAL_PROG_NAME);
+}
ident *get_irp_prog_ident(void) {
return irp->name;
}
{
return(irp -> ip_outedges);
}
+
+
+irg_callee_info_state get_irp_callee_info_state(void) {
+ return irp->callee_info_state;
+}
+
+void set_irp_callee_info_state(irg_callee_info_state s) {
+ irp->callee_info_state = s;
+}