summaryrefslogtreecommitdiff
path: root/gcc/lto/lto.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r--gcc/lto/lto.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index fd474b68486..721d8fbc2ff 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -158,7 +158,7 @@ lto_read_in_decl_state (struct data_in *data_in, const uint32_t *data,
for (i = 0; i < LTO_N_DECL_STREAMS; i++)
{
uint32_t size = *data++;
- tree *decls = GGC_NEWVEC (tree, size);
+ tree *decls = ggc_alloc_vec_tree (size);
for (j = 0; j < size; j++)
{
@@ -364,7 +364,7 @@ lto_file_read (lto_file *file, FILE *resolution_file)
resolutions = lto_resolution_read (resolution_file, file);
- file_data = GGC_NEW (struct lto_file_decl_data);
+ file_data = ggc_alloc_lto_file_decl_data ();
file_data->file_name = file->filename;
file_data->section_hash_table = lto_obj_build_section_table (file);
file_data->renaming_hash_table = lto_create_renaming_table ();
@@ -529,7 +529,7 @@ static GTY (()) VEC(ltrans_partition, gc) *ltrans_partitions;
static ltrans_partition
new_partition (const char *name)
{
- ltrans_partition part = GGC_NEW (struct ltrans_partition_def);
+ ltrans_partition part = ggc_alloc_ltrans_partition_def ();
part->cgraph_set = cgraph_node_set_new ();
part->varpool_set = varpool_node_set_new ();
part->name = name;
@@ -1435,7 +1435,8 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
timevar_push (TV_IPA_LTO_DECL_IO);
/* Set the hooks so that all of the ipa passes can read in their data. */
- all_file_decl_data = GGC_CNEWVEC (struct lto_file_decl_data *, nfiles + 1);
+ all_file_decl_data
+ = ggc_alloc_cleared_vec_lto_file_decl_data_ptr (nfiles + 1);
lto_set_in_hooks (all_file_decl_data, get_section_data, free_section_data);
/* Read the resolution file. */