X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fadt%2Fplist.h;h=d5ec0823f740d42b795c4c9909851140aa7631dd;hb=0decb677fb069c9d47f5285f12fdb983dca7fdae;hp=0c9f0ab62303a85bbbc1b1a9bf36d51585bf414b;hpb=9e0551a238d67f7c2428d0474cd93b03c92e0414;p=libfirm diff --git a/ir/adt/plist.h b/ir/adt/plist.h index 0c9f0ab62..d5ec0823f 100644 --- a/ir/adt/plist.h +++ b/ir/adt/plist.h @@ -126,6 +126,22 @@ void plist_insert_before(plist_t *list, plist_element_t *element, void *value); */ void plist_insert_after(plist_t *list, plist_element_t *element, void *value); +/** + * Checks if list has an element with the given data pointer. + * @param list the list to check + * @param value the data pointer to look for + * @return 1 if element with data pointer found, 0 otherwise + */ +int plist_has_value(plist_t *list, void *value); + +/** + * Tries to find list element associated to the given data pointer. + * @param list the list to check + * @param value the data pointer to look for + * @return The first list element associated to data pointer if found, NULL otherwise + */ +plist_element_t *plist_find_value(plist_t *list, void *value); + /** * Erases the specified element from the pointer list. * @param list the pointer list from which the element should be erased.