From 4c36ffe68d981c213d168cf07f42dcc558bc7f1b Mon Sep 17 00:00:00 2001 From: dalecki Date: Tue, 31 Jan 2006 19:56:55 +0000 Subject: 2006-01-31 Marcin Dalecki * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110446 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/gcov.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'gcc/gcov.c') diff --git a/gcc/gcov.c b/gcc/gcov.c index ff583cc786d..78f0ad495e7 100644 --- a/gcc/gcov.c +++ b/gcc/gcov.c @@ -514,7 +514,7 @@ process_file (const char *file_name) for (fn = functions; fn; fn = fn->next) solve_flow_graph (fn); for (src = sources; src; src = src->next) - src->lines = xcalloc (src->num_lines, sizeof (line_t)); + src->lines = XCNEWVEC (line_t, src->num_lines); for (fn = functions; fn; fn = fn->next) { coverage_t coverage; @@ -621,7 +621,7 @@ create_file_names (const char *file_name) struct stat status; length += strlen (object_directory) + 2; - name = xmalloc (length); + name = XNEWVEC (char, length); name[0] = 0; base = !stat (object_directory, &status) && S_ISDIR (status.st_mode); @@ -631,7 +631,7 @@ create_file_names (const char *file_name) } else { - name = xmalloc (length + 1); + name = XNEWVEC (char, length + 1); name[0] = 0; base = 1; } @@ -650,11 +650,11 @@ create_file_names (const char *file_name) length = strlen (name); - bbg_file_name = xmalloc (length + strlen (GCOV_NOTE_SUFFIX) + 1); + bbg_file_name = XNEWVEC (char, length + strlen (GCOV_NOTE_SUFFIX) + 1); strcpy (bbg_file_name, name); strcpy (bbg_file_name + length, GCOV_NOTE_SUFFIX); - da_file_name = xmalloc (length + strlen (GCOV_DATA_SUFFIX) + 1); + da_file_name = XNEWVEC (char, length + strlen (GCOV_DATA_SUFFIX) + 1); strcpy (da_file_name, name); strcpy (da_file_name + length, GCOV_DATA_SUFFIX); @@ -676,7 +676,7 @@ find_source (const char *file_name) if (!strcmp (file_name, src->name)) return src; - src = xcalloc (1, sizeof (source_t)); + src = XCNEW (source_t); src->name = xstrdup (file_name); src->coverage.name = src->name; src->index = sources ? sources->index + 1 : 1; @@ -742,7 +742,7 @@ read_graph_file (void) src = find_source (gcov_read_string ()); lineno = gcov_read_unsigned (); - fn = xcalloc (1, sizeof (function_t)); + fn = XCNEW (function_t); fn->name = function_name; fn->ident = ident; fn->checksum = checksum; @@ -778,7 +778,7 @@ read_graph_file (void) unsigned ix, num_blocks = GCOV_TAG_BLOCKS_NUM (length); fn->num_blocks = num_blocks; - fn->blocks = xcalloc (fn->num_blocks, sizeof (block_t)); + fn->blocks = XCNEWVEC (block_t, fn->num_blocks); for (ix = 0; ix != num_blocks; ix++) fn->blocks[ix].flags = gcov_read_unsigned (); } @@ -799,7 +799,7 @@ read_graph_file (void) if (dest >= fn->num_blocks) goto corrupt; - arc = xcalloc (1, sizeof (arc_t)); + arc = XCNEW (arc_t); arc->dst = &fn->blocks[dest]; arc->src = &fn->blocks[src]; @@ -844,7 +844,7 @@ read_graph_file (void) else if (fn && tag == GCOV_TAG_LINES) { unsigned blockno = gcov_read_unsigned (); - unsigned *line_nos = xcalloc (length - 1, sizeof (unsigned)); + unsigned *line_nos = XCNEWVEC (unsigned, length - 1); if (blockno >= fn->num_blocks || fn->blocks[blockno].u.line.encoding) goto corrupt; @@ -1037,7 +1037,7 @@ read_count_file (void) goto mismatch; if (!fn->counts) - fn->counts = xcalloc (fn->num_counts, sizeof (gcov_type)); + fn->counts = XCNEWVEC (gcov_type, fn->num_counts); for (ix = 0; ix != fn->num_counts; ix++) fn->counts[ix] += gcov_read_counter (); @@ -1417,7 +1417,7 @@ static char * make_gcov_file_name (const char *input_name, const char *src_name) { char *cptr; - char *name = xmalloc (strlen (src_name) + strlen (input_name) + 10); + char *name = XNEWVEC (char, strlen (src_name) + strlen (input_name) + 10); name[0] = 0; if (flag_long_names && strcmp (src_name, input_name)) -- cgit v1.2.1