diff options
Diffstat (limited to 'gcc/config/rs6000/rs6000.c')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index b37bca9..4bde320 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -24928,10 +24928,8 @@ typedef struct branch_island_d { int line_number; } branch_island; -DEF_VEC_O(branch_island); -DEF_VEC_ALLOC_O(branch_island,gc); -static VEC(branch_island,gc) *branch_islands; +static vec<branch_island, va_gc> *branch_islands; /* Remember to generate a branch island for far calls to the given function. */ @@ -24941,7 +24939,7 @@ add_compiler_branch_island (tree label_name, tree function_name, int line_number) { branch_island bi = {function_name, label_name, line_number}; - VEC_safe_push (branch_island, gc, branch_islands, bi); + vec_safe_push (branch_islands, bi); } /* Generate far-jump branch islands for everything recorded in @@ -24955,9 +24953,9 @@ macho_branch_islands (void) { char tmp_buf[512]; - while (!VEC_empty (branch_island, branch_islands)) + while (!vec_safe_is_empty (branch_islands)) { - branch_island *bi = &VEC_last (branch_island, branch_islands); + branch_island *bi = &branch_islands->last (); const char *label = IDENTIFIER_POINTER (bi->label_name); const char *name = IDENTIFIER_POINTER (bi->function_name); char name_buf[512]; @@ -25025,7 +25023,7 @@ macho_branch_islands (void) if (write_symbols == DBX_DEBUG || write_symbols == XCOFF_DEBUG) dbxout_stabd (N_SLINE, bi->line_number); #endif /* DBX_DEBUGGING_INFO || XCOFF_DEBUGGING_INFO */ - VEC_pop (branch_island, branch_islands); + branch_islands->pop (); } } @@ -25038,7 +25036,7 @@ no_previous_def (tree function_name) branch_island *bi; unsigned ix; - FOR_EACH_VEC_ELT (branch_island, branch_islands, ix, bi) + FOR_EACH_VEC_SAFE_ELT (branch_islands, ix, bi) if (function_name == bi->function_name) return 0; return 1; @@ -25053,7 +25051,7 @@ get_prev_label (tree function_name) branch_island *bi; unsigned ix; - FOR_EACH_VEC_ELT (branch_island, branch_islands, ix, bi) + FOR_EACH_VEC_SAFE_ELT (branch_islands, ix, bi) if (function_name == bi->function_name) return bi->label_name; return NULL_TREE; |