rename type entity into ir_entity
[libfirm] / ir / adt / set.c
index 55aafc4..f2e4dd7 100644 (file)
@@ -179,7 +179,7 @@ SET *
 (PMANGLE(new)) (MANGLEP(cmp_fun) cmp, int nslots)
 {
   int i;
-  SET *table = xmalloc (sizeof (SET));
+  SET *table = xmalloc(sizeof(*table));
 
   if (nslots > SEGMENT_SIZE * DIRECTORY_SIZE)
     nslots = DIRECTORY_SIZE;
@@ -550,6 +550,13 @@ MANGLEP(entry) *
   return pset_hinsert (se, key, hash);
 }
 
+void pset_insert_pset_ptr(pset *target, pset *src) {
+  void *elt;
+  for (elt = pset_first(src); elt; elt = pset_next(src)) {
+    pset_insert_ptr(target, elt);
+  }
+}
+
 #else /* !PSET */
 
 void *