- removed strange add_irn_dep(get_irg_end(cg->irg), res)
[libfirm] / ir / common / firmwalk.c
index fd52704..d820324 100644 (file)
@@ -1,22 +1,32 @@
 /*
- * Project:     libFIRM
- * File name:   ir/common/firmwalk.c
- * Purpose:     Walker that touches all Firm data structures
- * Author:      Sebastian Felis
- * Modified by:
- * Created:     7.2003
- * CVS-ID:      $Id$
- * Copyright:   (c) 2003 Universität Karlsruhe
- * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
  */
 
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+/**
+ * @file
+ * @brief    Walker that touches all Firm data structures
+ * @author   Sebastian Felis
+ * @date     7.2003
+ * @version  $Id$
+ */
+#include "config.h"
 
-#ifdef HAVE_STRING_H
-# include <string.h>
-#endif
+#include <string.h>
 
 #include "firmwalk.h"
 
@@ -24,7 +34,6 @@
 #include "irnode_t.h"
 #include "irprog_t.h"
 #include "irgwalk.h"
-#include "typewalk.h"
 #include "irtools.h"
 
 #include "array.h"
@@ -216,21 +225,21 @@ void *get_firm_walk_link(void *thing)
  *  @param env Environment pointer (currently unused)
  */
 static
-void fw_collect_tore(type_or_ent *tore, void *env)
+void fw_collect_tore(type_or_ent tore, void *env)
 {
   ir_type *tp;
   ir_entity *ent;
 
-  switch (get_kind(tore)) {
+  switch (get_kind(tore.ent)) {
   case k_entity:
-    ent = (ir_entity *)tore;
+    ent = tore.ent;
     /*  append entity to list */
     set_entity_link(ent, NULL);
     if (!pmap_contains(entity_map, ent))
       pmap_insert(entity_map, ent, env);
     break;
   case k_type:
-    tp = (ir_type *)tore;
+    tp = tore.typ;
 
     /*  append type to list */
     set_type_link(tp, NULL);
@@ -253,6 +262,7 @@ static
 void fw_collect_irn(ir_node *irn, void *env)
 {
   fw_data *data;
+  (void) env;
 
   /* block nodes. */
   if (is_Block(irn)) {
@@ -273,6 +283,7 @@ void fw_collect_irn(ir_node *irn, void *env)
 static
 void fw_free_colleted_data(ir_node *irn, void *env)
 {
+  (void) env;
   /* Free node list from blocks */
   if (is_Block(irn))
   {