annotate gcc/objcp/objcp-decl.h @ 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 /* Process the ObjC-specific declarations and variables for
kono
parents:
diff changeset
2 the Objective-C++ compiler.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 Copyright (C) 2005-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4 Contributed by Ziemowit Laski <zlaski@apple.com>
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 This file is part of GCC.
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
9 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
10 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
11 version.
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
16 for more details.
kono
parents:
diff changeset
17
kono
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
19 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
20 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 #ifndef GCC_OBJCP_DECL_H
kono
parents:
diff changeset
24 #define GCC_OBJCP_DECL_H
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 extern tree objcp_start_struct (location_t, enum tree_code, tree);
kono
parents:
diff changeset
27 extern tree objcp_finish_struct (location_t, tree, tree, tree);
kono
parents:
diff changeset
28 extern void objcp_finish_function (void);
kono
parents:
diff changeset
29 extern tree objcp_build_function_call (tree, tree);
kono
parents:
diff changeset
30 extern tree objcp_xref_tag (enum tree_code, tree);
kono
parents:
diff changeset
31 extern int objcp_comptypes (tree, tree);
kono
parents:
diff changeset
32 extern tree objcp_begin_compound_stmt (int);
kono
parents:
diff changeset
33 extern tree objcp_end_compound_stmt (tree, int);
kono
parents:
diff changeset
34
kono
parents:
diff changeset
35 /* Now "cover up" the corresponding C++ functions if required (NB: the
kono
parents:
diff changeset
36 OBJCP_ORIGINAL_FUNCTION macro, shown below, can still be used to
kono
parents:
diff changeset
37 invoke the original C++ functions if needed). */
kono
parents:
diff changeset
38 #ifdef OBJCP_REMAP_FUNCTIONS
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 #define start_struct(loc, code, name, struct_info) \
kono
parents:
diff changeset
41 objcp_start_struct (loc, code, name)
kono
parents:
diff changeset
42 #define finish_struct(loc, t, fieldlist, attributes, struct_info) \
kono
parents:
diff changeset
43 objcp_finish_struct (loc, t, fieldlist, attributes)
kono
parents:
diff changeset
44 #define finish_function() \
kono
parents:
diff changeset
45 objcp_finish_function ()
kono
parents:
diff changeset
46 #define finish_decl(decl, loc, init, origtype, asmspec) \
kono
parents:
diff changeset
47 cp_finish_decl (decl, init, false, asmspec, 0)
kono
parents:
diff changeset
48 #define xref_tag(code, name) \
kono
parents:
diff changeset
49 objcp_xref_tag (code, name)
kono
parents:
diff changeset
50 #define comptypes(type1, type2) \
kono
parents:
diff changeset
51 objcp_comptypes (type1, type2)
kono
parents:
diff changeset
52 #define c_begin_compound_stmt(flags) \
kono
parents:
diff changeset
53 objcp_begin_compound_stmt (flags)
kono
parents:
diff changeset
54 #define c_end_compound_stmt(loc, stmt, flags) \
kono
parents:
diff changeset
55 objcp_end_compound_stmt (stmt, flags)
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 #undef OBJC_TYPE_NAME
kono
parents:
diff changeset
58 #define OBJC_TYPE_NAME(type) (TYPE_IDENTIFIER (type))
kono
parents:
diff changeset
59 #undef OBJC_SET_TYPE_NAME
kono
parents:
diff changeset
60 #define OBJC_SET_TYPE_NAME(type, name) (TYPE_IDENTIFIER (type) = (name))
kono
parents:
diff changeset
61
kono
parents:
diff changeset
62 #undef TYPE_OBJC_INFO
kono
parents:
diff changeset
63 #define TYPE_OBJC_INFO(TYPE) LANG_TYPE_CLASS_CHECK (TYPE)->objc_info
kono
parents:
diff changeset
64 #undef SIZEOF_OBJC_TYPE_LANG_SPECIFIC
kono
parents:
diff changeset
65 #define SIZEOF_OBJC_TYPE_LANG_SPECIFIC sizeof (struct lang_type)
kono
parents:
diff changeset
66 #undef ALLOC_OBJC_TYPE_LANG_SPECIFIC
kono
parents:
diff changeset
67 #define ALLOC_OBJC_TYPE_LANG_SPECIFIC(NODE) \
kono
parents:
diff changeset
68 (TYPE_LANG_SPECIFIC (NODE) = (struct lang_type *) \
kono
parents:
diff changeset
69 ggc_internal_cleared_alloc (SIZEOF_OBJC_TYPE_LANG_SPECIFIC))
kono
parents:
diff changeset
70
kono
parents:
diff changeset
71 #define OBJCP_ORIGINAL_FUNCTION(name, args) (name)args
kono
parents:
diff changeset
72
kono
parents:
diff changeset
73 /* C++ marks ellipsis-free function parameters differently from C. */
kono
parents:
diff changeset
74 #undef OBJC_VOID_AT_END
kono
parents:
diff changeset
75 #define OBJC_VOID_AT_END void_list_node
kono
parents:
diff changeset
76
kono
parents:
diff changeset
77 #endif /* OBJCP_REMAP_FUNCTIONS */
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 #endif /* ! GCC_OBJCP_DECL_H */