xfail experimental/memory_resource/resource_adaptor.cc on 32-bit Solaris/x86 (PR...
[official-gcc.git] / gcc / objc / objc-next-metadata-tags.h
blobb58e000b3fb51f35374f060b25bfe451bf22d89d
1 /* Declarations for meta-data attribute tags.
2 Copyright (C) 2011-2018 Free Software Foundation, Inc.
3 Contributed by Iain Sandoe
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
21 /* These are identifiers used to flag meta-data attributes such that they
22 survive LTO and might be placed in correct sections for the target. */
24 enum objc_runtime_tree_index
26 OCTI_RT_OBJC_META,
27 OCTI_RT_META_BASE,
29 OCTI_RT_META_CLASS,
30 OCTI_RT_META_METACLASS,
31 OCTI_RT_META_CATEGORY,
32 OCTI_RT_META_PROTOCOL,
34 OCTI_RT_META_CLASS_CLS_VARS,
35 OCTI_RT_META_CLASS_NST_VARS,
37 OCTI_RT_META_CLASS_CLS_METH,
38 OCTI_RT_META_CLASS_NST_METH,
39 OCTI_RT_META_CATEG_CLS_METH,
40 OCTI_RT_META_CATEG_NST_METH,
41 OCTI_RT_META_PROTO_CLS_METH,
42 OCTI_RT_META_PROTO_NST_METH,
44 OCTI_RT_META_CLASS_PROT,
45 OCTI_RT_META_CATEG_PROT,
46 OCTI_RT_META_PROT_REFS,
48 OCTI_RT_META_MSG_REFS,
49 OCTI_RT_META_SEL_REFS,
51 OCTI_RT_META_CLSLST_REFS,
52 OCTI_RT_META_CLASS_REF,
53 OCTI_RT_META_SUPER_REF,
54 OCTI_RT_META_CLSLST_NLZY_LAB,
55 OCTI_RT_META_CLSLST_LAB,
56 OCTI_RT_META_LAB_PROTOLIST,
57 OCTI_RT_META_LAB_NLZY_CAT,
58 OCTI_RT_META_LAB_CAT,
60 OCTI_RT_META_PROPERTY_LIST,
61 OCTI_RT_META_PROTOCOL_EXT,
62 OCTI_RT_META_CLASS_EXT,
64 OCTI_RT_META_CLASS_NAME,
65 OCTI_RT_META_METHD_NAME,
66 OCTI_RT_META_METHD_TYPE,
67 OCTI_RT_META_PROPN_ATTR,
69 OCTI_RT_META_MODULES,
70 OCTI_RT_META_SYMTAB,
71 OCTI_RT_META_INFO,
73 OCTI_RT_META_EHTYPE,
75 OCTI_RT_META_CONST_STR,
77 OCTI_RT_META_MAX
80 /* Tags for the META data so that the backend can put them in the correct
81 sections for targets/runtimes (Darwin/NeXT) that require this.
82 This information also survives LTO - which might produce mixed language
83 output. */
85 /* Objective-C meta data attribute tag */
86 #define objc_meta objc_rt_trees[OCTI_RT_OBJC_META]
87 /* Attribute values, base = default section. */
88 #define meta_base objc_rt_trees[OCTI_RT_META_BASE]
90 /* CLASS. */
91 #define meta_class objc_rt_trees[OCTI_RT_META_CLASS]
92 /* METACLASS. */
93 #define meta_metaclass objc_rt_trees[OCTI_RT_META_METACLASS]
94 /* CLASS. */
95 #define meta_category objc_rt_trees[OCTI_RT_META_CATEGORY]
96 /* PROTOCOL. */
97 #define meta_protocol objc_rt_trees[OCTI_RT_META_PROTOCOL]
99 /* Class class vars section. */
100 #define meta_clac_vars objc_rt_trees[OCTI_RT_META_CLASS_CLS_VARS]
101 /* Class instance vars section. */
102 #define meta_clai_vars objc_rt_trees[OCTI_RT_META_CLASS_NST_VARS]
103 /* Class class methods section. */
104 #define meta_clac_meth objc_rt_trees[OCTI_RT_META_CLASS_CLS_METH]
105 /* Class instance methods section. */
106 #define meta_clai_meth objc_rt_trees[OCTI_RT_META_CLASS_NST_METH]
107 /* Category class methods section. */
108 #define meta_catc_meth objc_rt_trees[OCTI_RT_META_CATEG_CLS_METH]
109 /* Category instance methods section. */
110 #define meta_cati_meth objc_rt_trees[OCTI_RT_META_CATEG_NST_METH]
111 #define meta_proto_cls_meth \
112 objc_rt_trees[OCTI_RT_META_PROTO_CLS_METH]
113 #define meta_proto_nst_meth \
114 objc_rt_trees[OCTI_RT_META_PROTO_NST_METH]
116 /* Class protocols. */
117 #define meta_clas_prot objc_rt_trees[OCTI_RT_META_CLASS_PROT]
118 /* Category protocols. */
119 #define meta_catg_prot objc_rt_trees[OCTI_RT_META_CATEG_PROT]
120 /* Protocol references. */
121 #define meta_proto_ref objc_rt_trees[OCTI_RT_META_PROT_REFS]
123 /* Message refs. */
124 #define meta_mref objc_rt_trees[OCTI_RT_META_MSG_REFS]
125 /* Selector refs. */
126 #define meta_sel_refs objc_rt_trees[OCTI_RT_META_SEL_REFS]
128 /* Class list refs. */
129 #define meta_class_ref objc_rt_trees[OCTI_RT_META_CLSLST_REFS]
130 #define meta_class_reference \
131 objc_rt_trees[OCTI_RT_META_CLASS_REF]
132 #define meta_superclass_ref \
133 objc_rt_trees[OCTI_RT_META_SUPER_REF]
134 /* Class list Label. */
135 #define meta_label_classlist \
136 objc_rt_trees[OCTI_RT_META_CLSLST_LAB]
137 /* Class list Label (non lazy). */
138 #define meta_label_nonlazy_classlist \
139 objc_rt_trees[OCTI_RT_META_CLSLST_NLZY_LAB]
140 #define meta_label_categorylist \
141 objc_rt_trees[OCTI_RT_META_LAB_CAT]
142 #define meta_label_nonlazy_categorylist \
143 objc_rt_trees[OCTI_RT_META_LAB_NLZY_CAT]
145 #define meta_label_protocollist \
146 objc_rt_trees[OCTI_RT_META_LAB_PROTOLIST]
149 /* V1 - property list. */
150 #define meta_proplist objc_rt_trees[OCTI_RT_META_PROPERTY_LIST]
151 #define meta_protocol_extension \
152 objc_rt_trees[OCTI_RT_META_PROTOCOL_EXT]
153 #define meta_class_extension \
154 objc_rt_trees[OCTI_RT_META_CLASS_EXT]
155 /* String sections. */
156 #define meta_class_name objc_rt_trees[OCTI_RT_META_CLASS_NAME]
157 #define meta_meth_name objc_rt_trees[OCTI_RT_META_METHD_NAME]
158 #define meta_meth_type objc_rt_trees[OCTI_RT_META_METHD_TYPE]
159 #define meta_prop_name_attr \
160 objc_rt_trees[OCTI_RT_META_PROPN_ATTR]
162 #define meta_modules objc_rt_trees[OCTI_RT_META_MODULES]
163 #define meta_symtab objc_rt_trees[OCTI_RT_META_SYMTAB]
164 #define meta_info objc_rt_trees[OCTI_RT_META_INFO]
166 #define meta_ehtype objc_rt_trees[OCTI_RT_META_EHTYPE]
168 #define meta_const_str objc_rt_trees[OCTI_RT_META_CONST_STR]
170 #define OBJCMETA(DECL,VERS,KIND) \
171 if (VERS) \
172 DECL_ATTRIBUTES (DECL) = build_tree_list ((VERS), (KIND));