OSDN Git Service

* gcc-interface/gigi.h: Reorder declarations and tweak comments.
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Apr 2010 08:14:54 +0000 (08:14 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 01:00:47 +0000 (10:00 +0900)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158296 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/gigi.h
gcc/ada/gcc-interface/trans.c

index 79c4721..1ec190e 100644 (file)
@@ -1,5 +1,18 @@
 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
index d9459e5..6b7790b 100644 (file)
@@ -168,12 +168,18 @@ extern tree create_concat_name (Entity_Id gnat_entity, const char *suffix);
    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.  */
@@ -184,11 +190,9 @@ struct File_Info_Type
 };
 
 /* 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,
@@ -257,13 +261,6 @@ extern void post_error_ne_tree_2 (const char *msg, Node_Id node, Entity_Id ent,
    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;
 
index 7716061..ec2b8ca 100644 (file)
@@ -49,6 +49,7 @@
 #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;
@@ -89,14 +86,20 @@ struct String_Entry *Strings_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.  */
@@ -183,9 +186,6 @@ static GTY(()) tree gnu_program_error_label_stack;
 /* 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);
@@ -226,7 +226,7 @@ static const char *decode_name (const char *) ATTRIBUTE_UNUSED;
    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,
@@ -242,8 +242,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
   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;
@@ -262,7 +261,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name,
   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