diff options
author | Robert Dewar <dewar@adacore.com> | 2010-06-17 10:07:53 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2010-06-17 12:07:53 +0200 |
commit | 191fcb3a9f04680935145a21a32f5ba30e3bea74 (patch) | |
tree | 78b8c08b9aee1c03704dc2114f549be155153994 /gcc/ada/tbuild.ads | |
parent | 8a95f4e86791d06494bd5fc8b0da29b9651530fb (diff) | |
download | gcc-191fcb3a9f04680935145a21a32f5ba30e3bea74.zip gcc-191fcb3a9f04680935145a21a32f5ba30e3bea74.tar.gz gcc-191fcb3a9f04680935145a21a32f5ba30e3bea74.tar.bz2 |
checks.adb, [...]: Minor code reorganization.
2010-06-17 Robert Dewar <dewar@adacore.com>
* checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch11.adb,
exp_ch3.adb, exp_ch4.adb: Minor code reorganization.
Use Make_Temporary.
* tbuild.ads, tbuild.adb (Make_Temporary): Clean up, use Entity_Id
instead of Node_Id.
(Make_Temporary): Add more extensive documentation
From-SVN: r160893
Diffstat (limited to 'gcc/ada/tbuild.ads')
-rw-r--r-- | gcc/ada/tbuild.ads | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ada/tbuild.ads b/gcc/ada/tbuild.ads index f6b02cc..d968640 100644 --- a/gcc/ada/tbuild.ads +++ b/gcc/ada/tbuild.ads @@ -179,11 +179,16 @@ package Tbuild is 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 New_Internal_Name (Id). + Related_Node : Node_Id := Empty) return Entity_Id; + -- This function should be used for all cases where a temporary is + -- built with a name to be obtained by New_Internal_Name (here Id is + -- the character passed as the argument to New_Internal_Name). Loc + -- is the location for the Sloc value of the resulting Entity. + -- + -- Related_Node is used when the identifier is capturing the value of + -- an expression (e.g. an aggregate). It should be set whenever possible + -- to point to the expression that is being captured. This is provided + -- to get better error messages, especially from CodePeer reports. function Make_Unsuppress_Block (Loc : Source_Ptr; |