1 /****************************************************************************
3 * GNAT COMPILER COMPONENTS *
11 * Copyright (C) 1992-2001 Free Software Foundation, Inc. *
13 * GNAT is free software; you can redistribute it and/or modify it under *
14 * terms of the GNU General Public License as published by the Free Soft- *
15 * ware Foundation; either version 2, or (at your option) any later ver- *
16 * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
17 * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
18 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
19 * for more details. You should have received a copy of the GNU General *
20 * Public License distributed with GNAT; see file COPYING. If not, write *
21 * to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, *
22 * MA 02111-1307, USA. *
24 * As a special exception, if you link this file with other files to *
25 * produce an executable, this file does not by itself cause the resulting *
26 * executable to be covered by the GNU General Public License. This except- *
27 * ion does not however invalidate any other reasons why the executable *
28 * file might be covered by the GNU Public License. *
30 * GNAT was originally developed by the GNAT team at New York University. *
31 * It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). *
33 ****************************************************************************/
35 /* This file contains definitions to access front-end functions and
36 variables used by gigi. */
40 #define Is_Rewrite_Substitution atree__is_rewrite_substitution
41 #define Original_Node atree__original_node
43 extern Boolean Is_Rewrite_Subsitution
PARAMS ((Node_Id
));
44 extern Node_Id Original_Node
PARAMS ((Node_Id
));
48 #define Compiler_Abort comperr__compiler_abort
49 extern int Compiler_Abort
PARAMS ((Fat_Pointer
, int)) ATTRIBUTE_NORETURN
;
51 /* csets: Definitions to access the front-end's character translation
54 #define Fold_Lower(C) csets__fold_lower[C]
55 #define Fold_Upper(C) csets__fold_upper[C]
56 extern char Fold_Lower
[], Fold_Upper
[];
60 #define Debug_Flag_XX debug__debug_flag_xx
61 #define Debug_Flag_NN debug__debug_flag_nn
63 extern Boolean Debug_Flag_XX
;
64 extern Boolean Debug_Flag_NN
;
66 /* einfo: We will be setting Esize for types, Component_Bit_Offset for fields,
67 Alignment for types and objects, Component_Size for array types, and
68 Present_Expr for N_Variant nodes. */
70 #define Set_Alignment einfo__set_alignment
71 #define Set_Esize einfo__set_esize
72 #define Set_RM_Size einfo__set_rm_size
73 #define Set_Component_Bit_Offset einfo__set_component_bit_offset
74 #define Set_Component_Size einfo__set_component_size
75 #define Set_Present_Expr sinfo__set_present_expr
77 extern void Set_Alignment
PARAMS ((Entity_Id
, Uint
));
78 extern void Set_Component_Size
PARAMS ((Entity_Id
, Uint
));
79 extern void Set_Esize
PARAMS ((Entity_Id
, Uint
));
80 extern void Set_RM_Size
PARAMS ((Entity_Id
, Uint
));
81 extern void Set_Component_Bit_Offset
PARAMS ((Entity_Id
, Uint
));
82 extern void Set_Present_Expr
PARAMS ((Node_Id
, Uint
));
86 #define Error_Msg_N errout__error_msg_n
87 #define Error_Msg_NE errout__error_msg_ne
88 #define Error_Msg_Node_2 errout__error_msg_node_2
89 #define Error_Msg_Uint_1 errout__error_msg_uint_1
90 #define Error_Msg_Uint_2 errout__error_msg_uint_2
92 extern void Error_Msg_N
PARAMS ((Fat_Pointer
, Node_Id
));
93 extern void Error_Msg_NE
PARAMS ((Fat_Pointer
, Node_Id
, Entity_Id
));
95 extern Entity_Id Error_Msg_Node_2
;
96 extern Uint Error_Msg_Uint_1
;
97 extern Uint Error_Msg_Uint_2
;
100 #define Asm_Input_Constraint exp_code__asm_input_constraint
101 #define Asm_Input_Value exp_code__asm_input_value
102 #define Asm_Output_Constraint exp_code__asm_output_constraint
103 #define Asm_Output_Variable exp_code__asm_output_variable
104 #define Asm_Template exp_code__asm_template
105 #define Clobber_Get_Next exp_code__clobber_get_next
106 #define Clobber_Setup exp_code__clobber_setup
107 #define Is_Asm_Volatile exp_code__is_asm_volatile
108 #define Next_Asm_Input exp_code__next_asm_input
109 #define Next_Asm_Output exp_code__next_asm_output
110 #define Setup_Asm_Inputs exp_code__setup_asm_inputs
111 #define Setup_Asm_Outputs exp_code__setup_asm_outputs
113 extern Node_Id Asm_Input_Constraint
PARAMS ((void));
114 extern Node_Id Asm_Input_Value
PARAMS ((void));
115 extern Node_Id Asm_Output_Constraint
PARAMS ((void));
116 extern Node_Id Asm_Output_Variable
PARAMS ((void));
117 extern Node_Id Asm_Template
PARAMS ((Node_Id
));
118 extern char *Clobber_Get_Next
PARAMS ((void));
119 extern void Clobber_Setup
PARAMS ((Node_Id
));
120 extern Boolean Is_Asm_Volatile
PARAMS ((Node_Id
));
121 extern void Next_Asm_Input
PARAMS ((void));
122 extern void Next_Asm_Output
PARAMS ((void));
123 extern void Setup_Asm_Inputs
PARAMS ((Node_Id
));
124 extern void Setup_Asm_Outputs
PARAMS ((Node_Id
));
128 #define Get_Encoded_Name exp_dbug__get_encoded_name
129 #define Get_External_Name_With_Suffix exp_dbug__get_external_name_with_suffix
131 extern void Get_Encoded_Name
PARAMS ((Entity_Id
));
132 extern void Get_External_Name_With_Suffix
PARAMS ((Entity_Id
, Fat_Pointer
));
136 #define Cunit lib__cunit
137 #define Ident_String lib__ident_string
138 #define In_Extended_Main_Code_Unit lib__in_extended_main_code_unit
140 extern Node_Id Cunit
PARAMS ((Unit_Number_Type
));
141 extern Node_Id Ident_String
PARAMS ((Unit_Number_Type
));
142 extern Boolean In_Extended_Main_Code_Unit
PARAMS ((Entity_Id
));
146 #define Global_Discard_Names opt__global_discard_names
147 extern Boolean Global_Discard_Names
;
151 #define Check_Elaboration_Code_Allowed restrict__check_elaboration_code_allowed
152 #define No_Exception_Handlers_Set restrict__no_exception_handlers_set
154 extern void Check_Elaboration_Code_Allowed
PARAMS ((Node_Id
));
155 extern Boolean No_Exception_Handlers_Set
PARAMS ((void));
159 #define Get_Attribute_Definition_Clause \
160 sem_ch13__get_attribute_definition_clause
161 extern Node_Id Get_Attribute_Definition_Clause
PARAMS ((Entity_Id
, char));
165 #define Compile_Time_Known_Value sem_eval__compile_time_known_value
166 #define Expr_Value sem_eval__expr_value
167 #define Expr_Value_S sem_eval__expr_value_s
168 #define Is_OK_Static_Expression sem_eval__is_ok_static_expression
170 extern Uint Expr_Value
PARAMS ((Node_Id
));
171 extern Node_Id Expr_Value_S
PARAMS ((Node_Id
));
172 extern Boolean Compile_Time_Known_Value
PARAMS((Node_Id
));
173 extern Boolean Is_OK_Static_Expression
PARAMS((Node_Id
));
177 #define Defining_Entity sem_util__defining_entity
178 #define First_Actual sem_util__first_actual
179 #define Next_Actual sem_util__next_actual
180 #define Requires_Transient_Scope sem_util__requires_transient_scope
182 extern Entity_Id Defining_Entity
PARAMS ((Node_Id
));
183 extern Node_Id First_Actual
PARAMS ((Node_Id
));
184 extern Node_Id Next_Actual
PARAMS ((Node_Id
));
185 extern Boolean Requires_Transient_Scope
PARAMS ((Entity_Id
));
187 /* sinfo: These functions aren't in sinfo.h since we don't make the
188 setting functions, just the retrieval functions. */
189 #define Set_Has_No_Elaboration_Code sinfo__set_has_no_elaboration_code
190 extern void Set_Has_No_Elaboration_Code
PARAMS ((Node_Id
, Boolean
));
194 #define Stack_Check_Probes_On_Target targparm__stack_check_probes_on_target
196 extern Boolean Stack_Check_Probes_On_Target
;