summaryrefslogtreecommitdiff
path: root/gcc/ada/einfo.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-26 10:42:49 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-26 10:42:49 +0000
commitfdd18a7c94f4cbb499dafb7a1a1467fe861d55d9 (patch)
treecfeb29e644e078a2c07b74278a02a9f14cd72b12 /gcc/ada/einfo.adb
parent83f8f0a61fc2a3e1251c1e13591445e84f6492a7 (diff)
downloadgcc-fdd18a7c94f4cbb499dafb7a1a1467fe861d55d9.tar.gz
2007-09-26 Javier Miranda <miranda@adacore.com>
Gary Dismukes <dismukes@adacore.com> * einfo.adb (Is_Thunk): New attribute applicable to subprograms. True for thunks associated with interface types. * einfo.ads: Improve documentatation of Is_Internal (Is_Thunk): New attribute applicable to subprograms. True for thunks associated with interface types. Extensive comment fixes regarding flags that appear in all entities. The documentation is now consistent for all such flags (there were a number of errors in the documentation in this regard). * exp_attr.adb (Expand_N_Attribute_Reference): Minor code cleanup. * exp_ch6.adb (Make_Build_In_Place_Call_*): Return immediately if any of these procedures are passed a function call that already has build-in-place actuals (testing new flag Is_Expanded_Build_In_Place_Call). Set the flag on the function call in the case where processing continues. (Expand_Call): If the call is generated from a thunk body then we propagate the extra actuals associated with the accessibility level of the access type actuals. * sem_ch6.adb (Analyze_Subprogram_Body): Set the Protected_Formal field of each extra formal of a protected operation to reference the corresponding extra formal of the subprogram denoted by the operation's Protected_Body_Subprogram. * sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on N_Function_Call nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128786 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/einfo.adb')
-rw-r--r--gcc/ada/einfo.adb15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ada/einfo.adb b/gcc/ada/einfo.adb
index fad178003e5..013fab917a9 100644
--- a/gcc/ada/einfo.adb
+++ b/gcc/ada/einfo.adb
@@ -483,7 +483,8 @@ package body Einfo is
-- Used_As_Generic_Actual Flag222
-- Is_Descendent_Of_Address Flag223
-- Is_Raised Flag224
- -- (unused) Flag225
+ -- Is_Thunk Flag225
+ --
-- (unused) Flag226
-- (unused) Flag227
-- (unused) Flag228
@@ -1966,6 +1967,12 @@ package body Einfo is
return Flag200 (Id);
end Is_Task_Interface;
+ function Is_Thunk (Id : E) return B is
+ begin
+ pragma Assert (Is_Subprogram (Id));
+ return Flag225 (Id);
+ end Is_Thunk;
+
function Is_True_Constant (Id : E) return B is
begin
return Flag163 (Id);
@@ -4291,6 +4298,11 @@ package body Einfo is
Set_Flag200 (Id, V);
end Set_Is_Task_Interface;
+ procedure Set_Is_Thunk (Id : E; V : B := True) is
+ begin
+ Set_Flag225 (Id, V);
+ end Set_Is_Thunk;
+
procedure Set_Is_True_Constant (Id : E; V : B := True) is
begin
Set_Flag163 (Id, V);
@@ -7264,6 +7276,7 @@ package body Einfo is
W ("Is_Tag", Flag78 (Id));
W ("Is_Tagged_Type", Flag55 (Id));
W ("Is_Task_Interface", Flag200 (Id));
+ W ("Is_Thunk", Flag225 (Id));
W ("Is_True_Constant", Flag163 (Id));
W ("Is_Unchecked_Union", Flag117 (Id));
W ("Is_Unsigned_Type", Flag144 (Id));