diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-13 01:45:35 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-13 01:45:35 +0000 |
commit | 46518bf201fac97504ef5c9aae880d908f89ff79 (patch) | |
tree | d3a49132e8246b9fe0b8818a628270a745927d80 /gcc/profile.c | |
parent | fc7657e881366a7916956c40bf8c14ed6e91fda3 (diff) | |
download | gcc-46518bf201fac97504ef5c9aae880d908f89ff79.tar.gz |
* tree.c (build_constructor): New function.
* tree.h: Prototype it.
* c-typeck.c (build_c_cast, pop_init_level)
* profile.c (build_function_info_value, build_gcov_info_value)
(create_profiler):
Use build_constructor.
* builtins.c (expand_builtin_args_info): Remove #if 0 blocks.
* objc/objc-act.c (build_constructor):
Rename objc_build_constructor. Use build_constructor.
(build_objc_string_object, objc_add_static_instance)
(init_def_list, init_objc_symtab, init_module_descriptor)
(generate_static_references, build_selector_translation_table)
(build_descriptor_table_initializer, generate_descriptor_table)
(build_protocol_initializer, build_ivar_list_initializer)
(generate_ivars_list, build_dispatch_table_initializer)
(generate_dispatch_table, generate_protocol_list)
(build_category_initializer, build_shared_structure_initializer):
Update to match.
ada:
* gigi.h, utils2.c (build_constructor):
Rename gnat_build_constructor. Use build_constructor.
* decl.c (gnat_to_gnu_entity)
* trans.c (tree_transform, pos_to_constructor, extract_values)
* ada/utils.c (build_template, convert_to_fat_pointer, convert)
(unchecked_convert)
* ada/utils2.c (build_binary_op, build_call_raise, build_allocator)
(fill_vms_descriptor):
Update to match.
cp:
* class.c (initialize_array)
* decl.c (reshape_init)
* decl2.c (build_expr_from_tree)
* init.c (build_zero_init)
* pt.c (tsubst_copy, tsubst_copy_and_build)
* rtti.c (tinfo_base_init, generic_initializer, ptr_initializer)
(ptm_initializer, class_initializer, get_pseudo_ti_init)
* semantics.c (finish_compound_literal)
* typeck.c (build_ptrmemfunc1)
* typeck2.c (store_init_value, process_init_constructor)
(build_functional_cast): Use build_constructor.
f:
* com.c (ffecom_build_complex_constant_, ffecom_expr_)
(ffecom_init_zero_, ffecom_transform_namelist_, ffecom_vardesc_)
(ffecom_vardesc_array_, ffecom_vardesc_dims_, ffecom_2)
* ste.c (ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_)
(ffeste_io_icilist_, ffeste_io_inlist_, ffeste_io_olist_):
Use build_constructor.
java:
* class.c (make_field_value, make_method_value, get_dispatch_table)
(make_class_data, emit_offset_symbol_table)
* constants.c (build_constants_constructor)
* java-tree.h (START_RECORD_CONSTRUCTOR)
* parse.y (maybe_build_array_element_wfl):
Use build_constructor.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65539 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/profile.c')
-rw-r--r-- | gcc/profile.c | 54 |
1 files changed, 21 insertions, 33 deletions
diff --git a/gcc/profile.c b/gcc/profile.c index 5cbdd00c058..99ddd3bc7d4 100644 --- a/gcc/profile.c +++ b/gcc/profile.c @@ -1649,12 +1649,11 @@ build_function_info_value (function) build_counter_section_value (function->counter_sections[i].tag, function->counter_sections[i].n_counters); set_purpose (counter_section_value, counter_section_fields); - counter_sections_value = tree_cons (NULL_TREE, - build (CONSTRUCTOR, - counter_section_type, - NULL_TREE, - nreverse (counter_section_value)), - counter_sections_value); + counter_sections_value = + tree_cons (NULL_TREE, + build_constructor (counter_section_type, + nreverse (counter_section_value)), + counter_sections_value); } finish_builtin_struct (counter_section_type, "__counter_section", counter_section_fields, NULL_TREE); @@ -1662,10 +1661,8 @@ build_function_info_value (function) if (function->n_counter_sections) { counter_sections_value = - build (CONSTRUCTOR, - counter_sections_array_type, - NULL_TREE, - nreverse (counter_sections_value)), + build_constructor (counter_sections_array_type, + nreverse (counter_sections_value)), counter_sections_value = build1 (ADDR_EXPR, counter_sections_ptr_type, counter_sections_value); @@ -1832,10 +1829,8 @@ build_gcov_info_value () tree function_info_value = build_function_info_value (item); set_purpose (function_info_value, function_info_fields); functions = tree_cons (NULL_TREE, - build (CONSTRUCTOR, - function_info_type, - NULL_TREE, - nreverse (function_info_value)), + build_constructor (function_info_type, + nreverse (function_info_value)), functions); } finish_builtin_struct (function_info_type, "__function_info", @@ -1849,10 +1844,7 @@ build_gcov_info_value () array_type = build_array_type ( function_info_type, build_index_type (build_int_2 (n_functions - 1, 0))); - functions = build (CONSTRUCTOR, - array_type, - NULL_TREE, - nreverse (functions)); + functions = build_constructor (array_type, nreverse (functions)); functions = build1 (ADDR_EXPR, function_info_ptr_type, functions); @@ -1879,12 +1871,11 @@ build_gcov_info_value () profile_info.section_info[i].tag, profile_info.section_info[i].n_counters); set_purpose (counter_sections_value, counter_section_data_fields); - counter_sections = tree_cons (NULL_TREE, - build (CONSTRUCTOR, - counter_section_data_type, - NULL_TREE, - nreverse (counter_sections_value)), - counter_sections); + counter_sections = + tree_cons (NULL_TREE, + build_constructor (counter_section_data_type, + nreverse (counter_sections_value)), + counter_sections); } finish_builtin_struct (counter_section_data_type, "__counter_section_data", counter_section_data_fields, NULL_TREE); @@ -1895,13 +1886,11 @@ build_gcov_info_value () if (profile_info.n_sections) { - counter_sections = - build (CONSTRUCTOR, - build_array_type ( - counter_section_data_type, - build_index_type (build_int_2 (profile_info.n_sections - 1, 0))), - NULL_TREE, - nreverse (counter_sections)); + tree cst_type = build_index_type (build_int_2 (profile_info.n_sections-1, + 0)); + cst_type = build_array_type (counter_section_data_type, cst_type); + counter_sections = build_constructor (cst_type, + nreverse (counter_sections)); counter_sections = build1 (ADDR_EXPR, counter_section_data_ptr_type, counter_sections); @@ -1943,8 +1932,7 @@ create_profiler () gcov_info = build (VAR_DECL, gcov_info_type, NULL_TREE, NULL_TREE); DECL_INITIAL (gcov_info) = - build (CONSTRUCTOR, gcov_info_type, NULL_TREE, - nreverse (gcov_info_value)); + build_constructor (gcov_info_type, nreverse (gcov_info_value)); TREE_STATIC (gcov_info) = 1; ASM_GENERATE_INTERNAL_LABEL (name, "LPBX", 0); |