OSDN Git Service

* c-decl.c (grokfield): Allow typedefs for anonymous structs and
[pf3gnuchains/gcc-fork.git] / gcc / ada / tbuild.ads
index cca0d20..0b73a53 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 1992-2008, Free Software Foundation, Inc.         --
+--          Copyright (C) 1992-2009, Free Software Foundation, Inc.         --
 --                                                                          --
 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
 -- terms of the  GNU General Public License as published  by the Free Soft- --
@@ -27,6 +27,7 @@
 --  building specific types of tree nodes.
 
 with Namet; use Namet;
+with Sinfo; use Sinfo;
 with Types; use Types;
 
 package Tbuild is
@@ -82,8 +83,9 @@ package Tbuild is
    pragma Inline (Make_Implicit_Exception_Handler);
    --  This is just like Make_Exception_Handler, except that it also sets the
    --  Local_Raise_Statements field to No_Elist, ensuring that it is properly
-   --  initialized. This should always be used when creating exception handlers
-   --  as part of the expansion.
+   --  initialized. This should always be used when creating implicit exception
+   --  handlers during expansion (i.e. handlers that do not correspond to user
+   --  source program exception handlers).
 
    function Make_Implicit_If_Statement
      (Node            : Node_Id;
@@ -174,6 +176,15 @@ package Tbuild is
    --  A convenient form of Make_String_Literal, where the string value
    --  is given as a normal string instead of a String_Id value.
 
+   function Make_Temporary
+     (Loc          : Source_Ptr;
+      Id           : Character;
+      Related_Node : Node_Id := Empty) return Node_Id;
+   --  Create a defining identifier to capture the value of an expression
+   --  or aggregate, and link it to the expression that it replaces, in
+   --  order to provide better CodePeer reports. The defining identifier
+   --  name is obtained by Make_Internal_Name (Id).
+
    function Make_Unsuppress_Block
      (Loc   : Source_Ptr;
       Check : Name_Id;
@@ -186,6 +197,12 @@ package Tbuild is
    --  "raise Constraint_Error" and returns the root of this tree,
    --  the N_Raise_Statement node.
 
+   function New_Op_Node
+     (New_Node_Kind : Node_Kind;
+      New_Sloc      : Source_Ptr) return Node_Id;
+   --  Create node using New_Node and, if its kind is in N_Op, set its Chars
+   --  field accordingly.
+
    function New_External_Name
      (Related_Id   : Name_Id;
       Suffix       : Character := ' ';
@@ -202,11 +219,11 @@ package Tbuild is
    --
    --  Prefix is prepended only if Prefix is non-blank (in which case it
    --  must be an upper case letter other than O,Q,U,W (which are used for
-   --  identifier encoding, see Namet), and T is reserved for use by implicit
-   --  types, and X is reserved for use by debug type encoding (see package
-   --  Exp_Dbug). Note: the reason that Prefix is last is that it is almost
-   --  always omitted. The notable case of Prefix being non-null is when
-   --  it is 'T' for an implicit type.
+   --  identifier encoding, see Namet), or an underscore, and T is reserved for
+   --  use by implicit types, and X is reserved for use by debug type encoding
+   --  (see package Exp_Dbug). Note: the reason that Prefix is last is that it
+   --  is almost always omitted. The notable case of Prefix being non-null is
+   --  when it is 'T' for an implicit type.
 
    --  Suffix_Index'Image is appended only if the value of Suffix_Index is
    --  positive, or if Suffix_Index is negative 1, then a unique serialized
@@ -255,12 +272,11 @@ package Tbuild is
    function New_Occurrence_Of
      (Def_Id : Entity_Id;
       Loc    : Source_Ptr) return Node_Id;
-   --  New_Occurrence_Of creates an N_Identifier node which is an
-   --  occurrence of the defining identifier which is passed as its
-   --  argument. The Entity and Etype of the result are set from
-   --  the given defining identifier as follows: Entity is simply
-   --  a copy of Def_Id. Etype is a copy of Def_Id for types, and
-   --  a copy of the Etype of Def_Id for other entities.
+   --  New_Occurrence_Of creates an N_Identifier node which is an occurrence
+   --  of the defining identifier which is passed as its argument. The Entity
+   --  and Etype of the result are set from the given defining identifier as
+   --  follows: Entity is simply a copy of Def_Id. Etype is a copy of Def_Id
+   --  for types, and a copy of the Etype of Def_Id for other entities.
 
    function New_Reference_To
      (Def_Id : Entity_Id;