aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/rtti.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/rtti.cc')
-rw-r--r--gcc/cp/rtti.cc15
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/cp/rtti.cc b/gcc/cp/rtti.cc
index 3539962..18bc479 100644
--- a/gcc/cp/rtti.cc
+++ b/gcc/cp/rtti.cc
@@ -1318,18 +1318,9 @@ get_pseudo_ti_index (tree type)
static tinfo_s *
get_tinfo_desc (unsigned ix)
{
- unsigned len = tinfo_descs->length ();
-
- if (len <= ix)
- {
- /* too short, extend. */
- len = ix + 1 - len;
- vec_safe_reserve (tinfo_descs, len);
- tinfo_s elt;
- elt.type = elt.vtable = elt.name = NULL_TREE;
- while (len--)
- tinfo_descs->quick_push (elt);
- }
+ if (tinfo_descs->length () <= ix)
+ /* too short, extend. */
+ vec_safe_grow_cleared (tinfo_descs, ix + 1);
tinfo_s *res = &(*tinfo_descs)[ix];