2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc-interface/gigi.h: Reorder declarations and tweak comments.
+ (gigi): Adjust ATTRIBUTE_UNUSED markers.
+ * gcc-interface/gadaint.h: New file.
+ * gcc-interface/trans.c: Include it in lieu of adaint.h. Reorder.
+ (__gnat_to_canonical_file_spec): Remove declaration.
+ (number_names): Delete.
+ (number_files): Likewise.
+ (gigi): Adjust.
+ * gcc-interface/Make-lang.in (ada/trans.o): Adjust dependencies to
+ above change.
+
+2010-04-14 Eric Botcazou <ebotcazou@adacore.com>
+
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Class_Wide_Type>: Fix
comment.
* gcc-interface/trans.c (process_freeze_entity): Use local copy of
the name followed by "___" and the specified suffix. */
extern tree concat_name (tree gnu_name, const char *suffix);
-/* If true, then gigi is being called on an analyzed but unexpanded tree, and
- the only purpose of the call is to properly annotate types with
- representation information. */
+/* Highest number in the front-end node table. */
+extern int max_gnat_nodes;
+
+/* Current node being treated, in case abort called. */
+extern Node_Id error_gnat_node;
+
+/* True when gigi is being called on an analyzed but unexpanded
+ tree, and the only purpose of the call is to properly annotate
+ types with representation information. */
extern bool type_annotate_only;
-/* Current file name without path */
+/* Current file name without path. */
extern const char *ref_filename;
/* This structure must be kept synchronized with Call_Back_End. */
};
/* This is the main program of the back-end. It sets up all the table
- structures and then generates code.
-
- ??? Needs parameter descriptions */
-
-extern void gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
+ structures and then generates code. */
+extern void gigi (Node_Id gnat_root, int max_gnat_node,
+ int number_name ATTRIBUTE_UNUSED,
struct Node *nodes_ptr, Node_Id *next_node_ptr,
Node_Id *prev_node_ptr, struct Elist_Header *elists_ptr,
struct Elmt_Item *elmts_ptr,
if none. */
extern tree get_exception_label (char kind);
-/* Current node being treated, in case gigi_abort or Check_Elaboration_Code
- called. */
-extern Node_Id error_gnat_node;
-
-/* Highest number in the front-end node table. */
-extern int max_gnat_nodes;
-
/* If nonzero, pretend we are allocating at global level. */
extern int force_global;
#include "fe.h"
#include "sinfo.h"
#include "einfo.h"
+#include "gadaint.h"
#include "ada-tree.h"
#include "gigi.h"
#endif
#endif
-extern char *__gnat_to_canonical_file_spec (char *);
-
-int max_gnat_nodes;
-int number_names;
-int number_files;
+/* Pointers to front-end tables accessed through macros. */
struct Node *Nodes_Ptr;
Node_Id *Next_Node_Ptr;
Node_Id *Prev_Node_Ptr;
Char_Code *String_Chars_Ptr;
struct List_Header *List_Headers_Ptr;
-/* Current filename without path. */
-const char *ref_filename;
+/* Highest number in the front-end node table. */
+int max_gnat_nodes;
+
+/* Current node being treated, in case abort called. */
+Node_Id error_gnat_node;
/* True when gigi is being called on an analyzed but unexpanded
tree, and the only purpose of the call is to properly annotate
types with representation information. */
bool type_annotate_only;
+/* Current filename without path. */
+const char *ref_filename;
+
/* When not optimizing, we cache the 'First, 'Last and 'Length attributes
of unconstrained array IN parameters to avoid emitting a great deal of
redundant instructions to recompute them each time. */
/* Map GNAT tree codes to GCC tree codes for simple expressions. */
static enum tree_code gnu_codes[Number_Node_Kinds];
-/* Current node being treated, in case abort called. */
-Node_Id error_gnat_node;
-
static void init_code_table (void);
static void Compilation_Unit_to_gnu (Node_Id);
static void record_code_position (Node_Id);
structures and then generates code. */
void
-gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
+gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
struct Node *nodes_ptr, Node_Id *next_node_ptr, Node_Id *prev_node_ptr,
struct Elist_Header *elists_ptr, struct Elmt_Item *elmts_ptr,
struct String_Entry *strings_ptr, Char_Code *string_chars_ptr,
int i;
max_gnat_nodes = max_gnat_node;
- number_names = number_name;
- number_files = number_file;
+
Nodes_Ptr = nodes_ptr;
Next_Node_Ptr = next_node_ptr;
Prev_Node_Ptr = prev_node_ptr;
t = create_concat_name (Defining_Entity (Unit (gnat_root)), NULL);
first_global_object_name = ggc_strdup (IDENTIFIER_POINTER (t));
- for (i = 0; i < number_files; i++)
+ for (i = 0; i < number_file; i++)
{
/* Use the identifier table to make a permanent copy of the filename as
the name table gets reallocated after Gigi returns but before all the