xref: /netbsd/external/gpl3/gcc/dist/gcc/objc/objc-lang.cc (revision f0fbc68b)
1*f0fbc68bSmrg /* Language-dependent hooks for Objective-C.
2*f0fbc68bSmrg    Copyright (C) 2001-2022 Free Software Foundation, Inc.
3*f0fbc68bSmrg    Contributed by Ziemowit Laski  <zlaski@apple.com>
4*f0fbc68bSmrg 
5*f0fbc68bSmrg This file is part of GCC.
6*f0fbc68bSmrg 
7*f0fbc68bSmrg GCC is free software; you can redistribute it and/or modify
8*f0fbc68bSmrg it under the terms of the GNU General Public License as published by
9*f0fbc68bSmrg the Free Software Foundation; either version 3, or (at your option)
10*f0fbc68bSmrg any later version.
11*f0fbc68bSmrg 
12*f0fbc68bSmrg GCC is distributed in the hope that it will be useful,
13*f0fbc68bSmrg but WITHOUT ANY WARRANTY; without even the implied warranty of
14*f0fbc68bSmrg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*f0fbc68bSmrg GNU General Public License for more details.
16*f0fbc68bSmrg 
17*f0fbc68bSmrg You should have received a copy of the GNU General Public License
18*f0fbc68bSmrg along with GCC; see the file COPYING3.  If not see
19*f0fbc68bSmrg <http://www.gnu.org/licenses/>.  */
20*f0fbc68bSmrg 
21*f0fbc68bSmrg 
22*f0fbc68bSmrg #include "config.h"
23*f0fbc68bSmrg #include "system.h"
24*f0fbc68bSmrg #include "coretypes.h"
25*f0fbc68bSmrg #include "c/c-tree.h"
26*f0fbc68bSmrg #include "c-family/c-objc.h"
27*f0fbc68bSmrg #include "objc-act.h"
28*f0fbc68bSmrg #include "langhooks.h"
29*f0fbc68bSmrg #include "langhooks-def.h"
30*f0fbc68bSmrg #include "c/c-objc-common.h"
31*f0fbc68bSmrg 
32*f0fbc68bSmrg enum c_language_kind c_language = clk_objc;
33*f0fbc68bSmrg 
34*f0fbc68bSmrg /* Lang hooks common to C and ObjC are declared in c-objc-common.h;
35*f0fbc68bSmrg    consequently, there should be very few hooks below.  */
36*f0fbc68bSmrg 
37*f0fbc68bSmrg #undef LANG_HOOKS_NAME
38*f0fbc68bSmrg #define LANG_HOOKS_NAME "GNU Objective-C"
39*f0fbc68bSmrg #undef LANG_HOOKS_INIT
40*f0fbc68bSmrg #define LANG_HOOKS_INIT objc_init
41*f0fbc68bSmrg #undef LANG_HOOKS_DECL_PRINTABLE_NAME
42*f0fbc68bSmrg #define LANG_HOOKS_DECL_PRINTABLE_NAME objc_printable_name
43*f0fbc68bSmrg #undef LANG_HOOKS_GIMPLIFY_EXPR
44*f0fbc68bSmrg #define LANG_HOOKS_GIMPLIFY_EXPR objc_gimplify_expr
45*f0fbc68bSmrg #undef LANG_HOOKS_INIT_TS
46*f0fbc68bSmrg #define LANG_HOOKS_INIT_TS objc_common_init_ts
47*f0fbc68bSmrg #undef LANG_HOOKS_TREE_SIZE
48*f0fbc68bSmrg #define LANG_HOOKS_TREE_SIZE objc_common_tree_size
49*f0fbc68bSmrg 
50*f0fbc68bSmrg /* Each front end provides its own lang hook initializer.  */
51*f0fbc68bSmrg struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
52*f0fbc68bSmrg 
53*f0fbc68bSmrg /* Lang hook routines common to C and ObjC appear in c-objc-common.cc;
54*f0fbc68bSmrg    there should be very few (if any) routines below.  */
55*f0fbc68bSmrg 
56*f0fbc68bSmrg #include "gtype-objc.h"
57