Changed implementation of tr module.
[libfirm] / testprograms / empty.c
index b958cfe..b5b0d1f 100644 (file)
 
 int main(int argc, char **argv)
 {
-  ir_graph *irg;          /* this variable contains the irgraph */
-  type_class *owner;      /* the class in which this method is defined */
-  type_method *proc_main; /* type information for the method main */
-  entity *ent;            /* represents this method as entity of owner */
-  ir_node *x;
+  ir_graph *irg;        /* this variable contains the irgraph */
+  type     *owner;      /* the class in which this method is defined */
+  type     *proc_main;  /* type information for the method main */
+  entity   *ent;        /* represents this method as entity of owner */
+  ir_node  *x;
 
   printf("\nCreating an IR graph: EMPTY...\n");
 
@@ -75,13 +75,13 @@ int main(int argc, char **argv)
   }
   /* Now generate all instructions for this block and all its predecessor blocks
    * so we can mature it. */
-  mature_block (irg->current_block);
+  mature_block (get_irg_current_block(irg));
 
   /* This adds the in edge of the end block which originates at the return statement.
    * The return node passes controlflow to the end block.  */
-  add_in_edge (irg->end_block, x);
+  add_in_edge (get_irg_end_block(irg), x);
   /* Now we can mature the end block as all it's predecessors are known. */
-  mature_block (irg->end_block);
+  mature_block (get_irg_end_block(irg));
 
   /* verify the graph */
   irg_vrfy(irg);
@@ -92,6 +92,8 @@ int main(int argc, char **argv)
   printf("Done building the graph.  Dumping it.\n");
   dump_ir_block_graph (irg);
 
+  dump_all_types();
+
   printf("use xvcg to view this graph:\n");
   printf("/ben/goetz/bin/xvcg GRAPHNAME\n\n");