adding assertion to prevent recursive compound types
[libfirm] / ir / tr / type_identify.c
index 7b45254..bdd1127 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
 #endif
 
 #include "type_identify_t.h"
@@ -61,7 +61,7 @@ int compare_strict (const void *tp1, const void *tp2) {
 }
 
 /* stuff to compute a hash value for a type. */
-int hash_name (type *tp) {
+int firm_hash_name (type *tp) {
   unsigned h = (unsigned)tp->type_op;
   h = 9*h + (unsigned)tp->name;
   return h;
@@ -118,7 +118,7 @@ type *mature_type_free_entities(type *tp) {
 /* initialize this module */
 void init_type_identify(type_identify_if_t *ti_if) {
   compare_types_func = ti_if && ti_if->cmp  ? ti_if->cmp  : compare_strict;
-  hash_types_func    = ti_if && ti_if->hash ? ti_if->hash : hash_name;
+  hash_types_func    = ti_if && ti_if->hash ? ti_if->hash : firm_hash_name;
 
   type_table = new_pset (compare_types_func, 8);
 }