X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fstat%2Fdags.c;h=c9e283dd8ca026f431d27fd79d363fe09bacf1b0;hb=ecb5fc89b37112b0866ad752562aaec70ed1b650;hp=9e8a97d14a5661ab454ebe375a3eb22d41174efd;hpb=f8cc15664f571aa7ef89d6f6bc8d5bd2b8ca7d53;p=libfirm diff --git a/ir/stat/dags.c b/ir/stat/dags.c index 9e8a97d14..c9e283dd8 100644 --- a/ir/stat/dags.c +++ b/ir/stat/dags.c @@ -30,6 +30,7 @@ #include "irdump.h" #include "dags.h" #include "irtools.h" +#include "ircons.h" enum dag_counting_options_t { FIRMSTAT_COPY_CONSTANTS = 0x00000001, /**< if set, constants will be treated as they are in @@ -70,7 +71,7 @@ struct dag_entry_t { /** * return an DAG entry for the node n */ -static dag_entry_t *get_irn_dag_entry(ir_node *n) +static dag_entry_t *get_irn_dag_entry(const ir_node *n) { dag_entry_t *p = (dag_entry_t*)get_irn_link(n); @@ -80,7 +81,8 @@ static dag_entry_t *get_irn_dag_entry(ir_node *n) do { p = p->link; } while (p->link != NULL); - set_irn_link(n, p); + /* hacky cast to ir_node* */ + set_irn_link((ir_node*)n, p); } } /* if */ return p; @@ -315,7 +317,7 @@ static unsigned mark_options; /** * a vcg attribute hook */ -static int stat_dag_mark_hook(FILE *F, ir_node *n, ir_node *l) +static int stat_dag_mark_hook(FILE *F, const ir_node *n, const ir_node *l) { static const char *colors[] = { "purple", "pink", "lightblue", "orange", "khaki", "orchid", "lilac", "turquoise" }; dag_entry_t *entry;