added copyright information
[libfirm] / testprograms / global_var_example.c
index d149a14..29268f6 100644 (file)
@@ -43,7 +43,7 @@ int main(int argc, char **argv)
   printf("\nCreating an IR graph: GLOBAL_VAR ...\n");
 
   /* init library */
-  init_firm ();
+  init_firm (NULL);
 
   /* make basic type information for primitive type int.
      In Sather primitive types are represented by a class.
@@ -90,13 +90,11 @@ int main(int argc, char **argv)
   i_ptr = new_simpleSel(get_store(), get_irg_globals(irg), i_ent);
 
   store = new_Store (get_store(), i_ptr,
-                    new_Const(mode_Is, tarval_from_long (mode_Is, 2)));
+                    new_Const(mode_Is, new_tarval_from_long (2, mode_Is)));
   set_store(new_Proj(store, mode_M, 0));
 
-  {
-    ir_node *in[0]; /* this is the array containing the return parameters */
-    x = new_Return (get_store(), 0, in);
-  }
+  x = new_Return (get_store(), 0, NULL);
+
   /* Now generate all instructions for this block and all its predecessor blocks
    * so we can mature it. */
   mature_block (get_irg_current_block(irg));