diff options
author | Ian Lance Taylor <iant@golang.org> | 2022-02-11 15:02:44 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2022-02-11 15:02:44 -0800 |
commit | 9a510fb0970d3d9a4201bce8965cabe67850386b (patch) | |
tree | 43d7fd2bbfd7ad8c9625a718a5e8718889351994 /gcc/objc | |
parent | a6d3012b274f38b20e2a57162106f625746af6c6 (diff) | |
parent | 8dc2499aa62f768c6395c9754b8cabc1ce25c494 (diff) | |
download | gcc-9a510fb0970d3d9a4201bce8965cabe67850386b.zip gcc-9a510fb0970d3d9a4201bce8965cabe67850386b.tar.gz gcc-9a510fb0970d3d9a4201bce8965cabe67850386b.tar.bz2 |
Merge from trunk revision 8dc2499aa62f768c6395c9754b8cabc1ce25c494
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/ChangeLog | 67 | ||||
-rw-r--r-- | gcc/objc/Make-lang.in | 8 | ||||
-rw-r--r-- | gcc/objc/config-lang.in | 4 | ||||
-rw-r--r-- | gcc/objc/lang-specs.h | 4 | ||||
-rw-r--r-- | gcc/objc/objc-act.cc (renamed from gcc/objc/objc-act.c) | 25 | ||||
-rw-r--r-- | gcc/objc/objc-act.h | 6 | ||||
-rw-r--r-- | gcc/objc/objc-encoding.cc (renamed from gcc/objc/objc-encoding.c) | 2 | ||||
-rw-r--r-- | gcc/objc/objc-encoding.h | 2 | ||||
-rw-r--r-- | gcc/objc/objc-gnu-runtime-abi-01.cc (renamed from gcc/objc/objc-gnu-runtime-abi-01.c) | 7 | ||||
-rw-r--r-- | gcc/objc/objc-lang.cc (renamed from gcc/objc/objc-lang.c) | 4 | ||||
-rw-r--r-- | gcc/objc/objc-map.cc (renamed from gcc/objc/objc-map.c) | 4 | ||||
-rw-r--r-- | gcc/objc/objc-map.h | 2 | ||||
-rw-r--r-- | gcc/objc/objc-next-metadata-tags.h | 4 | ||||
-rw-r--r-- | gcc/objc/objc-next-runtime-abi-01.cc (renamed from gcc/objc/objc-next-runtime-abi-01.c) | 17 | ||||
-rw-r--r-- | gcc/objc/objc-next-runtime-abi-02.cc (renamed from gcc/objc/objc-next-runtime-abi-02.c) | 16 | ||||
-rw-r--r-- | gcc/objc/objc-runtime-hooks.h | 2 | ||||
-rw-r--r-- | gcc/objc/objc-runtime-shared-support.cc (renamed from gcc/objc/objc-runtime-shared-support.c) | 13 | ||||
-rw-r--r-- | gcc/objc/objc-runtime-shared-support.h | 4 | ||||
-rw-r--r-- | gcc/objc/objc-tree.def | 2 |
19 files changed, 119 insertions, 74 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 51b2103..fe5c9c8 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,68 @@ +2022-01-17 Martin Liska <mliska@suse.cz> + + * Make-lang.in: Rename .c names to .cc. + * config-lang.in: Likewise. + * lang-specs.h: Likewise. + * objc-act.cc (objc_build_component_ref): Likewise. + (objc_copy_binfo): Likewise. + (lookup_method_in_hash_lists): Likewise. + (objc_finish_foreach_loop): Likewise. + * objc-act.h (objc_common_init_ts): Likewise. + * objc-gnu-runtime-abi-01.cc: Likewise. + * objc-lang.cc (struct lang_hooks): Likewise. + * objc-map.cc: Likewise. + * objc-next-runtime-abi-01.cc (generate_objc_symtab_decl): Likewise. + * objc-runtime-shared-support.cc: Likewise. + * objc-runtime-shared-support.h (build_protocol_initializer): Likewise. + +2022-01-17 Martin Liska <mliska@suse.cz> + + * objc-act.c: Moved to... + * objc-act.cc: ...here. + * objc-encoding.c: Moved to... + * objc-encoding.cc: ...here. + * objc-gnu-runtime-abi-01.c: Moved to... + * objc-gnu-runtime-abi-01.cc: ...here. + * objc-lang.c: Moved to... + * objc-lang.cc: ...here. + * objc-map.c: Moved to... + * objc-map.cc: ...here. + * objc-next-runtime-abi-01.c: Moved to... + * objc-next-runtime-abi-01.cc: ...here. + * objc-next-runtime-abi-02.c: Moved to... + * objc-next-runtime-abi-02.cc: ...here. + * objc-runtime-shared-support.c: Moved to... + * objc-runtime-shared-support.cc: ...here. + +2022-01-11 Jakub Jelinek <jakub@redhat.com> + + PR c++/101597 + * objc-act.c (objc_rewrite_function_call): Build OBJ_TYPE_REF + with INTEGER_CST OBJ_TYPE_REF_TOKEN with type equal to + OBJ_TYPE_REF_OBJECT type. + * objc-next-runtime-abi-01.c (build_objc_method_call): Likewise. + * objc-gnu-runtime-abi-01.c (build_objc_method_call): Likewise. + * objc-next-runtime-abi-02.c (build_v2_objc_method_fixup_call, + build_v2_build_objc_method_call): Likewise. + +2021-12-05 Iain Sandoe <iain@sandoe.co.uk> + + * objc-next-metadata-tags.h (objc_rt_trees): Declare here. + * objc-next-runtime-abi-01.c: Remove from here. + * objc-next-runtime-abi-02.c: Likewise. + * objc-runtime-shared-support.c: Reorder headers, provide + a GTY declaration the definition of objc_rt_trees. + +2021-11-30 Richard Biener <rguenther@suse.de> + + * objc-act.c (objc_build_setter_call): Remove unreachable + return. + +2021-11-29 Eric Gallager <egallager@gcc.gnu.org> + + PR other/103021 + * Make-lang.in: Use ETAGS variable in TAGS target. + 2021-10-22 Eric Gallager <egallager@gcc.gnu.org> PR other/102663 @@ -4153,7 +4218,7 @@ Move to c-objc-common.h. -Copyright (C) 2004-2021 Free Software Foundation, Inc. +Copyright (C) 2004-2022 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff --git a/gcc/objc/Make-lang.in b/gcc/objc/Make-lang.in index d3f99c8..6e4ebf5 100644 --- a/gcc/objc/Make-lang.in +++ b/gcc/objc/Make-lang.in @@ -1,5 +1,5 @@ # Top level -*- makefile -*- fragment for GNU Objective-C -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2022 Free Software Foundation, Inc. #This file is part of GCC. @@ -60,7 +60,7 @@ objc_OBJS = $(OBJC_OBJS) cc1obj-checksum.o # compute checksum over all object files and the options # re-use the checksum from the prev-final stage so it passes # the bootstrap comparison and allows comparing of the cc1 binary -cc1obj-checksum.c : build/genchecksum$(build_exeext) checksum-options \ +cc1obj-checksum.cc : build/genchecksum$(build_exeext) checksum-options \ $(OBJC_OBJS) $(C_AND_OBJC_OBJS) $(BACKEND) $(LIBDEPS) if [ -f ../stage_final ] \ && cmp -s ../stage_current ../stage_final \ @@ -102,8 +102,8 @@ objc.srcman: objc.install-plugin: objc.tags: force - cd $(srcdir)/objc; etags -o TAGS.sub *.c *.h; \ - etags --include TAGS.sub --include ../TAGS.sub + cd $(srcdir)/objc; $(ETAGS) -o TAGS.sub *.c *.h; \ + $(ETAGS) --include TAGS.sub --include ../TAGS.sub lang_checks += check-objc diff --git a/gcc/objc/config-lang.in b/gcc/objc/config-lang.in index a9a66d4..8cf3524 100644 --- a/gcc/objc/config-lang.in +++ b/gcc/objc/config-lang.in @@ -1,5 +1,5 @@ # Top level configure fragment for GNU Objective-C -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2022 Free Software Foundation, Inc. #This file is part of GCC. @@ -35,4 +35,4 @@ lang_requires="c" # Order is important. If you change this list, make sure you test # building without C++ as well; that is, remove the gcc/cp directory, # and build with --enable-languages=c,objc. -gtfiles="\$(srcdir)/objc/objc-map.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/objc/objc-act.h \$(srcdir)/objc/objc-act.c \$(srcdir)/objc/objc-runtime-shared-support.c \$(srcdir)/objc/objc-gnu-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-01.c \$(srcdir)/objc/objc-next-runtime-abi-02.c \$(srcdir)/c/c-parser.h \$(srcdir)/c/c-parser.c \$(srcdir)/c/c-tree.h \$(srcdir)/c/c-decl.c \$(srcdir)/c/c-lang.h \$(srcdir)/c/c-objc-common.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-cppbuiltin.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/c-family/c-format.c" +gtfiles="\$(srcdir)/objc/objc-map.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/objc/objc-act.h \$(srcdir)/objc/objc-act.cc \$(srcdir)/objc/objc-runtime-shared-support.cc \$(srcdir)/objc/objc-gnu-runtime-abi-01.cc \$(srcdir)/objc/objc-next-runtime-abi-01.cc \$(srcdir)/objc/objc-next-runtime-abi-02.cc \$(srcdir)/c/c-parser.h \$(srcdir)/c/c-parser.cc \$(srcdir)/c/c-tree.h \$(srcdir)/c/c-decl.cc \$(srcdir)/c/c-lang.h \$(srcdir)/c/c-objc-common.cc \$(srcdir)/c-family/c-common.cc \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-cppbuiltin.cc \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.cc \$(srcdir)/c-family/c-format.cc" diff --git a/gcc/objc/lang-specs.h b/gcc/objc/lang-specs.h index e243d8b..1a785ac 100644 --- a/gcc/objc/lang-specs.h +++ b/gcc/objc/lang-specs.h @@ -1,5 +1,5 @@ /* Definitions for specs for Objective-C. - Copyright (C) 1998-2021 Free Software Foundation, Inc. + Copyright (C) 1998-2022 Free Software Foundation, Inc. This file is part of GCC. @@ -18,7 +18,7 @@ along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>. */ -/* This is the contribution to the `default_compilers' array in gcc.c +/* This is the contribution to the `default_compilers' array in gcc.cc for objc. */ {".m", "@objective-c", 0, 0, 0}, diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.cc index 9baa46d..252274c 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.cc @@ -1,5 +1,5 @@ /* Implement classes and message passing for Objective C. - Copyright (C) 1992-2021 Free Software Foundation, Inc. + Copyright (C) 1992-2022 Free Software Foundation, Inc. Contributed by Steve Naroff. This file is part of GCC. @@ -1904,9 +1904,6 @@ objc_build_setter_call (tree lhs, tree rhs) setter_argument, NULL); return setter; } - - /* Unreachable, but the compiler may not realize. */ - return error_mark_node; } /* This hook routine is called when a MODIFY_EXPR is being built. We @@ -2820,7 +2817,7 @@ objc_build_component_ref (tree datum, tree component) } /* Recursively copy inheritance information rooted at BINFO. To do this, - we emulate the song and dance performed by cp/tree.c:copy_binfo(). */ + we emulate the song and dance performed by cp/tree.cc:copy_binfo(). */ static tree objc_copy_binfo (tree binfo) @@ -2847,7 +2844,7 @@ objc_copy_binfo (tree binfo) } /* Record superclass information provided in BASETYPE for ObjC class REF. - This is loosely based on cp/decl.c:xref_basetypes(). */ + This is loosely based on cp/decl.cc:xref_basetypes(). */ static void objc_xref_basetypes (tree ref, tree basetype) @@ -5493,7 +5490,7 @@ lookup_method_in_hash_lists (tree sel_name, int is_class) /* The 'objc_finish_message_expr' routine is called from within 'objc_build_message_expr' for non-template functions. In the case of C++ template functions, it is called from 'build_expr_from_tree' - (in decl2.c) after RECEIVER and METHOD_PARAMS have been expanded. + (in decl2.cc) after RECEIVER and METHOD_PARAMS have been expanded. If the method_prototype_avail argument is NULL, then we warn if the method being used is deprecated. If it is not NULL, instead @@ -9647,11 +9644,9 @@ objc_rewrite_function_call (tree function, tree first_param) && TREE_CODE (TREE_OPERAND (function, 0)) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (TREE_OPERAND (function, 0), 0)) == FUNCTION_DECL) - { - function = build3 (OBJ_TYPE_REF, TREE_TYPE (function), - TREE_OPERAND (function, 0), - first_param, size_zero_node); - } + function = build3 (OBJ_TYPE_REF, TREE_TYPE (function), + TREE_OPERAND (function, 0), first_param, + build_int_cst (TREE_TYPE (first_param), 0)); return function; } @@ -9967,10 +9962,10 @@ objc_finish_foreach_loop (location_t location, tree object_expression, tree coll } /* { */ - /* Done by c-parser.c. */ + /* Done by c-parser.cc. */ /* type object; */ - /* Done by c-parser.c. */ + /* Done by c-parser.cc. */ /* Disable warnings that 'object' is unused. For example the code @@ -10301,7 +10296,7 @@ objc_finish_foreach_loop (location_t location, tree object_expression, tree coll #endif /* } */ - /* Done by c-parser.c */ + /* Done by c-parser.cc */ } /* --- SUPPORT FOR FORMAT ARG CHECKING --- */ diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 282ba40..7d0c6d5 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -1,5 +1,5 @@ -/* Declarations for objc-act.c. - Copyright (C) 1990-2021 Free Software Foundation, Inc. +/* Declarations for objc-act.cc. + Copyright (C) 1990-2022 Free Software Foundation, Inc. This file is part of GCC. @@ -29,7 +29,7 @@ int objc_gimplify_expr (tree *, gimple_seq *, gimple_seq *); void objc_common_init_ts (void); /* NB: The remaining public functions are prototyped in c-common.h, for the - benefit of stub-objc.c and objc-act.c. */ + benefit of stub-objc.cc and objc-act.cc. */ /* Objective-C structures */ diff --git a/gcc/objc/objc-encoding.c b/gcc/objc/objc-encoding.cc index 7ad920a..9abc6b0 100644 --- a/gcc/objc/objc-encoding.c +++ b/gcc/objc/objc-encoding.cc @@ -1,5 +1,5 @@ /* Routines dealing with ObjC encoding of types - Copyright (C) 1992-2021 Free Software Foundation, Inc. + Copyright (C) 1992-2022 Free Software Foundation, Inc. This file is part of GCC. diff --git a/gcc/objc/objc-encoding.h b/gcc/objc/objc-encoding.h index 044604b..38ee951 100644 --- a/gcc/objc/objc-encoding.h +++ b/gcc/objc/objc-encoding.h @@ -1,5 +1,5 @@ /* Routines dealing with ObjC encoding of types - Copyright (C) 1992-2021 Free Software Foundation, Inc. + Copyright (C) 1992-2022 Free Software Foundation, Inc. This file is part of GCC. diff --git a/gcc/objc/objc-gnu-runtime-abi-01.c b/gcc/objc/objc-gnu-runtime-abi-01.cc index 976fa1e..9413314 100644 --- a/gcc/objc/objc-gnu-runtime-abi-01.c +++ b/gcc/objc/objc-gnu-runtime-abi-01.cc @@ -1,6 +1,6 @@ /* GNU Runtime ABI version 8 - Copyright (C) 2011-2021 Free Software Foundation, Inc. - Contributed by Iain Sandoe (split from objc-act.c) + Copyright (C) 2011-2022 Free Software Foundation, Inc. + Contributed by Iain Sandoe (split from objc-act.cc) This file is part of GCC. @@ -725,7 +725,8 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype, parms->quick_push (TREE_VALUE (method_params)); /* Build an obj_type_ref, with the correct cast for the method call. */ - t = build3 (OBJ_TYPE_REF, sender_cast, method, lookup_object, size_zero_node); + t = build3 (OBJ_TYPE_REF, sender_cast, method, lookup_object, + build_int_cst (TREE_TYPE (lookup_object), 0)); t = build_function_call_vec (loc, vNULL, t, parms, NULL); vec_free (parms); return t; diff --git a/gcc/objc/objc-lang.c b/gcc/objc/objc-lang.cc index d1b73dd..ef664f5 100644 --- a/gcc/objc/objc-lang.c +++ b/gcc/objc/objc-lang.cc @@ -1,5 +1,5 @@ /* Language-dependent hooks for Objective-C. - Copyright (C) 2001-2021 Free Software Foundation, Inc. + Copyright (C) 2001-2022 Free Software Foundation, Inc. Contributed by Ziemowit Laski <zlaski@apple.com> This file is part of GCC. @@ -50,7 +50,7 @@ enum c_language_kind c_language = clk_objc; /* Each front end provides its own lang hook initializer. */ struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; -/* Lang hook routines common to C and ObjC appear in c-objc-common.c; +/* Lang hook routines common to C and ObjC appear in c-objc-common.cc; there should be very few (if any) routines below. */ #include "gtype-objc.h" diff --git a/gcc/objc/objc-map.c b/gcc/objc/objc-map.cc index d995b69..963a558 100644 --- a/gcc/objc/objc-map.c +++ b/gcc/objc/objc-map.cc @@ -1,5 +1,5 @@ -/* objc-map.c -- Implementation of map data structures for ObjC compiler - Copyright (C) 2011-2021 Free Software Foundation, Inc. +/* objc-map.cc -- Implementation of map data structures for ObjC compiler + Copyright (C) 2011-2022 Free Software Foundation, Inc. Written by Nicola Pero <nicola.pero@meta-innovation.com> This program is free software; you can redistribute it and/or modify it diff --git a/gcc/objc/objc-map.h b/gcc/objc/objc-map.h index 6a1058f..efcf04f 100644 --- a/gcc/objc/objc-map.h +++ b/gcc/objc/objc-map.h @@ -1,5 +1,5 @@ /* objc-map.h -- Implementation of map data structures for ObjC compiler - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Written by Nicola Pero <nicola.pero@meta-innovation.com> This program is free software; you can redistribute it and/or modify it diff --git a/gcc/objc/objc-next-metadata-tags.h b/gcc/objc/objc-next-metadata-tags.h index ceb8783..6d42981 100644 --- a/gcc/objc/objc-next-metadata-tags.h +++ b/gcc/objc/objc-next-metadata-tags.h @@ -1,5 +1,5 @@ /* Declarations for meta-data attribute tags. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Contributed by Iain Sandoe This file is part of GCC. @@ -79,6 +79,8 @@ enum objc_runtime_tree_index OCTI_RT_META_MAX }; +extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; + /* Tags for the META data so that the backend can put them in the correct sections for targets/runtimes (Darwin/NeXT) that require this. This information also survives LTO - which might produce mixed language diff --git a/gcc/objc/objc-next-runtime-abi-01.c b/gcc/objc/objc-next-runtime-abi-01.cc index 12f8bdc..409b777 100644 --- a/gcc/objc/objc-next-runtime-abi-01.c +++ b/gcc/objc/objc-next-runtime-abi-01.cc @@ -1,6 +1,6 @@ /* Next Runtime (ABI-0/1) private. - Copyright (C) 2011-2021 Free Software Foundation, Inc. - Contributed by Iain Sandoe (split from objc-act.c) + Copyright (C) 2011-2022 Free Software Foundation, Inc. + Contributed by Iain Sandoe (split from objc-act.cc) This file is part of GCC. @@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see #include "objc-runtime-hooks.h" #include "objc-runtime-shared-support.h" +#include "objc-next-metadata-tags.h" #include "objc-encoding.h" /* NeXT ABI 0 and 1 private definitions. */ @@ -99,14 +100,6 @@ along with GCC; see the file COPYING3. If not see #define CLS_HAS_CXX_STRUCTORS 0x2000L -/* rt_trees identifiers - shared between NeXT implementations. These - allow the FE to tag meta-data in a manner that survives LTO and can - be used when the runtime requires that certain meta-data items - appear in particular named sections. */ - -#include "objc-next-metadata-tags.h" -extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; - static void next_runtime_01_initialize (void); static tree next_runtime_abi_01_super_superclassfield_id (void); @@ -890,7 +883,7 @@ build_objc_method_call (location_t loc, int super_flag, tree method_prototype, /* Build an obj_type_ref, with the correct cast for the method call. */ t = build3 (OBJ_TYPE_REF, sender_cast, method, - lookup_object, size_zero_node); + lookup_object, build_int_cst (TREE_TYPE (lookup_object), 0)); t = build_function_call_vec (loc, vNULL, t, parms, NULL); vec_free (parms); return t; @@ -2282,7 +2275,7 @@ generate_objc_symtab_decl (void) executable image, preserving unix archive semantics. At present (4.8), the only targets implementing this are Darwin; these - use top level asms to implement a scheme (see config/darwin-c.c). The + use top level asms to implement a scheme (see config/darwin-c.cc). The latter method is a hack, but compatible with LTO see also PR48109 for further discussion and other possible methods. */ diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.cc index 7ca0fd7..e50ca6e 100644 --- a/gcc/objc/objc-next-runtime-abi-02.c +++ b/gcc/objc/objc-next-runtime-abi-02.cc @@ -1,5 +1,5 @@ /* Next Runtime (ABI-2) private. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Contributed by Iain Sandoe and based, in part, on an implementation in 'branches/apple/trunk' contributed by Apple Computer Inc. @@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see #include "objc-runtime-hooks.h" #include "objc-runtime-shared-support.h" +#include "objc-next-metadata-tags.h" #include "objc-encoding.h" /* ABI 2 Private definitions. */ @@ -180,14 +181,6 @@ enum objc_v2_tree_index #define objc_rethrow_exception_decl \ objc_v2_global_trees[OCTI_V2_RETHROW_DECL] -/* rt_trees identifiers - shared between NeXT implementations. These allow - the FE to tag meta-data in a manner that survives LTO and can be used when - the runtime requires that certain meta-data items appear in particular - named sections. */ - -#include "objc-next-metadata-tags.h" -extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; - /* The OCTI_V2_... enumeration itself is in above. */ static GTY(()) tree objc_v2_global_trees[OCTI_V2_MAX]; @@ -1670,7 +1663,8 @@ build_v2_objc_method_fixup_call (int super_flag, tree method_prototype, method_params = tree_cons (NULL_TREE, lookup_object, tree_cons (NULL_TREE, selector, method_params)); - t = build3 (OBJ_TYPE_REF, sender_cast, sender, lookup_object, size_zero_node); + t = build3 (OBJ_TYPE_REF, sender_cast, sender, lookup_object, + build_int_cst (TREE_TYPE (lookup_object), 0)); ret_val = build_function_call (input_location, t, method_params); if (check_for_nil) { @@ -1779,7 +1773,7 @@ build_v2_build_objc_method_call (int super, tree method_prototype, /* Build an obj_type_ref, with the correct cast for the method call. */ t = build3 (OBJ_TYPE_REF, sender_cast, method, - lookup_object, size_zero_node); + lookup_object, build_int_cst (TREE_TYPE (lookup_object), 0)); tree ret_val = build_function_call_vec (loc, vNULL, t, parms, NULL); vec_free (parms); if (check_for_nil) diff --git a/gcc/objc/objc-runtime-hooks.h b/gcc/objc/objc-runtime-hooks.h index fdc9a75..5e966f6 100644 --- a/gcc/objc/objc-runtime-hooks.h +++ b/gcc/objc/objc-runtime-hooks.h @@ -1,5 +1,5 @@ /* Hooks to abstract the runtime meta-data generation for Objective C. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Contributed by Iain Sandoe This file is part of GCC. diff --git a/gcc/objc/objc-runtime-shared-support.c b/gcc/objc/objc-runtime-shared-support.cc index 40f506c..75c28fb 100644 --- a/gcc/objc/objc-runtime-shared-support.c +++ b/gcc/objc/objc-runtime-shared-support.cc @@ -1,6 +1,6 @@ /* Support routines shared by all runtimes. - Copyright (C) 2011-2021 Free Software Foundation, Inc. - Contributed by Iain Sandoe (partially split from objc-act.c) + Copyright (C) 2011-2022 Free Software Foundation, Inc. + Contributed by Iain Sandoe (partially split from objc-act.cc) This file is part of GCC. @@ -44,16 +44,11 @@ along with GCC; see the file COPYING3. If not see #include "objc-runtime-hooks.h" #include "objc-runtime-shared-support.h" -#include "objc-encoding.h" - -/* rt_trees identifiers - shared between NeXT implementations. These allow - the FE to tag meta-data in a manner that survives LTO and can be used when - the runtime requires that certain meta-data items appear in particular - named sections. */ #include "objc-next-metadata-tags.h" -extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; +#include "objc-encoding.h" /* Rather than repeatedly looking up the identifiers, we save them here. */ +extern GTY(()) tree objc_rt_trees[OCTI_RT_META_MAX]; tree objc_rt_trees[OCTI_RT_META_MAX]; /* For building an objc struct. These might not be used when this file diff --git a/gcc/objc/objc-runtime-shared-support.h b/gcc/objc/objc-runtime-shared-support.h index 6f7afb8..5b6c212 100644 --- a/gcc/objc/objc-runtime-shared-support.h +++ b/gcc/objc/objc-runtime-shared-support.h @@ -1,5 +1,5 @@ /* Support routines shared by all runtimes. - Copyright (C) 2011-2021 Free Software Foundation, Inc. + Copyright (C) 2011-2022 Free Software Foundation, Inc. Contributed by Iain Sandoe This file is part of GCC. @@ -63,7 +63,7 @@ extern tree build_descriptor_table_initializer (tree, tree); extern tree build_method_prototype_list_template (tree, int); extern tree build_protocol_initializer (tree, tree, tree, tree, tree); -/* Moved or new routines in objc-runtime-shared-support.c */ +/* Moved or new routines in objc-runtime-shared-support.cc */ extern tree build_selector (tree); extern tree build_method_template (void); diff --git a/gcc/objc/objc-tree.def b/gcc/objc/objc-tree.def index 55d8bd7..d8afeab 100644 --- a/gcc/objc/objc-tree.def +++ b/gcc/objc/objc-tree.def @@ -1,7 +1,7 @@ /* This file contains the definitions and documentation for the additional tree codes used in the Objective C front end (see tree.def for the standard codes). - Copyright (C) 1990-2021 Free Software Foundation, Inc. + Copyright (C) 1990-2022 Free Software Foundation, Inc. This file is part of GCC. |