Merge branch 'vendor/GCC47'
[dragonfly.git] / contrib / gcc-4.7 / gcc / c-family / c-target.def
CommitLineData
e4b17023
JM
1/* Target hook definitions for C-family front ends.
2 Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
3 2011
4 Free Software Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 3, or (at your option) any
9 later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; see the file COPYING3. If not see
18 <http://www.gnu.org/licenses/>. */
19
20/* See target-hooks-macros.h for details of macros that should be
21 provided by the including file, and how to use them here. */
22#include "target-hooks-macros.h"
23
24#undef HOOK_TYPE
25#define HOOK_TYPE "C Target Hook"
26
27HOOK_VECTOR (TARGETCM_INITIALIZER, gcc_targetcm)
28
29#undef HOOK_PREFIX
30#define HOOK_PREFIX "TARGET_"
31
32/* Handle target switch CODE (an OPT_* value). ARG is the argument
33 passed to the switch; it is NULL if no argument was. VALUE is the
34 value of ARG if CODE specifies a UInteger option, otherwise it is
35 1 if the positive form of the switch was used and 0 if the negative
36 form was. Return true if the switch was valid. */
37DEFHOOK
38(handle_c_option,
39 "",
40 bool, (size_t code, const char *arg, int value),
41 default_handle_c_option)
42
43/* Targets may provide a string object type that can be used within
44 and between C, C++, and Objective-C dialects. */
45
46DEFHOOK
47(objc_construct_string_object,
48 "Targets may provide a string object type that can be used within\
49 and between C, C++ and their respective Objective-C dialects.\
50 A string object might, for example, embed encoding and length information.\
51 These objects are considered opaque to the compiler and handled as references.\
52 An ideal implementation makes the composition of the string object\
53 match that of the Objective-C @code{NSString} (@code{NXString} for GNUStep),\
54 allowing efficient interworking between C-only and Objective-C code.\
55 If a target implements string objects then this hook should return a\
56 reference to such an object constructed from the normal `C' string\
57 representation provided in @var{string}.\
58 At present, the hook is used by Objective-C only, to obtain a\
59 common-format string object when the target provides one.",
60 tree, (tree string),
61 NULL)
95d28233
JM
62
63DEFHOOK
64(objc_declare_unresolved_class_reference,
65 "Declare that Objective C class @var{classname} is referenced\
66 by the current TU.",
67 void, (const char *classname),
68 NULL)
69
70DEFHOOK
71(objc_declare_class_definition,
72 "Declare that Objective C class @var{classname} is defined\
73 by the current TU.",
74 void, (const char *classname),
75 NULL)
76
e4b17023
JM
77DEFHOOK
78(string_object_ref_type_p,
79 "If a target implements string objects then this hook should return\
80 @code{true} if @var{stringref} is a valid reference to such an object.",
81 bool, (const_tree stringref),
82 hook_bool_const_tree_false)
83
84DEFHOOK
85(check_string_object_format_arg,
86 "If a target implements string objects then this hook should should\
87 provide a facility to check the function arguments in @var{args_list}\
88 against the format specifiers in @var{format_arg} where the type of\
89 @var{format_arg} is one recognized as a valid string reference type.",
90 void, (tree format_arg, tree args_list),
91 NULL)
92
93HOOK_VECTOR_END (C90_EMPTY_HACK)