another case fo missing statistics/missing outedge invalidation in confirm construction
[libfirm] / ir / common / firm_common.c
index de0ba2b..35db7cf 100644 (file)
  * @author    Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
  * @version   $Id$
  */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
 
-#include "firm_common_t.h"
 #include "irgraph.h"
 #include "irloop.h"
 #include "tv.h"
 #define POINTER_READ(p, size) (p)
 
 /* returns the kind of the thing */
-firm_kind get_kind(const void *firm_thing) {
+firm_kind get_kind(const void *firm_thing)
+{
        return POINTER_READ(firm_thing, sizeof(firm_kind)) ? *(firm_kind *)firm_thing : k_BAD;
 }  /* get_kind */
 
-const char *print_firm_kind(void *firm_thing) {
+const char *print_firm_kind(void *firm_thing)
+{
        if (! firm_thing)
                return "(NULL)";
 
@@ -67,7 +66,8 @@ const char *print_firm_kind(void *firm_thing) {
 /*
  * identify a firm thing
  */
-void firm_identify_thing(void *X) {
+void firm_identify_thing(void *X)
+{
        if (! X) {
                printf("(NULL)\n");
                return;
@@ -80,14 +80,17 @@ void firm_identify_thing(void *X) {
        case k_entity:
                printf("entity: %s: %ld (%p)\n", get_entity_name(X), get_entity_nr(X), X);
                break;
-       case k_type:
-               printf("type: %s %s: %ld (%p)\n", get_type_tpop_name(X), get_type_name(X), get_type_nr(X), X);
+       case k_type: {
+               char buf[256];
+               ir_print_type(buf, sizeof(buf), X);
+               printf("type: %s '%s': %ld (%p)\n", get_type_tpop_name(X), buf, get_type_nr(X), X);
                break;
+       }
        case k_ir_graph:
                printf("graph: %s: %ld (%p)\n", get_entity_name(get_irg_entity(X)), get_irg_graph_nr(X), X);
                break;
        case k_ir_node:
-               printf("irnode: %s%s %ld (%p)\n", get_irn_opname(X), get_mode_name(get_irn_mode(X)), get_irn_node_nr(X), X);
+               printf("irnode: %s %s %ld (%p)\n", get_irn_opname(X), get_mode_name(get_irn_mode(X)), get_irn_node_nr(X), X);
                break;
        case k_ir_mode:
                printf("mode %s: (%p)\n", get_mode_name(X), X);