Daily bump.
[platform/upstream/gcc.git] / gcc / ada / atree.h
1 /****************************************************************************
2  *                                                                          *
3  *                         GNAT COMPILER COMPONENTS                         *
4  *                                                                          *
5  *                                A T R E E                                 *
6  *                                                                          *
7  *                              C Header File                               *
8  *                                                                          *
9  *          Copyright (C) 1992-2021, Free Software Foundation, Inc.         *
10  *                                                                          *
11  * GNAT is free software;  you can  redistribute it  and/or modify it under *
12  * terms of the  GNU General Public License as published  by the Free Soft- *
13  * ware  Foundation;  either version 3,  or (at your option) any later ver- *
14  * sion.  GNAT is distributed in the hope that it will be useful, but WITH- *
15  * OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY *
16  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License *
17  * for  more details.  You should have  received  a copy of the GNU General *
18  * Public License  distributed with GNAT; see file COPYING3.  If not, go to *
19  * http://www.gnu.org/licenses for a complete copy of the license.          *
20  *                                                                          *
21  * GNAT was originally developed  by the GNAT team at  New York University. *
22  * Extensive contributions were provided by Ada Core Technologies Inc.      *
23  *                                                                          *
24  ****************************************************************************/
25
26 /* This is the C header that corresponds to the Ada package specification for
27    Atree.  It also contains the implementation of inlined functions from the
28    package body for Atree.  It was created manually from atree.ads and
29    atree.adb and must be kept synchronized with changes in these files.
30
31    Note that only routines for reading the tree are included, since the tree
32    transformer is not supposed to modify the tree in any way.  */
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #define Parent atree__parent
39 extern Node_Id Parent (Node_Id);
40
41 #define Original_Node atree__original_node
42 extern Node_Id Original_Node (Node_Id);
43
44 /* Type used for union of Node_Id, List_Id, Elist_Id.  */
45 typedef Int Tree_Id;
46
47 /* These two functions can only be used for Node_Id and List_Id values and
48    they work in the C version because Empty = No_List = 0.  */
49
50 INLINE Boolean No (Tree_Id);
51 INLINE Boolean Present (Tree_Id);
52
53 INLINE Boolean
54 No (Tree_Id N)
55 {
56   return N == Empty;
57 }
58
59 INLINE Boolean
60 Present (Tree_Id N)
61 {
62   return !No (N);
63 }
64
65 #define Current_Error_Node atree__current_error_node
66 extern Node_Id Current_Error_Node;
67
68 #ifdef __cplusplus
69 }
70 #endif