aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
AgeCommit message (Collapse)AuthorFilesLines
2011-10-29re PR target/47997 (gcc on macosx: "ld: warning: -fwritable-strings not ↵Iain Sandoe2-3/+9
compatible with literal CF/NSString") gcc/objc: PR target/47997 * objc-act.c (objc_build_string_object): Remove redundant second call to fix_string_type (). Add a checking assert that we are, indeed, passed a STRING_CST. From-SVN: r180653
2011-10-18In gcc/objc/: 2011-10-18 Mikael Pettersson <mikpe@it.uu.se>Mikael Pettersson2-4/+12
In gcc/objc/: 2011-10-18 Mikael Pettersson <mikpe@it.uu.se> PR objc/50743 * objc-act.c (check_duplicates): Cast TREE_VEC_LENGTH result to size_t to avoid signed/unsigned comparison. (insert_method_into_method_map): Likewise. From-SVN: r180132
2011-10-14In gcc/: 2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero8-305/+742
In gcc/: 2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com> * gengtype.c (files_rules): Added rules for objc/objc-map.h and objc/objc-map.c. In gcc/objc/: 2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com> * objc-map.h: New file. * objc-map.c: New file. * config-lang.in (gtfiles): Added objc-map.h. * Make-lang.in (OBJC_OBJS): Added objc-map.o. (objc/objc-map.o): New rule. (objc/objc-act.o): Depend on objc/objc-map.h. * objc-next-runtime-abi-02.c: Added a TODO comment. * objc-act.c: Include objc-map.h. (nst_method_hash_list, cls_method_hash_list): Removed. (instance_method_map, class_method_map): New. (cls_name_hash_list, als_name_hash_list): Removed. (class_name_map, alias_name_map): Removed. (ivar_offset_hash_list): Removed. (hash_class_name_enter, hash_class_name_lookup, hash_enter, hash_lookup, hash_add_attr, add_method_to_hash_list): Removed. (interface_hash_init): New. (objc_init): Call interface_hash_init. (objc_write_global_declarations): Iterate over class_method_map and instance_method_map instead of cls_method_hash_list and nst_method_hash_list. (objc_declare_alias): Use alias_name_map instead of cls_name_hash_list. (objc_is_class_name): Use class_name_map and alias_name_map instead of cls_name_hash_list and als_name_hash_list. (interface_tuple, interface_htab, hash_interface, eq_interface): Removed. (interface_map): New. (add_class): Renamed to add_interface. Use interface_map instead of interface_htab. (lookup_interface): Use interface_map instead of interface_htab. (check_duplicates): Changed first argument to be a tree, potentially a TREE_VEC, instead of a hash. Changed implementation to match. (lookup_method_in_hash_lists): Use class_method_map and instance_method_map instead of cls_method_hash_list and nst_method_hash_list. (objc_build_selector_expr): Likewise. (hash_func): Removed. (hash_init): Create instance_method_map, class_method_map, class_name_map, and alias_name_map. Do not create nst_method_hash_list, cls_method_hash_list, cls_name_hash_list, als_name_hash_list, and ivar_offset_hash_list. (insert_method_into_method_map): New. (objc_add_method): Use insert_method_into_method_map instead of add_method_to_hash_list. (start_class): Call add_interface instead of add_class. * objc-act.h (cls_name_hash_list, als_name_hash_list, nst_method_hash_list, cls_method_hash_list): Removed. In gcc/objcp/: 2011-10-14 Nicola Pero <nicola.pero@meta-innovation.com> * Make-lang.in (OBJCXX_OBJS): Added objc-map.o. (objcp/objc-map.o): New rule. (objcp/objcp-act.o): Depend on objc/objc-map.h. * config-lang.in (gtfiles): Added objc-map.h. From-SVN: r179965
2011-10-11Convert standard builtin functions from being arrays to using a functional ↵Michael Meissner4-3/+14
interface From-SVN: r179820
2011-07-19tree.h (fold_build_pointer_plus_loc): New helper function.Richard Guenther2-3/+8
2011-07-19 Richard Guenther <rguenther@suse.de> * tree.h (fold_build_pointer_plus_loc): New helper function. (fold_build_pointer_plus_hwi_loc): Likewise. (fold_build_pointer_plus): Define. (fold_build_pointer_plus_hwi): Likewise. * builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus. (fold_builtin_memory_op): Likewise. (fold_builtin_stpcpy): Likewise. (fold_builtin_memchr): Likewise. (fold_builtin_strstr): Likewise. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (expand_builtin_memory_chk): Likewise. (fold_builtin_memory_chk): Likewise. * c-typeck.c (build_unary_op): Likewise. * cgraphunit.c (thunk_adjust): Likewise. * fold-const.c (build_range_check): Likewise. (fold_binary_loc): Likewise. * omp-low.c (extract_omp_for_data): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. * tree-affine.c (add_elt_to_tree): Likewise. * tree-data-ref.c (split_constant_offset_1): Likewise. * tree-loop-distribution.c (generate_memset_zero): Likewise. * tree-mudflap.c (mf_xform_derefs_1): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. (add_to_parts): Likewise. (create_mem_ref): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise. (number_of_iterations_le): Likewise. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise. * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise. (vect_create_addr_base_for_vector_ref): Likewise. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vrp.c (extract_range_from_assert): Likewise. * config/alpha/alpha.c (alpha_va_start): Likewise. (alpha_gimplify_va_arg_1): Likewise. * config/i386/i386.c (ix86_va_start): Likewise. (ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mep/mep.c (mep_expand_va_start): Likewise. (mep_gimplify_va_arg_expr): Likewise. * config/mips/mips.c (mips_va_start): Likewise. (mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start): Likewise. (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start): Likewise. (s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start): Likewise. (sh_gimplify_va_arg_expr): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_va_start): Likewise. (spu_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. (xstormy16_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_va_start): Likewise. (xtensa_gimplify_va_arg_expr): Likewise. c-family/ * c-common.c (pointer_int_sum): Use fold_build_pointer_plus. * c-omp.c (c_finish_omp_for): Likewise. cp/ * call.c (build_special_member_call): Use fold_build_pointer_plus. * class.c (build_base_path): Likewise. (convert_to_base_statically): Likewise. (dfs_accumulate_vtbl_inits): Likewise. * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise. * except.c (expand_start_catch_block): Likewise. * init.c (expand_virtual_init): Likewise. (build_new_1): Likewise. (build_vec_delete_1): Likewise. (build_vec_delete): Likewise. * rtti.c (build_headof): Likewise. (tinfo_base_init): Likewise. * typeck.c (get_member_function_from_ptrfunc): Likewise. (cp_build_addr_expr_1): Likewise. * typeck2.c (build_m_component_ref): Likewise. fortran/ * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus. (gfc_trans_string_copy): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise. * trans-types.c (gfc_get_array_descr_info): Likewise. * trans.c (gfc_build_array_ref): Likewise. java/ * builtins.c (static): Use fold_build_pointer_plus. * class.c (make_class_data): Likewise. (build_symbol_entry): Likewise. * except.c (build_exception_object_ref): Likewise. * expr.c (build_java_arrayaccess): Likewise. (build_field_ref): Likewise. (build_known_method_ref): Likewise. (build_invokevirtual): Likewise. objc/ * objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref): Use fold_build_pointer_plus. (objc2_build_ehtype_initializer): Likewise. From-SVN: r176461
2011-07-11In gcc/objc/: 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero7-61/+69
In gcc/objc/: 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com> * objc-encoding.h (obstack.h): Do not include. (util_obstack, util_firstobj): Do not declare. (encode_field_decl): Updated prototype to return a tree and take a single tree argument. Updated comments. * objc-encoding.c (util_obstack, util_firstobj): Made static. (objc_encoding_init): New. (encode_field_decl): Existing function renamed to encode_field and made static. New encode_field_decl wrapper function added. (encode_aggregate_fields): Update call to encode_field_decl to call encode_field. * objc-next-runtime-abi-02.c (obstack.h): Do not include. (util_obstack, util_firstobj): Do not declare. (build_v2_ivar_list_initializer): Updated call to encode_field_decl. * objc-runtime-shared-support.c (obstack.h): Do not include. (util_obstack, util_firstobj): Do not declare. (build_ivar_list_initializer): Updated call to encode_field_decl. * objc-act.c (objc_init): Use objc_encoding_init. * Make-lang.in (objc/objc-runtime-shared-support.o): Do not depend on OBSTACK_H. (objc/objc-gnu-runtime-abi-01.o): Likewise. (objc/objc-next-runtime-abi-01.o): Likewise. (objc/objc-next-runtime-abi-02.o): Likewise. (objc/objc-act.o): Likewise. In gcc/objcp/: 2011-07-11 Nicola Pero <nicola.pero@meta-innovation.com> * Make-lang.in (objcp/objc-runtime-shared-support.o): Do not depend on OBSTACK_H. (objcp/objc-gnu-runtime-abi-01.o): Likewise. (objcp/objc-next-runtime-abi-01.o): Likewise. (objcp/objc-next-runtime-abi-02.o): Likewise. (objcp/objcp-act.o): Likewise. From-SVN: r176139
2011-07-04In gcc/objc/: 2011-07-04 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero11-936/+1122
In gcc/objc/: 2011-07-04 Nicola Pero <nicola.pero@meta-innovation.com> Refactored encoding code into objc-encoding.h and objc-encoding.c. * objc-act.c (util_obstack, util_firstobj, encode_type_qualifiers, encode_type, generating_instance_variables, objc_method_parm_type, objc_encoded_type_size, encode_method_prototype, objc_build_encode_expr, pointee_is_readonly, encode_pointer, encode_array, encode_vector, encode_aggregate_fields, encode_aggregate_within, encode_next_bitfield, encode_gnu_bitfield, encode_field_decl, objc_v2_encode_property_attr): Moved to objc-encoding.h and objc-encoding.c. No change in the actual code. Include objc-encoding.h. (objc_init): Added TODO. (objc_build_property_setter_name): Made non-static so it can be called from objc-encoding.c. * objc-act.h (OBJC_ENCODE_INLINE_DEFS, OBJC_ENCODE_DONT_INLINE_DEFS): Moved to objc-encoding.h. * objc-runtime-shared-support.h (objc_v2_encode_property_attr, encode_method_prototype, encode_field_decl, generating_instance_variables): Moved to objc-encoding.h. (objc_build_property_setter_name): Declare. * objc-encoding.c: New. * objc-encoding.h: New. * objc-gnu-runtime-abi-01.c: Include objc-encoding.h. * objc-next-runtime-abi-01.c: Likewise. * objc-next-runtime-abi-02.c: Likewise. * objc-runtime-shared-support.c: Likewise. * Make-lang.in (OBJC_OBJS): Added objc-encoding.o. (objc/objc-lang.o): Reordered dependencies. (objc/objc-runtime-shared-support.o): Reordered dependencies. Added dependencies on objc-encoding.h and on $(GGC_H), $(DIAGNOSTIC_CORE_H), $(FLAGS_H) and input.h. (objc/objc-gnu-runtime-abi-01.o): Likewise. (objc/objc-next-runtime-abi-01.o): Likewise. (objc/objc-next-runtime-abi-02.o): Likewise. (objc/objc-act.o): Reordered dependencies. Added dependency on objc-encoding.h. (objc/objc-encoding.o): New rule. * objc-encoding.c (encode_type): Use "%<%T%>" format when printing warning "unknown type %<%T%> found during Objective-C encoding" instead of using gen_type_name. In gcc/objcp/: 2011-07-04 Nicola Pero <nicola.pero@meta-innovation.com> * Make-lang.in (OBJCXX_OBJS): Added objc-encoding.o. (objcp/objcp-lang.o): Reordered dependencies. Depend on GGC_H. (objcp/objcp-decl.o): Reordered dependencies. (objcp/objc-runtime-shared-support.o): Reordered dependencies. Updated them to be identical to the corresponding new objc/ ones, with the addition of objcp-decl.h. (objcp/objc-runtime-shared-support.o): Likewise. (objcp/objc-gnu-runtime-abi-01.o): Likewise. (objcp/objc-next-runtime-abi-01.o): Likewise. (objcp/objc-next-runtime-abi-02.o): Likewise. (objcp/objcp-act.o): Reordered dependencies. Added dependency on objc-encoding.h. (objcp/objc-encoding.o): New rule. From-SVN: r175797
2011-06-05In gcc/objc/: 2011-06-05 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-8/+51
In gcc/objc/: 2011-06-05 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (receiver_is_class_object): Expanded comment. (objc_finish_message_expr): Likewise. In gcc/testsuite/: 2011-06-05 Nicola Pero <nicola.pero@meta-innovation.com> PR testsuite/49287 * objc.dg/gnu-api-2-class.m: Updated testcase silencing compiler warning. * objc.dg/gnu-api-2-objc.m: Likewise. * obj-c++.dg/gnu-api-2-class.mm: Likewise * obj-c++.dg/gnu-api-2-objc.mm: Likewise. From-SVN: r174657
2011-06-02In gcc/objc/: 2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-29/+130
In gcc/objc/: 2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/48539 * objc-act.c (objc_finish_message_expr): Warn if messaging a class that was only declared using @class without an @interface. Warn if messaging an instance of a class that was only declared using @class without an @interface, unless the receiver was also typed with a protocol list. In gcc/testsuite/: 2011-06-02 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/48539 * objc.dg/method-5.m: Updated. * objc.dg/method-19.m: Updated. * objc.dg/method-lookup-1.m: New. * obj-c++.dg/method-6.mm: Updated. * obj-c++.dg/method-7.mm: Updated. * obj-c++.dg/method-lookup-1.mm: New. From-SVN: r174575
2011-06-01In gcc/objc/: 2011-06-01 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-0/+47
In gcc/objc/: 2011-06-01 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_decl_method_attributes): Implement nonnull attribute for Objective-C methods. In gcc/testsuite/: 2011-06-01 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/attributes/method-nonnull-1.m: New test. * obj-c++.dg/attributes/method-nonnull-1.mm: New test. From-SVN: r174520
2011-05-21In gcc/objc/: 2011-05-21 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-1/+10
In gcc/objc/: 2011-05-21 Nicola Pero <nicola.pero@meta-innovation.com> * config-lang.in (gtfiles): Updated order of files to fix building when the gcc/cp directory is missing, as in the case of some release tarballs. From-SVN: r173998
2011-05-20remove some TYPE_ARG_TYPES usage in objc/Nathan Froyd2-7/+29
remove some TYPE_ARG_TYPES usage in objc/ * objc-act.c (objc_compare_types): Use function_args_iterator instead of TYPE_ARG_TYPES to compare function argument types. From-SVN: r173977
2011-05-13objc-next-runtime-abi-02.c (newabi_append_ro): Add const qualifier to ↵Toon Moene2-1/+6
constant variable pointer declaration. 2011-05-13 Toon Moene <toon@moene.org> * objc-next-runtime-abi-02.c (newabi_append_ro): Add const qualifier to constant variable pointer declaration. From-SVN: r173723
2011-05-11split tree_typeNathan Froyd2-7/+13
split tree_type gcc/ada/ * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE): Use TYPE_MINVAL. (TYPE_GCC_MIN_VALUE): Use TYPE_MINVAL. (TYPE_GCC_MAX_VALUE): Use TYPE_MAXVAL. gcc/cp/ * cp-tree.h (TYPENAME_TYPE_FULLNAME, TYPEOF_TYPE_EXPR): Use TYPE_VALUES_RAW. (UNDERLYING_TYPE_TYPE, DECLTYPE_TYPE_EXPR): Likewise. (DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): Likewise. (TEMPLATE_TYPE_PARM_INDEX): Likewise. gcc/ * ggc-page.c (extra_order_size_table): Use struct tree_type_non_common. * lto-streamer-in.c (unpack_ts_type_value_fields): Rename to... (unpack_ts_type_common_value_fields): ...this. Update comment. (unpack_value_fields): Adjust for renaming. (lto_input_ts_type_tree_pointers): Split into... (lto_input_ts_type_common_tree_pointer): ...this and... (lto_input_ts_type_non_common_tree_pointers): ...this. (lto_input_tree_pointers): Adjust for above split. * lto-streamer-out.c (pack_ts_type_value_fields): Rename to... (pack_ts_type_common_value_fields): ...this. Update comment. (lto_output_ts_type_tree_pointers): Split into... (lto_output_ts_type_common_tree_pointers): ...this and... (lto_output_ts_type_non_common_tree_pointers): ...this. (lto_output_tree_pointers): Adjust for above split. * lto-streamer.c (check_handled_ts_structures): Mark TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, and TS_TYPE_NON_COMMON as handled. * stor-layout.c (vector_type_mode): Adjust location of mode field. * tree.h (MARK_TS_TYPE_COMMON, MARK_TS_TYPE_WITH_LANG_SPECIFIC): Define. (struct tree_type): Split into... (struct tree_type_common: ...this and... (struct tree_type_with_lang_specific): ...this and... (struct tree_type_non_common): ...this. Adjust accessor macros accordingly. (TYPE_VALUES_RAW): Define. (union tree_node): Update for above changes. * tree.c (tree_node_structure_for_code) [tcc_type]: Return TS_TYPE_NON_COMMON. (initialize_tree_contains_struct) [TS_TYPE]: Use TS_TYPE_COMMON. Add TS_TYPE_WITH_LANG_SPECIFIC and TS_TYPE_NON_COMMON. (tree_code_size) [tcc_type]: Use struct tree_type_non_common. * treestructu.def (TS_TYPE): Remove. (TS_TYPE_COMMON, TS_TYPE_WITH_LANG_SPECIFIC, TS_TYPE_NON_COMMON): Define. gcc/java/ * java-tree.h (TYPE_ARGUMENT_SIGNATURE): Use TYPE_MINVAL. gcc/lto/ * lto.c (lto_ft_type): Use TYPE_MINVAL and TYPE_MAXVAL. Adjust location of binfo field. (lto_fixup_prevailing_decls): Likewise. gcc/objc/ * objc-act.h (CLASS_NAME, CLASS_SUPER_NAME): Use proper accessors. (CLASS_NST_METHODS, CLASS_CLS_METHODS): Likewise. (PROTOCOL_NAME, PROTOCOL_NST_METHODS, PROTOCOL_CLS_METHODS): Likewise. From-SVN: r173658
2011-05-06don't use build_function_type in the ObjC/C++ frontendsNathan Froyd8-109/+144
don't use build_function_type in the ObjC/C++ frontends * objc-runtime-shared-support.h (get_arg_type_list): Delete. (build_function_type_for_method): Declare. * objc-runtime-hooks.h (struct _objc_runtime_hooks_r): Change type of get_arg_type_base_list field. * objc-act.h (OBJC_VOID_AT_END): Delete. * objc-act.c (get_arg_type_list): Delete. (build_function_type_for_method): New function. (objc_decl_method_attributes): Call build_function_type_for_method. (really_start_method): Likewise. * objc-gnu-runtime-abi-01.c (gnu_runtime_abi_01_get_type_arg_list_base): Change prototype and adjust function accordingly. Update header comment. (build_objc_method_call): Call build_function_type_for_method. * objc-next-runtime-abi-01.c (next_runtime_abi_01_get_type_arg_list_base): Change prototype and adjust function accordingly. Update header comment. (build_objc_method_call): Call build_function_type_for_method. * objc-next-runtime-abi-02.c (next_runtime_abi_02_get_type_arg_list_base): Change prototype and adjust function accordingly. Update header comment. (objc_copy_to_temp_side_effect_params): Take fntype instead of a typelist. Use function_args_iterator for traversing fntype. (build_v2_build_objc_method_call): Adjust call to it. Call build_function_type_for_method From-SVN: r173465
2011-05-05c-decl.c (finish_decl): Don't call get_pending_sizes.Joseph Myers4-15/+39
* c-decl.c (finish_decl): Don't call get_pending_sizes. (grokparm): Add parameter expr. Pass it to grokdeclarator. (push_parm_decl): Add parameter expr. Pass it to grokdeclarator. (c_variable_size): Remove. (grokdeclarator): Use save_expr instead of c_variable_size. Don't call put_pending_sizes. (get_parm_info): Add parameter expr. Use it to set arg_info->pending_sizes. (store_parm_decls): Use arg_info->pending_sizes instead or calling get_pending_sizes. * c-parser.c (c_parser_parms_declarator): Update call to c_parser_parms_list_declarator. (c_parser_parms_list_declarator): Take parameter expr. Update call to push_parm_decl. Update recursive call. Don't call get_pending_sizes. Update calls to get_parm_info. (c_parser_objc_method_definition): Update calls to c_parser_objc_method_decl and objc_start_method_definition. (c_parser_objc_methodproto): Update call to c_parser_objc_method_decl. (c_parser_objc_method_decl): Add parameter expr. Update call to grokparm. (c_parser_objc_try_catch_finally_statement): Update call to grokparm. * c-tree.h (struct c_arg_info.pending_sizes): Change to a tree. (get_parm_info, grokparm, push_parm_decl): Update prototypes. c-family: * c-objc.h (objc_start_method_definition): Update prototype. * stub-objc.c (objc_start_method_definition): Add extra parameter. cp: * parser.c (cp_parser_objc_method_definition_list): Update call to objc_start_method_definition. objc: * objc-act.c (objc_start_method_definition): Add parameter expr. Update call to start_method_def. (objc_generate_cxx_ctor_or_dtor, objc_synthesize_getter, objc_synthesize_setter) Update calls to objc_start_method_definition. (objc_get_parm_info): Add parameter expr. Update call to get_parm_info. (start_method_def): Add parameter expr. Update call to objc_get_parm_info. * objc-gnu-runtime-abi-01.c (build_module_initializer_routine): Update call to objc_get_parm_info. * objc-runtime-shared-support.h (objc_get_parm_info): Add extra parameter. From-SVN: r173422
2011-05-04Fixup whitespacing.Mike Stump13-835/+835
From-SVN: r173388
2011-04-26objc-act.c (objc_fold_objc_type_ref): Remove.Jason Merrill3-28/+5
* objc-act.c (objc_fold_objc_type_ref): Remove. * objc-act.h: Remove prototype. From-SVN: r172986
2011-04-21objc-act.c (synth_module_prologue): Call build_function_type_list instead of ↵Nathan Froyd3-7/+12
build_function_type. * objc-act.c (synth_module_prologue): Call build_function_type_list instead of build_function_type. * objc-next-runtime-abi-02.c (next_runtime_02_initialize): Likewise. From-SVN: r172844
2011-04-15In gcc/objc/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-1/+35
In gcc/objc/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (ivar_of_class): New. (objc_is_public): Use ivar_of_class. From-SVN: r172523
2011-04-15In gcc/c-family/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-9/+241
In gcc/c-family/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> * c-objc.h (objc_get_interface_ivars): Removed. (objc_detect_field_duplicates): New. * stub-objc.c: Likewise. In gcc/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> * c-decl.c (detect_field_duplicates): Call objc_detect_field_duplicates instead of objc_get_interface_ivars. In gcc/objc/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_get_interface_ivars): Removed. (objc_detect_field_duplicates): New. (hash_instance_variable): New. (eq_instance_variable): New. In gcc/objcp/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> * objcp-decl.c (objcp_finish_struct): Use objc_detect_field_duplicates instead of having a local implementation. In gcc/testsuite/: 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/naming-4.m: Updated. * objc.dg/naming-5.m: Updated. * objc.dg/naming-6.m: New. * objc.dg/naming-7.m: New. * obj-c++.dg/naming-1.mm: Updated. * obj-c++.dg/naming-2.mm: Updated. * obj-c++.dg/naming-3.mm: New. * obj-c++.dg/naming-4.mm: New. From-SVN: r172511
2011-04-14In gcc/c-family/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-23/+25
In gcc/c-family/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> * stub-objc.c (objc_declare_protocols): Renamed to objc_declare_protocol. * c-objc.h: Likewise. In gcc/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_protocol_definition): Updated for change from objc_declare_protocols() to objc_declare_protocol(). In gcc/objc/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_declare_protocols): Renamed to objc_declare_protocol. Changed first argument to be an identifier instead of a tree chain of identifiers, so that callers don't have to create a temporary tree chain. In gcc/cp/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_protocol_declaration): Updated for change from objc_declare_protocols() to objc_declare_protocol(). From-SVN: r172444
2011-04-14In gcc/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-32/+33
In gcc/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_objc_class_declaration): Updated call to objc_declare_class. In gcc/c-family/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> * stub-objc.c (objc_declare_class): Updated argument name. In gcc/cp/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_class_declaration): Updated for change in objc_declare_class(). In gcc/objc/: 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_declare_class): Changed to take a single identifier as argument instead of a tree list. This means callers don't have to build temporary tree lists to call this function. (synth_module_prologue): Updated calls to objc_declare_class. From-SVN: r172425
2011-04-13In gcc/objc/: 2011-04-13 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-1/+6
In gcc/objc/: 2011-04-13 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (build_keyword_selector): Use get_identifier_with_length instead of get_identifier. From-SVN: r172360
2011-04-13ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling ↵Nathan Froyd4-31/+26
TREE_CHAIN. gcc/ada/ * gcc-interface/ada-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * gcc-interface/misc.c (gnat_init_ts): New function. (LANG_HOOKS_INIT_TS): Define. gcc/ * c-decl.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * print-tree.c (print_node): Likewise. * tree-inline.c (copy_tree_r): Likewise. * c-lang.c (LANG_HOOKS_INIT_TS): Define. * lto-streamer-in.c (lto_input_tree_pointers): Check for TS_TYPED instead of TS_COMMON. * lto-streamer-out.c (lto_output_tree_pointers): Likewise. * tree.c (initialize_tree_contains_struct): Handle TS_TYPED. (copy_node_stat): Zero TREE_CHAIN only if necessary. (MARK_TS_BASE, MARK_TS_TYPED, MARK_TS_COMMON): Move these... (MARK_TS_DECL_COMMON, MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL): ...and these... (MARK_TS_DECL_WITH_VIS, MARK_TS_DECL_NON_COMMON): ...and these... * tree.h: ...here. (TREE_CHAIN): Check for a TS_COMMON structure. (TREE_TYPE): Check for a TS_TYPED structure. gcc/c-family/ * c-common.h (c_common_init_ts): Declare. * c-common.c (c_common_init_ts): Define. gcc/cp/ * cp-lang.c (cp_init_ts): Call cp_common_init_ts. Move tree_contains_struct initialization to... * cp-objcp-common.c (cp_common_init_ts): ...here. Use MARK_* macros. * cp-objcp-common.h (cp_common_init_ts): Declare. * cp-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/fortran/ * f95-lang.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/go/ * go-lang.c (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/java/ * java-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. gcc/lto/ * lto-tree.h (union lang_tree_node): Check for TS_COMMON before calling TREE_CHAIN. * lto.c (lto_fixup_common): Likewise. gcc/objc/ * objc-lang.c (objc_init_ts): Move code for this function... * objc-act.c (objc_common_init_ts): ...here. Define. * objc-act.h (objc_common_init_ts): Declare. gcc/objcp/ * objcp-lang.c (objcxx_init_ts): Call objc_common_init_ts and cp_common_init_ts. From-SVN: r172359
2011-04-12In gcc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-5/+10
In gcc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_parser_initelt): Updated call to objc_build_message_expr. (c_parser_postfix_expression): Likewise. In gcc/c-family/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> * c-objc.h (objc_build_message_expr): Updated prototype. * stub-objc.c (objc_build_message_expr): Likewise. In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_build_message_expr): Accept two arguments instead of one so that callers can simply pass the arguments without having to create a temporary chain to hold them. In gcc/cp/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> * parser.c (cp_parser_objc_message_expression): Updated call to objc_build_message_expr. From-SVN: r172338
2011-04-12In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-28/+84
In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (comp_proto_with_proto): Do not create and use inefficient temporary argument lists. Compare the arguments directly. (match_proto_with_proto): Removed; incorporated into comp_proto_with_proto (). From-SVN: r172337
2011-04-12In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-7/+24
In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (printable_ivar_name): New. (add_instance_variable): Call printable_ivar_name() when an error message needs to be printed. Do not prepare the instance variable for printing unless there is an actual error. From-SVN: r172328
2011-04-12In gcc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-6/+18
In gcc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> * c-parser.c (c_lex_one_token): Rewritten conditional used when compiling Objective-C to be more efficient. In gcc/objc/: 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_is_class_name, objc_is_id): For efficiency, avoid calling identifier_global_value() multiple times. From-SVN: r172327
2011-04-12cgraph.h (cgraph_node): Remove function declaration.Martin Jambor2-2/+9
2011-04-12 Martin Jambor <mjambor@suse.cz> * cgraph.h (cgraph_node): Remove function declaration. (cgraph_create_node): Declare. (cgraph_get_create_node): Likewise. * cgraph.c (cgraph_create_node): Renamed to cgraph_create_node_1. Updated all callers. (cgraph_node): Renamed to cgraph_create_node, assert that a node for the decl does not already exist. Call cgraph_get_create_node instead of cgraph_node. (cgraph_get_create_node): New function. (cgraph_same_body_alias): Update comment. (cgraph_set_call_stmt): Call cgraph_get_node instead of cgraph_node, assert it does not return NULL. (cgraph_update_edges_for_call_stmt): Likewise. (cgraph_clone_edge): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_update_edges_for_call_stmt_node): Call cgraph_get_create_node instead of cgraph_node. (cgraph_add_new_function): Call cgraph_create_node or cgraph_get_create_node instead of cgraph_node. * cgraphbuild.c (record_reference): Call cgraph_get_create_node instead of cgraph_node. (record_eh_tables): Likewise. (mark_address): Likewise. (mark_load): Likewise. (build_cgraph_edges): Call cgraph_get_create_node instead of cgraph_node. (rebuild_cgraph_edges): Likewise. * cgraphunit.c (cgraph_finalize_function): Call cgraph_get_create_node instead of cgraph_node. (cgraph_copy_node_for_versioning): Call cgraph_create_node instead of cgraph_node. * lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Call cgraph_create_node instead of cgraph_node. * c-decl.c (finish_function): Call cgraph_get_create_node instead of cgraph_node. * lto-cgraph.c (input_node): Likewise. * lto-streamer-in.c (input_function): Likewise. * varasm.c (mark_decl_referenced): Likewise. (assemble_alias): Likewise. gcc/c-family/ * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead of cgraph_node. gcc/cp/ * cp/class.c (cp_fold_obj_type_ref): Call cgraph_get_create_node instead of cgraph_node. * cp/decl2.c (cxx_callgraph_analyze_expr): Likewise. (cp_write_global_declarations): Likewise. * cp/optimize.c (maybe_clone_body): Likewise. * cp/semantics.c (maybe_add_lambda_conv_op): Likewise. * cp/mangle.c (mangle_decl): Likewise. * cp/method.c (make_alias_for_thunk): Likewise. (use_thunk): Likewise. gcc/ada/ * gcc-interface/utils.c (end_subprog_body): Call cgraph_get_create_node instead of cgraph_node. gcc/fortran/ * trans-decl.c (gfc_generate_function_code): Call cgraph_get_create_node instead of cgraph_node. gcc/objc/ * objc-act.c (mark_referenced_methods): Call cgraph_get_create_node instead of cgraph_node. From-SVN: r172307
2011-04-10Remove doubled up words.Mike Stump1-1/+1
From-SVN: r172247
2011-04-06tm.texi.in: Document C target hooks as separate from general target hooks.Joseph Myers3-2/+8
* doc/tm.texi.in: Document C target hooks as separate from general target hooks. * doc/tm.texi: Regenerate. * genhooks.c (struct hook_desc): Add docname field. (HOOK_VECTOR_1, DEFHOOKPOD, DEFHOOK, DEFHOOK_UNDOC). Initialize docname field. (hook_array): Include c-target.def. (emit_documentation): Use docname field in output. (emit_init_macros): Take docname argument. Only emit definitions for hooks matching docname. (main): Expect additional arguments in all cases. Pass argument to emit_init_macros. * target.def: Move initial macro definitions and comments to target-hooks-macros.h. (gcc_targetcm): Move to c-family/c-target.def. * target.h (targetcm): Move declaration to c-family/c-target.h. * targhooks.c (default_handle_c_option): Move to c-family/c-opts.c. * targhooks.h (default_handle_c_option): Move declaration to c-family/c-common.h. * target-hooks-macros.h: New file. * config.gcc (target_has_targetcm): Define and use to add to c_target_objs and cxx_target_objs. * config/default-c.c: New file. * config/darwin-c.c: Include c-target.h and c-target-def.h instead of target.h and target-def.h. (TARGET_HANDLE_C_OPTION, targetcm): Define later in file. (darwin_objc_construct_string, darwin_cfstring_ref_p, darwin_check_cfstring_format_arg): Make static. (TARGET_OBJC_CONSTRUCT_STRING_OBJECT, TARGET_STRING_OBJECT_REF_TYPE_P, TARGET_CHECK_STRING_OBJECT_FORMAT_ARG): Define here. * config/darwin-protos.h (darwin_objc_construct_string, darwin_cfstring_ref_p, darwin_check_cfstring_format_arg): Don't declare. * config/darwin.h (TARGET_OBJC_CONSTRUCT_STRING_OBJECT, TARGET_STRING_OBJECT_REF_TYPE_P, TARGET_CHECK_STRING_OBJECT_FORMAT_ARG, TARGET_HAS_TARGETCM): Remove. * config/t-darwin (darwin-c.o): Update dependencies. * system.h (TARGET_HAS_TARGETCM): Poison. * Makefile.in (TARGET_H): Update. (TARGET_DEF, C_TARGET_DEF, C_TARGET_H, C_TARGET_DEF_H): Define. (c-family/c-format.o, c-family/c-opts.o): Update dependencies. (default-c.o): New target. (s-target-hooks-def-h): Pass "Target Hook" string to genhooks. (c-family/c-target-hooks-def.h, s-c-target-hooks-def-h): New targets. (s-tm-texi): Pass -d option to genhooks. Also test timestamp on c-target.def. (build/genhooks.o): Update dependencies. c-family: * c-target-def.h: New file. * c-target.def: New file. * c-target.h: New file. * c-common.c (targetcm): Don't define here. * c-common.h (default_handle_c_option): Declare. * c-format.c: Include c-target.h instead of target.h. * c-opts.c: Include c-target.h instead of target.h. Explicitly include tm.h. (default_handle_c_option): Move from targhooks.c. objc: * objc-act.c: Include c-target.h instead of target.h. * Make-lang.in (objc/objc-act.o): Update dependencies. From-SVN: r172035
2011-03-06lang-specs.h: Match -save-temps* instead of -save-temps.Joseph Myers2-6/+10
cp: * lang-specs.h: Match -save-temps* instead of -save-temps. objc: * lang-specs.h: Match -save-temps* instead of -save-temps. objcp * lang-specs.h: Match -save-temps* instead of -save-temps. From-SVN: r170715
2011-02-26Implemented encoding property types for new ObjC ABIsNicola Pero2-21/+58
From-SVN: r170516
2011-02-23Removed conflict in usage of TYPE_LANG_SLOT_0 between Objective-C and CNicola Pero3-6/+8
From-SVN: r170436
2011-02-22Fixed check for flexible array members used in Objective-C instance variablesNicola Pero2-24/+102
From-SVN: r170412
2011-02-22* Make-lang.in (check_objc_parallelize): Refine for 4 processor machines.Mike Stump2-2/+5
From-SVN: r170391
2011-02-20Fixed ChangeLog dates of my last two commitsNicola Pero1-2/+2
From-SVN: r170344
2011-02-20Reverted usage of TARGET_64BIT for code generation for GNU Objective-C runtimeNicola Pero3-19/+26
From-SVN: r170343
2011-02-20Fixed Objective-C dotsyntax with a constant type right-hand sideNicola Pero2-27/+55
From-SVN: r170342
2011-02-19Updated commentsNicola Pero3-285/+336
From-SVN: r170308
2011-02-19Updated comments in objc-act.cNicola Pero2-3/+25
From-SVN: r170299
2011-02-19Updated comments - no change in codeNicola Pero7-52/+76
From-SVN: r170298
2011-02-19Do no emit GNU metadata if there is nothing to put into itNicola Pero2-5/+22
From-SVN: r170292
2011-02-18Added support for the 64-bit Apple Objective-C runtimeIain Sandoe13-4613/+11460
From-SVN: r170260
2011-01-17In gcc/objc/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com>Nicola Pero2-1/+7
In gcc/objc/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47314 * objc-act.c (finish_objc): When calling check_duplicates to check duplicated instance methods, set 'is_class' to 0, not 1. In gcc/testsuite/: 2011-01-17 Nicola Pero <nicola.pero@meta-innovation.com> PR objc/47314 * objc.dg/selector-warn-1.m: New. * obj-c++.dg/selector-warn-1.mm: New. From-SVN: r168934
2011-01-14re PR target/19162 (ICE while building libobjc's sendmsg.c)Mike Stump1-0/+1
PR 19162 * objc-act.c (generate_struct_by_value_array): Do not output a definition for struct_forward_array. From-SVN: r168824
2011-01-14objc-act.c (generate_struct_by_value_array): Do not output a definition for ↵Ben Elliston2-9/+6
struct_forward_array. 2011-01-14 Ben Elliston <bje@au.ibm.com> * objc-act.c (generate_struct_by_value_array): Do not output a definition for struct_forward_array. From-SVN: r168823
2011-01-08update gcc/objc/Changelog copyright years.Iain Sandoe1-1/+2
From-SVN: r168603
2011-01-08objc-act.c (objc_finish_foreach_loop): Mark collection expression as read.Iain Sandoe2-0/+7
gcc/objc: * objc-act.c (objc_finish_foreach_loop): Mark collection expression as read. gcc/testsuite: * objc.dg/foreach-1.m: Add "-Wall" to flags. From-SVN: r168602