diff options
Diffstat (limited to 'gcc/vmsdbgout.c')
-rw-r--r-- | gcc/vmsdbgout.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/gcc/vmsdbgout.c b/gcc/vmsdbgout.c index 5472ac54ee9..cb8479ff24a 100644 --- a/gcc/vmsdbgout.c +++ b/gcc/vmsdbgout.c @@ -101,11 +101,9 @@ static unsigned int file_info_table_in_use; #define FILE_TABLE_INCREMENT 64 typedef char *char_p; -DEF_VEC_P(char_p); -DEF_VEC_ALLOC_P(char_p,heap); -static VEC(char_p,heap) *funcnam_table; -static VEC(unsigned,heap) *funcnum_table; +static vec<char_p> funcnam_table; +static vec<unsigned> funcnum_table; #define FUNC_TABLE_INITIAL 256 /* Local pointer to the name of the main input file. Initialized in @@ -641,7 +639,7 @@ write_rtnbeg (int rtnnum, int dosizeonly) DST_ROUTINE_BEGIN rtnbeg; DST_PROLOG prolog; - rtnname = VEC_index (char_p, funcnam_table, rtnnum); + rtnname = funcnam_table[rtnnum]; rtnnamelen = strlen (rtnname); rtnentryname = concat (rtnname, "..en", NULL); @@ -714,7 +712,7 @@ write_rtnbeg (int rtnnum, int dosizeonly) ASM_GENERATE_INTERNAL_LABEL (label, FUNC_PROLOG_LABEL, - VEC_index (unsigned, funcnum_table, rtnnum)); + funcnum_table[rtnnum]); totsize += write_debug_addr (label, "prolog breakpoint addr", dosizeonly); } @@ -748,10 +746,10 @@ write_rtnend (int rtnnum, int dosizeonly) ASM_GENERATE_INTERNAL_LABEL (label1, FUNC_BEGIN_LABEL, - VEC_index (unsigned, funcnum_table, rtnnum)); + funcnum_table[rtnnum]); ASM_GENERATE_INTERNAL_LABEL (label2, FUNC_END_LABEL, - VEC_index (unsigned, funcnum_table, rtnnum)); + funcnum_table[rtnnum]); totsize += write_debug_delta4 (label2, label1, "routine size", dosizeonly); return totsize; @@ -1264,9 +1262,8 @@ vmsdbgout_begin_function (tree decl) (*dwarf2_debug_hooks.begin_function) (decl); /* Add the new entry to the end of the function name table. */ - VEC_safe_push (char_p, heap, funcnam_table, xstrdup (name)); - VEC_safe_push (unsigned, heap, funcnum_table, - current_function_funcdef_no); + funcnam_table.safe_push (xstrdup (name)); + funcnum_table.safe_push (current_function_funcdef_no); } static char fullname_buff [4096]; @@ -1447,8 +1444,8 @@ vmsdbgout_init (const char *filename) /* Skip the first entry - file numbers begin at 1. */ file_info_table_in_use = 1; - funcnam_table = VEC_alloc (char_p, heap, FUNC_TABLE_INITIAL); - funcnum_table = VEC_alloc (unsigned, heap, FUNC_TABLE_INITIAL); + funcnam_table.create (FUNC_TABLE_INITIAL); + funcnum_table.create (FUNC_TABLE_INITIAL); /* Allocate the initial hunk of the line_info_table. */ line_info_table = XCNEWVEC (dst_line_info_entry, LINE_INFO_TABLE_INCREMENT); @@ -1564,7 +1561,7 @@ vmsdbgout_finish (const char *filename ATTRIBUTE_UNUSED) ASM_OUTPUT_ALIGN (asm_out_file, 0); totsize = write_modbeg (1); - FOR_EACH_VEC_ELT (unsigned, funcnum_table, i, ifunc) + FOR_EACH_VEC_ELT (funcnum_table, i, ifunc) { totsize += write_rtnbeg (i, 1); totsize += write_rtnend (i, 1); @@ -1572,7 +1569,7 @@ vmsdbgout_finish (const char *filename ATTRIBUTE_UNUSED) totsize += write_pclines (1); write_modbeg (0); - FOR_EACH_VEC_ELT (unsigned, funcnum_table, i, ifunc) + FOR_EACH_VEC_ELT (funcnum_table, i, ifunc) { write_rtnbeg (i, 0); write_rtnend (i, 0); |