annotate gcc/c-family/c-target.def @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Target hook definitions for C-family front ends.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2001-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This program is free software; you can redistribute it and/or modify it
kono
parents:
diff changeset
5 under the terms of the GNU General Public License as published by the
kono
parents:
diff changeset
6 Free Software Foundation; either version 3, or (at your option) any
kono
parents:
diff changeset
7 later version.
kono
parents:
diff changeset
8
kono
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
kono
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
12 GNU General Public License for more details.
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
15 along with this program; see the file COPYING3. If not see
kono
parents:
diff changeset
16 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 /* See target-hooks-macros.h for details of macros that should be
kono
parents:
diff changeset
19 provided by the including file, and how to use them here. */
kono
parents:
diff changeset
20 #include "target-hooks-macros.h"
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 #undef HOOK_TYPE
kono
parents:
diff changeset
23 #define HOOK_TYPE "C Target Hook"
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 HOOK_VECTOR (TARGETCM_INITIALIZER, gcc_targetcm)
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 #undef HOOK_PREFIX
kono
parents:
diff changeset
28 #define HOOK_PREFIX "TARGET_"
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 /* Handle target switch CODE (an OPT_* value). ARG is the argument
kono
parents:
diff changeset
31 passed to the switch; it is NULL if no argument was. VALUE is the
kono
parents:
diff changeset
32 value of ARG if CODE specifies a UInteger option, otherwise it is
kono
parents:
diff changeset
33 1 if the positive form of the switch was used and 0 if the negative
kono
parents:
diff changeset
34 form was. Return true if the switch was valid. */
kono
parents:
diff changeset
35 DEFHOOK
kono
parents:
diff changeset
36 (handle_c_option,
kono
parents:
diff changeset
37 "",
kono
parents:
diff changeset
38 bool, (size_t code, const char *arg, int value),
kono
parents:
diff changeset
39 default_handle_c_option)
kono
parents:
diff changeset
40
kono
parents:
diff changeset
41 /* Targets may provide a string object type that can be used within
kono
parents:
diff changeset
42 and between C, C++, and Objective-C dialects. */
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 DEFHOOK
kono
parents:
diff changeset
45 (objc_construct_string_object,
kono
parents:
diff changeset
46 "Targets may provide a string object type that can be used within\
kono
parents:
diff changeset
47 and between C, C++ and their respective Objective-C dialects.\
kono
parents:
diff changeset
48 A string object might, for example, embed encoding and length information.\
kono
parents:
diff changeset
49 These objects are considered opaque to the compiler and handled as references.\
kono
parents:
diff changeset
50 An ideal implementation makes the composition of the string object\
kono
parents:
diff changeset
51 match that of the Objective-C @code{NSString} (@code{NXString} for GNUStep),\
kono
parents:
diff changeset
52 allowing efficient interworking between C-only and Objective-C code.\
kono
parents:
diff changeset
53 If a target implements string objects then this hook should return a\
kono
parents:
diff changeset
54 reference to such an object constructed from the normal `C' string\
kono
parents:
diff changeset
55 representation provided in @var{string}.\
kono
parents:
diff changeset
56 At present, the hook is used by Objective-C only, to obtain a\
kono
parents:
diff changeset
57 common-format string object when the target provides one.",
kono
parents:
diff changeset
58 tree, (tree string),
kono
parents:
diff changeset
59 NULL)
kono
parents:
diff changeset
60
kono
parents:
diff changeset
61 DEFHOOK
kono
parents:
diff changeset
62 (objc_declare_unresolved_class_reference,
kono
parents:
diff changeset
63 "Declare that Objective C class @var{classname} is referenced\
kono
parents:
diff changeset
64 by the current TU.",
kono
parents:
diff changeset
65 void, (const char *classname),
kono
parents:
diff changeset
66 NULL)
kono
parents:
diff changeset
67
kono
parents:
diff changeset
68 DEFHOOK
kono
parents:
diff changeset
69 (objc_declare_class_definition,
kono
parents:
diff changeset
70 "Declare that Objective C class @var{classname} is defined\
kono
parents:
diff changeset
71 by the current TU.",
kono
parents:
diff changeset
72 void, (const char *classname),
kono
parents:
diff changeset
73 NULL)
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 DEFHOOK
kono
parents:
diff changeset
76 (string_object_ref_type_p,
kono
parents:
diff changeset
77 "If a target implements string objects then this hook should return\
kono
parents:
diff changeset
78 @code{true} if @var{stringref} is a valid reference to such an object.",
kono
parents:
diff changeset
79 bool, (const_tree stringref),
kono
parents:
diff changeset
80 hook_bool_const_tree_false)
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 DEFHOOK
kono
parents:
diff changeset
83 (check_string_object_format_arg,
kono
parents:
diff changeset
84 "If a target implements string objects then this hook should should\
kono
parents:
diff changeset
85 provide a facility to check the function arguments in @var{args_list}\
kono
parents:
diff changeset
86 against the format specifiers in @var{format_arg} where the type of\
kono
parents:
diff changeset
87 @var{format_arg} is one recognized as a valid string reference type.",
kono
parents:
diff changeset
88 void, (tree format_arg, tree args_list),
kono
parents:
diff changeset
89 NULL)
kono
parents:
diff changeset
90
kono
parents:
diff changeset
91 DEFHOOK
kono
parents:
diff changeset
92 (c_preinclude,
kono
parents:
diff changeset
93 "Define this hook to return the name of a header file to be included at\
kono
parents:
diff changeset
94 the start of all compilations, as if it had been included with\
kono
parents:
diff changeset
95 @code{#include <@var{file}>}. If this hook returns @code{NULL}, or is\
kono
parents:
diff changeset
96 not defined, or the header is not found, or if the user specifies\
kono
parents:
diff changeset
97 @option{-ffreestanding} or @option{-nostdinc}, no header is included.\n\
kono
parents:
diff changeset
98 \n\
kono
parents:
diff changeset
99 This hook can be used together with a header provided by the system C\
kono
parents:
diff changeset
100 library to implement ISO C requirements for certain macros to be\
kono
parents:
diff changeset
101 predefined that describe properties of the whole implementation rather\
kono
parents:
diff changeset
102 than just the compiler.",
kono
parents:
diff changeset
103 const char *, (void),
kono
parents:
diff changeset
104 hook_constcharptr_void_null)
kono
parents:
diff changeset
105
kono
parents:
diff changeset
106 DEFHOOK
kono
parents:
diff changeset
107 (cxx_implicit_extern_c,
kono
parents:
diff changeset
108 "Define this hook to add target-specific C++ implicit extern C functions.\
kono
parents:
diff changeset
109 If this function returns true for the name of a file-scope function, that\
kono
parents:
diff changeset
110 function implicitly gets extern \"C\" linkage rather than whatever language\
kono
parents:
diff changeset
111 linkage the declaration would normally have. An example of such function\
kono
parents:
diff changeset
112 is WinMain on Win32 targets.",
kono
parents:
diff changeset
113 bool, (const char*),
kono
parents:
diff changeset
114 NULL)
kono
parents:
diff changeset
115
kono
parents:
diff changeset
116 HOOK_VECTOR_END (C90_EMPTY_HACK)