X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftr_inheritance.h;h=658b62be4b351b04b8cd4a9d1bb88228f299f288;hb=98ca7e71bc79bb2a3b2ccb039df78000fc48e70a;hp=5585c257c8bd1b7816304aaf86606081b77109b4;hpb=7012801102da788b13623eb0768e1acf7bf5578c;p=libfirm
diff --git a/ir/tr/tr_inheritance.h b/ir/tr/tr_inheritance.h
index 5585c257c..658b62be4 100644
--- a/ir/tr/tr_inheritance.h
+++ b/ir/tr/tr_inheritance.h
@@ -1,6 +1,5 @@
/**
- *
- * @file tp_inheritance.h
+ * @file tr_inheritance.h
*
* Project: libFIRM
* File name: ir/tr/tp_inheritance.h
@@ -52,6 +51,14 @@ typedef struct ir_graph ir_graph;
* subclasses of high. */
int is_subclass_of(type *low, type *high);
+/** Subclass check for pointers to classes.
+ *
+ * Dereferences at both types the same amount of pointer types (as
+ * many as possible). If the remaining types are both class types
+ * and subclasses, returns true, else false. Can also be called with
+ * two class types. */
+int is_subclass_ptr_of(type *low, type *high);
+
/** Returns true if high is superclass of low.
*
* Low is a subclass of high if low == high or if low is a subclass of
@@ -60,6 +67,14 @@ int is_subclass_of(type *low, type *high);
* subclasses of high. */
int is_superclass_of(type *high, type *low);
+/** Superclass check for pointers to classes.
+ *
+ * Dereferences at both types the same amount of pointer types (as
+ * many as possible). If the remaining types are both class types
+ * and superclasses, returns true, else false. Can also be called with
+ * two class types. */
+int is_subclass_ptr_of(type *low, type *high);
+
/** Returns true if high is (transitive) overwritten by low.
*
* Returns false if high == low. */
@@ -121,6 +136,8 @@ void resolve_inheritance(mangle_inherited_name_func *mfunc);
/* */
/* The transitive edges are held in a set, not in an array as the */
/* underlying relation. */
+/* */
+/* Do the sets contain the node itself? I assume NOT! */
/* ----------------------------------------------------------------------- */
/** The state of the transitive closure.
@@ -201,7 +218,7 @@ entity *get_entity_trans_overwrites_next (entity *ent);
/** Flags for class cast state.
*
- * The state in irp is allways smaller or equal to the state of any
+ * The state in irp is always smaller or equal to the state of any
* irg.
*
* We rely on the ordering of the enum. */