diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-02-15 23:30:16 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-02-15 22:30:16 +0000 |
commit | 190bbd0b03d92d0879ec56f21d5733170f9f9978 (patch) | |
tree | 4f786f92b69387a69a14ef0957b60b15265f4203 /gcc/cgraph.h | |
parent | feb675e4087d78e3a3a47d57a220773d80a6d747 (diff) | |
download | gcc-190bbd0b03d92d0879ec56f21d5733170f9f9978.zip gcc-190bbd0b03d92d0879ec56f21d5733170f9f9978.tar.gz gcc-190bbd0b03d92d0879ec56f21d5733170f9f9978.tar.bz2 |
cgraph.h (symtab_node::has_aliases_p): Simplify.
* cgraph.h (symtab_node::has_aliases_p): Simplify.
(symtab_node::call_for_symbol_and_aliases): Use has_aliases_p
* tree.c (lookup_binfo_at_offset): Make static.
(get_binfo_at_offset): Do not shadow offset; add explanatory
comment.
From-SVN: r220718
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r-- | gcc/cgraph.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index 6155804..06d2704 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -2338,12 +2338,8 @@ inline bool symtab_node::has_aliases_p (void) { ipa_ref *ref = NULL; - int i; - for (i = 0; iterate_direct_aliases (i, ref); i++) - if (ref->use == IPA_REF_ALIAS) - return true; - return false; + return (iterate_direct_aliases (0, ref) != NULL); } /* Return true when RESOLUTION indicate that linker will use @@ -2984,11 +2980,9 @@ symtab_node::call_for_symbol_and_aliases (bool (*callback) (symtab_node *, void *data, bool include_overwritable) { - ipa_ref *ref; - if (callback (this, data)) return true; - if (iterate_direct_aliases (0, ref)) + if (has_aliases_p ()) return call_for_symbol_and_aliases_1 (callback, data, include_overwritable); return false; } @@ -3003,13 +2997,10 @@ cgraph_node::call_for_symbol_and_aliases (bool (*callback) (cgraph_node *, void *data, bool include_overwritable) { - ipa_ref *ref; - if (callback (this, data)) return true; - if (iterate_direct_aliases (0, ref)) + if (has_aliases_p ()) return call_for_symbol_and_aliases_1 (callback, data, include_overwritable); - return false; } @@ -3023,13 +3014,10 @@ varpool_node::call_for_symbol_and_aliases (bool (*callback) (varpool_node *, void *data, bool include_overwritable) { - ipa_ref *ref; - if (callback (this, data)) return true; - if (iterate_direct_aliases (0, ref)) + if (has_aliases_p ()) return call_for_symbol_and_aliases_1 (callback, data, include_overwritable); - return false; } |