1 /* d-target.h -- Data structure definitions for target-specific D behavior.
2 Copyright (C) 2017-2024 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify it
5 under the terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 3, or (at your option) any
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>. */
18 #ifndef GCC_D_TARGET_H
19 #define GCC_D_TARGET_H
21 #define DEFHOOKPOD(NAME, DOC, TYPE, INIT) TYPE NAME;
22 #define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (* NAME) PARAMS;
23 #define DEFHOOK_UNDOC DEFHOOK
24 #define HOOKSTRUCT(FRAGMENT) FRAGMENT
26 #include "d-target.def"
28 /* Each target can provide their own. */
29 extern struct gcc_targetdm targetdm
;
31 /* Used by target to add predefined version idenditiers. */
32 extern void d_add_builtin_version (const char *);
34 /* Structure describing a supported key for `__traits(getTargetInfo)' and a
35 function to handle it. */
36 struct d_target_info_spec
38 /* The name of the key or NULL to mark the end of a table of keys. */
40 /* Function to handle this key, the return value of the handler must be a CST.
41 This pointer may be NULL if no special handling is required, for instance,
42 the key must always be available according to the D language spec. */
46 /* Used by target to add getTargetInfo handlers. */
47 extern void d_add_target_info_handlers (const d_target_info_spec
*);
49 #endif /* GCC_D_TARGET_H */