diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-11-25 16:46:58 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:04:53 -0700 |
commit | bb9faf844fcacfe2f93df9ec9e92ce4d03f52dcb (patch) | |
tree | b2916d88df8fc4b25e99dc1ad54caa920313632d /lib.h | |
parent | Once again, remember that basic blocks may not have any instructions. (diff) | |
download | sparse-bb9faf844fcacfe2f93df9ec9e92ce4d03f52dcb.tar.gz sparse-bb9faf844fcacfe2f93df9ec9e92ce4d03f52dcb.tar.bz2 sparse-bb9faf844fcacfe2f93df9ec9e92ce4d03f52dcb.zip |
helper function cleanup: separate delete/replace list entries.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -101,7 +101,8 @@ struct ptr_list { #define ptr_list_empty(x) ((x) == NULL) void * delete_ptr_list_last(struct ptr_list **head); -int replace_ptr_list(struct ptr_list *head, void *old_ptr, void *new_ptr); +int delete_ptr_list_entry(struct ptr_list **, void *); +int replace_ptr_list_entry(struct ptr_list **, void *old, void *new); extern void sort_list(struct ptr_list **, int (*)(const void *, const void *)); extern void **add_ptr_list(struct ptr_list **, void *); @@ -205,11 +206,6 @@ static inline pseudo_t first_pseudo(struct pseudo_list *head) return first_ptr_list((struct ptr_list *)head); } -static inline int replace_basic_block_list(struct basic_block_list *head, struct basic_block *from, struct basic_block *to) -{ - return replace_ptr_list((struct ptr_list *)head, (void*)from, (void*)to); -} - static inline void concat_symbol_list(struct symbol_list *from, struct symbol_list **to) { concat_ptr_list((struct ptr_list *)from, (struct ptr_list **)to); |