136ac495dSmrg /* Language-dependent hooks for Objective-C. 2*8feb0f0bSmrg Copyright (C) 2001-2020 Free Software Foundation, Inc. 336ac495dSmrg Contributed by Ziemowit Laski <zlaski@apple.com> 436ac495dSmrg 536ac495dSmrg This file is part of GCC. 636ac495dSmrg 736ac495dSmrg GCC is free software; you can redistribute it and/or modify 836ac495dSmrg it under the terms of the GNU General Public License as published by 936ac495dSmrg the Free Software Foundation; either version 3, or (at your option) 1036ac495dSmrg any later version. 1136ac495dSmrg 1236ac495dSmrg GCC is distributed in the hope that it will be useful, 1336ac495dSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of 1436ac495dSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1536ac495dSmrg GNU General Public License for more details. 1636ac495dSmrg 1736ac495dSmrg You should have received a copy of the GNU General Public License 1836ac495dSmrg along with GCC; see the file COPYING3. If not see 1936ac495dSmrg <http://www.gnu.org/licenses/>. */ 2036ac495dSmrg 2136ac495dSmrg 2236ac495dSmrg #include "config.h" 2336ac495dSmrg #include "system.h" 2436ac495dSmrg #include "coretypes.h" 2536ac495dSmrg #include "c/c-tree.h" 2636ac495dSmrg #include "c-family/c-objc.h" 2736ac495dSmrg #include "objc-act.h" 2836ac495dSmrg #include "langhooks.h" 2936ac495dSmrg #include "langhooks-def.h" 3036ac495dSmrg #include "c/c-objc-common.h" 3136ac495dSmrg 3236ac495dSmrg enum c_language_kind c_language = clk_objc; 3336ac495dSmrg 3436ac495dSmrg /* Lang hooks common to C and ObjC are declared in c-objc-common.h; 3536ac495dSmrg consequently, there should be very few hooks below. */ 3636ac495dSmrg 3736ac495dSmrg #undef LANG_HOOKS_NAME 3836ac495dSmrg #define LANG_HOOKS_NAME "GNU Objective-C" 3936ac495dSmrg #undef LANG_HOOKS_INIT 4036ac495dSmrg #define LANG_HOOKS_INIT objc_init 4136ac495dSmrg #undef LANG_HOOKS_DECL_PRINTABLE_NAME 4236ac495dSmrg #define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name 4336ac495dSmrg #undef LANG_HOOKS_GIMPLIFY_EXPR 4436ac495dSmrg #define LANG_HOOKS_GIMPLIFY_EXPR objc_gimplify_expr 4536ac495dSmrg #undef LANG_HOOKS_INIT_TS 4636ac495dSmrg #define LANG_HOOKS_INIT_TS objc_common_init_ts 4736ac495dSmrg #undef LANG_HOOKS_TREE_SIZE 4836ac495dSmrg #define LANG_HOOKS_TREE_SIZE objc_common_tree_size 4936ac495dSmrg 5036ac495dSmrg /* Each front end provides its own lang hook initializer. */ 5136ac495dSmrg struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; 5236ac495dSmrg 5336ac495dSmrg /* Lang hook routines common to C and ObjC appear in c-objc-common.c; 5436ac495dSmrg there should be very few (if any) routines below. */ 5536ac495dSmrg 5636ac495dSmrg #include "gtype-objc.h" 57