removed warnings
[libfirm] / ir / ir / irdump.c
index 94e7125..b301db0 100644 (file)
@@ -130,10 +130,10 @@ dump_node_opcode (ir_node *n)
       assert(get_kind(get_SymConst_type(n)) == k_type);
       assert(get_type_ident(get_SymConst_type(n)));
       xfprintf (F, "SymC %I ", get_type_ident(get_SymConst_type(n)));
-      if (get_SymConst_kind == type_tag)
-       xfprintf (F, "tag");
+      if (get_SymConst_kind(n) == type_tag)
+        xfprintf (F, "tag");
       else
-       xfprintf (F, "size");
+        xfprintf (F, "size");
     }
 
   /* Filter */
@@ -170,14 +170,10 @@ dump_node_mode (ir_node *n)
     xfprintf (F, "%I", get_mode_ident(n->mode));
     break;
   default:
+    ;
   }
 }
 
-static void dump_node_loop_info(ir_node *n) {
-  //  if (get_irn_loop(n))
-  //  xfprintf(F, "\n in loop %d", get_loop_depth(get_irn_loop(n)));
-}
-
 static INLINE void
 dump_node_nodeattr (ir_node *n)
 {
@@ -202,6 +198,7 @@ dump_node_nodeattr (ir_node *n)
     xfprintf (F, "%I", get_entity_ident(get_Sel_entity(n)));
     } break;
   default:
+    ;
   } /* end switch */
 }
 
@@ -602,6 +599,7 @@ static void print_edge_vcgattr(ir_node *from, int to) {
   case iro_Unknown: break;
   case iro_Id:     break;
   default:
+    ;
   }
 }
 
@@ -754,7 +752,7 @@ static void print_type_info(type *tp) {
     xfprintf(F, "state: layout_fixed,\n");
   }
   if (get_type_mode(tp))
-    xfprintf(F, "mode: %s,\n", get_mode_name(get_type_mode(tp)));
+    xfprintf(F, "mode: %I,\n", get_mode_ident(get_type_mode(tp)));
   xfprintf(F, "size: %dB,\n", get_type_size(tp));
 }
 
@@ -809,34 +807,42 @@ void dump_entity_node(entity *ent) {
   xfprintf (F, DEFAULT_TYPE_ATTRIBUTE);
   xfprintf (F, "label: ");
   xfprintf (F, "\"ent %I\" " ENTITY_NODE_ATTR , get_entity_ident(ent));
+  fprintf (F, "\n info1:\"\nallocation:  ");
   switch (get_entity_allocation(ent)) {
-    case dynamic_allocated:   fprintf (F, " info1:\"dynamic allocated\n");   break;
-    case automatic_allocated: fprintf (F, " info1:\"automatic allocated\n"); break;
-    case static_allocated:    fprintf (F, " info1:\"static allocated\n");    break;
+    case dynamic_allocated:   fprintf (F, "dynamic allocated");   break;
+    case automatic_allocated: fprintf (F, "automatic allocated"); break;
+    case static_allocated:    fprintf (F, "static allocated");    break;
+    case parameter_allocated: fprintf (F, "parameter allocated"); break;
   }
+  fprintf (F, "\nvisibility:  ");
   switch (get_entity_visibility(ent)) {
-    case local:              fprintf (F, "local\n");             break;
-    case external_visible:   fprintf (F, "external_visible\n");  break;
-    case external_allocated: fprintf (F, "external_allocate\n"); break;
+    case local:              fprintf (F, "local");             break;
+    case external_visible:   fprintf (F, "external_visible");  break;
+    case external_allocated: fprintf (F, "external_allocate"); break;
   }
+  fprintf (F, "\nvariability: ");
   switch (get_entity_variability(ent)) {
-    case uninitialized: fprintf (F, "uninitialized\n");break;
-    case initialized:   fprintf (F, "initialized\n");  break;
-    case part_constant: fprintf (F, "part_constant\n");break;
-    case constant:      fprintf (F, "constant\n");     break;
+    case uninitialized: fprintf (F, "uninitialized");break;
+    case initialized:   fprintf (F, "initialized");  break;
+    case part_constant: fprintf (F, "part_constant");break;
+    case constant:      fprintf (F, "constant");     break;
   }
+  fprintf (F, "\nvolatility:  ");
   switch (get_entity_volatility(ent)) {
-    case non_volatile: fprintf (F, "non_volatile\n"); break;
-    case is_volatile:  fprintf (F, "is_volatile\n");  break;
+    case non_volatile: fprintf (F, "non_volatile"); break;
+    case is_volatile:  fprintf (F, "is_volatile");  break;
   }
+  fprintf (F, "\npeculiarity: ");
   switch (get_entity_peculiarity(ent)) {
-    case description: fprintf (F, "description\n"); break;
-    case inherited:   fprintf (F, "inherited\n");   break;
-    case existent:    fprintf (F, "existent\n");    break;
+    case description: fprintf (F, "description"); break;
+    case inherited:   fprintf (F, "inherited");   break;
+    case existent:    fprintf (F, "existent");    break;
   }
+  xfprintf(F, "\nname:    %I\nld_name: %I", get_entity_ident(ent), get_entity_ld_ident(ent));
+  fprintf(F, "\noffset:  %d", get_entity_offset(ent));
   if (is_method_type(get_entity_type(ent)))
-    xfprintf (F, "\n irg = %p ", get_entity_irg(ent));
-  xfprintf(F, "\"}\n");
+    xfprintf (F, "\nirg = %p ", get_entity_irg(ent));
+  xfprintf(F, "\"\n}\n");
 }
 
 /* dumps a type or entity and it's edges. */
@@ -955,7 +961,7 @@ dump_type_info (type_or_ent *tore, void *env) {
     break; /* case k_type */
   default:
     {
-      printf(" *** irdump,  %s(l.%i), faulty type.\n", __FUNCTION__, __LINE__);
+      printf(" *** irdump,  dump_type_info(l.%i), faulty type.\n", __LINE__);
     } break;
   } /* switch kind_or_entity */
 }
@@ -970,6 +976,7 @@ dump_class_hierarchy_node (type_or_ent *tore, void *env) {
   switch (get_kind(tore)) {
   case k_entity: {
     entity *ent = (entity *)tore;
+    if (get_entity_owner(ent) == get_glob_type()) break;
     if ((env) && is_class_type(get_entity_owner(ent))) {
       /* The node */
       dump_entity_node(ent);
@@ -985,6 +992,7 @@ dump_class_hierarchy_node (type_or_ent *tore, void *env) {
   case k_type:
     {
       type *tp = (type *)tore;
+      if (tp == get_glob_type()) break;
       switch (get_type_tpop_code(tp)) {
         case tpo_class: {
          print_type_node(tp);
@@ -1000,7 +1008,7 @@ dump_class_hierarchy_node (type_or_ent *tore, void *env) {
     break; /* case k_type */
   default:
     {
-      printf(" *** irdump,  %s(l.%i), faulty type.\n", __FUNCTION__, __LINE__);
+      printf(" *** irdump,  dump_class_hierarchy_node(l.%i), faulty type.\n", __LINE__);
     } break;
   } /* switch kind_or_entity */
 }
@@ -1434,7 +1442,7 @@ dump_ir_block_graph_w_types (ir_graph *irg)
 /*  dump_type_graph                                                    */
 /*  dump_ir_graph_w_types                                              */
 /***********************************************************************/
-void dump_all_ir_graphs (void dump_graph(ir_graph*)) {
+void dump_all_ir_graphs (dump_graph_func *dump_graph) {
   int i;
   for (i=0; i < get_irp_n_irgs(); i++) {
     dump_graph(get_irp_irg(i));