diff options
Diffstat (limited to 'gcc/ipa-ref.h')
-rw-r--r-- | gcc/ipa-ref.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h index d2de006b3ca..b8b1f9e4216 100644 --- a/gcc/ipa-ref.h +++ b/gcc/ipa-ref.h @@ -82,6 +82,32 @@ public: return referring[0]; } + /* Return first referring alias. */ + struct ipa_ref *first_alias (void) + { + struct ipa_ref *r = first_referring (); + + return r && r->use == IPA_REF_ALIAS ? r : NULL; + } + + /* Return last referring alias. */ + struct ipa_ref *last_alias (void) + { + unsigned int i = 0; + + for(i = 0; i < referring.length (); i++) + if (referring[i]->use != IPA_REF_ALIAS) + break; + + return i == 0 ? NULL : referring[i - 1]; + } + + /* Return true if the symbol has an alias. */ + bool inline has_aliases_p (void) + { + return first_alias (); + } + /* Clear reference list. */ void clear (void) { |