summaryrefslogtreecommitdiff
path: root/gcc/ipa-ref-inline.h
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-27 12:04:21 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-27 12:04:21 +0000
commit58287c3f4b74a0bb479c7036117d5804eb6765c4 (patch)
treec299b554740820453d3def4a8e59007a86edd7c7 /gcc/ipa-ref-inline.h
parentdb827453ce1b7f76552f8ba9a8d18e65d7bf8de8 (diff)
downloadgcc-58287c3f4b74a0bb479c7036117d5804eb6765c4.tar.gz
2012-11-26 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 193836 using svnmerge.py **broken, gcc/melt/xtramelt-ana-base.melt dont compile** git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@193843 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-ref-inline.h')
-rw-r--r--gcc/ipa-ref-inline.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ipa-ref-inline.h b/gcc/ipa-ref-inline.h
index 575bba901ac..d793b5ea127 100644
--- a/gcc/ipa-ref-inline.h
+++ b/gcc/ipa-ref-inline.h
@@ -71,9 +71,9 @@ ipa_ref_referred_ref_list (struct ipa_ref *ref)
static inline struct ipa_ref *
ipa_ref_list_first_reference (struct ipa_ref_list *list)
{
- if (!VEC_length (ipa_ref_t, list->references))
+ if (!vec_safe_length (list->references))
return NULL;
- return &VEC_index (ipa_ref_t, list->references, 0);
+ return &(*list->references)[0];
}
/* Return first referring ref in LIST or NULL if empty. */
@@ -81,9 +81,9 @@ ipa_ref_list_first_reference (struct ipa_ref_list *list)
static inline struct ipa_ref *
ipa_ref_list_first_referring (struct ipa_ref_list *list)
{
- if (!VEC_length (ipa_ref_ptr, list->referring))
+ if (!list->referring.length ())
return NULL;
- return VEC_index (ipa_ref_ptr, list->referring, 0);
+ return list->referring[0];
}
/* Clear reference list. */
@@ -91,7 +91,7 @@ ipa_ref_list_first_referring (struct ipa_ref_list *list)
static inline void
ipa_empty_ref_list (struct ipa_ref_list *list)
{
- list->referring = NULL;
+ list->referring.create (0);
list->references = NULL;
}
@@ -100,10 +100,10 @@ ipa_empty_ref_list (struct ipa_ref_list *list)
static inline unsigned int
ipa_ref_list_nreferences (struct ipa_ref_list *list)
{
- return VEC_length (ipa_ref_t, list->references);
+ return vec_safe_length (list->references);
}
#define ipa_ref_list_reference_iterate(L,I,P) \
- VEC_iterate(ipa_ref_t, (L)->references, (I), (P))
+ vec_safe_iterate ((L)->references, (I), &(P))
#define ipa_ref_list_referring_iterate(L,I,P) \
- VEC_iterate(ipa_ref_ptr, (L)->referring, (I), (P))
+ (L)->referring.iterate ((I), &(P))