aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/bindgen.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 10:52:00 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-29 10:52:00 +0200
commit0bfc9a64c3b167a8d3f1b9b1ab0caced30ca554e (patch)
tree180057e9ba8d4c3cf2672fb0566a3983b4975d40 /gcc/ada/bindgen.adb
parent828d4cf0c9778ede598a93b89924485aa5833772 (diff)
downloadgcc-0bfc9a64c3b167a8d3f1b9b1ab0caced30ca554e.zip
gcc-0bfc9a64c3b167a8d3f1b9b1ab0caced30ca554e.tar.gz
gcc-0bfc9a64c3b167a8d3f1b9b1ab0caced30ca554e.tar.bz2
[multiple changes]
2011-08-29 Thomas Quinot <quinot@adacore.com> * get_scos.adb: Ignore chaining indicators not currently supported by Ada. 2011-08-29 Arnaud Charlet <charlet@adacore.com> * system.ads: Minor editing. 2011-08-29 Arnaud Charlet <charlet@adacore.com> * bindgen.adb (Gen_Elab_Calls): Generate calls to subp'Elab_Subp_Body in CodePeer mode. * sem_attr.ads, sem_attr.adb, exp_Attr.adb, sem_ch6.adb: Add handling of Attribute_Elab_Subp_Body. * snames.ads-tmpl (Attribute_Elab_Subp_Body, Name_Elab_Subp_Body): New. * sem_util.adb: Update comments. From-SVN: r178165
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r--gcc/ada/bindgen.adb22
1 files changed, 15 insertions, 7 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index 78c077c..6e0d5bd 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -984,7 +984,12 @@ package body Bindgen is
-- Case of no elaboration code
- elsif U.No_Elab then
+ elsif U.No_Elab
+ and then (not CodePeer_Mode
+ or else U.Utype = Is_Spec
+ or else U.Utype = Is_Spec_Only
+ or else U.Unit_Kind /= 's')
+ then
-- The only case in which we have to do something is if this
-- is a body, with a separate spec, where the separate spec
@@ -1019,10 +1024,7 @@ package body Bindgen is
-- The uname_E increment is skipped if this is a separate spec,
-- since it will be done when we process the body.
- -- Ignore subprograms in CodePeer mode, since no useful
- -- elaboration subprogram is needed by CodePeer.
-
- elsif U.Unit_Kind /= 's' or else not CodePeer_Mode then
+ else
Check_Elab_Flag :=
not CodePeer_Mode
and then (Force_Checking_Of_Elaboration_Flags
@@ -1055,12 +1057,18 @@ package body Bindgen is
if Name_Buffer (Name_Len) = 's' then
Name_Buffer (Name_Len - 1 .. Name_Len + 8) :=
"'elab_spec";
+ Name_Len := Name_Len + 8;
+
+ elsif U.Unit_Kind = 's' and CodePeer_Mode then
+ Name_Buffer (Name_Len - 1 .. Name_Len + 13) :=
+ "'elab_subp_body";
+ Name_Len := Name_Len + 13;
+
else
Name_Buffer (Name_Len - 1 .. Name_Len + 8) :=
"'elab_body";
+ Name_Len := Name_Len + 8;
end if;
-
- Name_Len := Name_Len + 8;
end if;
Set_Casing (U.Icasing);