aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/bindgen.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-05-15 11:37:57 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-05-15 11:37:57 +0200
commitbb9c600b570e96332a06075f74affc3f51abe393 (patch)
tree0bf23f114d97e5a8f1413d50d35b32ce8ee4119f /gcc/ada/bindgen.adb
parentc4c768ddedd306d53d4b32166816c974c14e0f61 (diff)
downloadgcc-bb9c600b570e96332a06075f74affc3f51abe393.zip
gcc-bb9c600b570e96332a06075f74affc3f51abe393.tar.gz
gcc-bb9c600b570e96332a06075f74affc3f51abe393.tar.bz2
[multiple changes]
2012-05-15 Ed Schonberg <schonberg@adacore.com> * sem_eval.adb (Subtypes_Statically_Match): In Ada 2012, static matching requires matching of static subtype predicates as well. 2012-05-15 Ed Schonberg <schonberg@adacore.com> * sem_case.adb (Analyze_Choices): If the subtype of the expression has a non-static predicate, the case alternatives must cover the base type. 2012-05-15 Tristan Gingold <gingold@adacore.com> * a-calend-vms.ads: Add pragma export to Split and Time_Of. Merge comments from a-calend.ads to minimize differences. 2012-05-15 Sergey Rybin <rybin@adacore.com frybin> * gnat_ugn.texi: gnatmetric: add a small example that demonstrates the difference between control coupling and unit coupling. 2012-05-15 Tristan Gingold <gingold@adacore.com> * bindgen.adb (Gen_Header): Remove code to emit LE_Set. (Gen_Finalize_Library): Replace test with a call to __gnat_reraise_library_exception_if_any. * s-soflin.ads (Library_Exception): Do not export. (Library_Exception_Set): Likewise. * a-except-2005.ads, a-except-2005.adb (Reraise_Library_Exception_If_Any): New procedure. From-SVN: r187509
Diffstat (limited to 'gcc/ada/bindgen.adb')
-rw-r--r--gcc/ada/bindgen.adb42
1 files changed, 10 insertions, 32 deletions
diff --git a/gcc/ada/bindgen.adb b/gcc/ada/bindgen.adb
index c44a648..686082d 100644
--- a/gcc/ada/bindgen.adb
+++ b/gcc/ada/bindgen.adb
@@ -1357,19 +1357,6 @@ package body Bindgen is
procedure Gen_Header is
begin
WBI (" procedure finalize_library is");
-
- -- The following flag is used to check for library-level exceptions
- -- raised during finalization. Symbol comes from System.Soft_Links.
- -- VM targets use regular Ada to reference the entity.
-
- if VM_Target = No_VM then
- WBI (" LE_Set : Boolean;");
-
- Set_String (" pragma Import (Ada, LE_Set, ");
- Set_String ("""__gnat_library_exception_set"");");
- Write_Statement_Buffer;
- end if;
-
WBI (" begin");
end Gen_Header;
@@ -1569,27 +1556,17 @@ package body Bindgen is
-- and the routine necessary to raise it.
if VM_Target = No_VM then
- WBI (" if LE_Set then");
- WBI (" declare");
- WBI (" LE : Ada.Exceptions.Exception_Occurrence;");
-
- Set_String (" pragma Import (Ada, LE, ");
- Set_String ("""__gnat_library_exception"");");
- Write_Statement_Buffer;
-
- Set_String (" procedure Raise_From_Controlled_");
- Set_String ("Operation (X : Ada.Exceptions.Exception_");
- Set_String ("Occurrence);");
- Write_Statement_Buffer;
+ WBI (" declare");
+ WBI (" procedure Reraise_Library_Exception_If_Any;");
- Set_String (" pragma Import (Ada, Raise_From_");
- Set_String ("Controlled_Operation, ");
- Set_String ("""__gnat_raise_from_controlled_operation"");");
+ Set_String (" pragma Import (Ada, ");
+ Set_String ("Reraise_Library_Exception_If_Any, ");
+ Set_String ("""__gnat_reraise_library_exception_if_any"");");
Write_Statement_Buffer;
- WBI (" begin");
- WBI (" Raise_From_Controlled_Operation (LE);");
- WBI (" end;");
+ WBI (" begin");
+ WBI (" Reraise_Library_Exception_If_Any;");
+ WBI (" end;");
-- VM-specific code, use regular Ada to produce the desired behavior
@@ -1599,9 +1576,10 @@ package body Bindgen is
Set_String (" Ada.Exceptions.Reraise_Occurrence (");
Set_String ("System.Soft_Links.Library_Exception);");
Write_Statement_Buffer;
+
+ WBI (" end if;");
end if;
- WBI (" end if;");
WBI (" end finalize_library;");
WBI ("");
end if;