diff options
author | Olivier Hainque <hainque@adacore.com> | 2015-11-23 11:20:34 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2015-11-23 11:20:34 +0000 |
commit | 0ab0bf955aa7940b6ed5e4790183c298b864201a (patch) | |
tree | 267b1724f61677cc6d135ffc9cc85a5cab60ec2a /gcc/ada/fe.h | |
parent | f119bebb36fc3680e94123630f57357d1ae571f6 (diff) | |
download | gcc-0ab0bf955aa7940b6ed5e4790183c298b864201a.zip gcc-0ab0bf955aa7940b6ed5e4790183c298b864201a.tar.gz gcc-0ab0bf955aa7940b6ed5e4790183c298b864201a.tar.bz2 |
opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ, Back_End_SJLJ and Back_End_ZCX.
2015-11-23 Olivier Hainque <hainque@adacore.com>
Eric Botcazou <botcazou@adacore.com>
* opt.ads (Exception_Mechanism): Now three values: Front_End_SJLJ,
Back_End_SJLJ and Back_End_ZCX.
(Back_End_Exceptions, Front_End_Exceptions, ZCX_Exceptions,
SJLJ_Exceptions): New functions, reflecting properties of the current
Exception_Mechanism.
* opt.adb: Implement the new functions.
* fe.h: Bind the new Exception_Mechanism and helper functions for gigi.
* exp_ch11.adb (Expand_At_End_Handler): Replace test on mechanism by
use of property helper and update comments.
(Expand_Exception_Handlers): Replace tests on mechanism by use of
helper. Restrict Abort_Defer to ZCX specifically.
* exp_ch9.adb (Expand_N_Asynchronous_Select): Replace tests on
mechanism by calls to helper functions. Abort_Undefer for ZCX only,
paired with Expand_Exception_Handlers.
* exp_sel.adb (Build_Abort_Block_Handler): Replace tests on mechanism
by calls to helper functions. Abort_Undefer for ZCX only, paired with
Expand_Exception_Handlers.
* lib-writ.ads (P line documentation): Add entry for "FX",
representative of unit compiled with Frontend_Exceptions True.
* lib-writ.adb (Output_Main_Program_Line): Add "FX" on P line if
compiled with Frontend_Exceptions True.
* ali.ads (ALIs_Record): Ada a Frontend_Exceptions component, to reflect
whether the ALI file contained an "FX" indication on the P line.
(Frontend_Exceptions_Specified): New boolean, to keep track of whether
at least an FX ALI file is in the closure.
* ali.adb (Scan_ALI): Handle "FX" on the P line.
(Initialize_ALI): Initialize Frontend_Exceptions_Specified to False.
* targparm.ads: Update desription of exception schemes.
(Frontend_Exceptions_On_Target): New flag, reflect Frontend_Exceptions
set to True in system.ads, or not set at all.
* targparm.adb (Targparm_Tags): Add FEX to convey Frontend_Exceptions.
Rename ZCD to ZCX for consistency.
(FEX_Str, Targparm_Str, Get_Target_Parameters): Adjust accordingly.
* gnat1drv.adb (Adjust_Global_Switches): Adjust Exception_Mechanism
setting, now from combination of Frontend_Exceptions and ZCX_By_Default.
* bcheck.adb (Check_Consistent_Zero_Cost_Exception_Handling): Rename
as ...
(Check_Consistent_Exception_Handling): Check consistency of both
ZCX_By_Default and Frontend_Exceptions.
(Check_Configuration_Consistency): Check_Consistent_Exception_Handling
if either flag was set at least once.
* make.adb (Check): Remove processing of a possible -fsjlj coming from
lang-specs.h.
* gnatlink.adb (Gnatlin): Likewise.
* gcc-interface/Makefile.in (gnatlib-sjlj/zcx): Now set
both ZCX_By_Default and Frontend_Exceptions.
* gcc-interface/decl.c (gnat_to_gnu_entity, case E_Variable):
Use eh property helper to test for back-end exceptions. Adjust
mechanism name when testing for front-end sjlj.
(case E_Procedure): Likewise.
* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu):
Likewise, and rename local variables.
(Exception_Handler_to_gnu_sjlj): Rename as
Exception_Handler_to_gnu_fe_sjlj.
(Exception_Handler_to_gnu_zcx): Rename as
Exception_Handler_to_gnu_gcc and adjust tests on eh mechanisms
to use property helpers or correct mechanism name.
Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r230752
Diffstat (limited to 'gcc/ada/fe.h')
-rw-r--r-- | gcc/ada/fe.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index 36befa6..e9c3721 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -178,7 +178,9 @@ extern Boolean In_Same_Source_Unit (Node_Id, Node_Id); #define List_Representation_Info opt__list_representation_info #define No_Strict_Aliasing_CP opt__no_strict_aliasing -typedef enum {Setjmp_Longjmp, Back_End_Exceptions} Exception_Mechanism_Type; +typedef enum { + Front_End_SJLJ, Back_End_ZCX, Back_End_SJLJ +} Exception_Mechanism_Type; extern Boolean Back_End_Inlining; extern Boolean Exception_Extra_Info; @@ -190,6 +192,16 @@ extern Boolean GNAT_Mode; extern Int List_Representation_Info; extern Boolean No_Strict_Aliasing_CP; +#define ZCX_Exceptions opt__zcx_exceptions +#define SJLJ_Exceptions opt__sjlj_exceptions +#define Front_End_Exceptions opt__front_end_exceptions +#define Back_End_Exceptions opt__back_end_exceptions + +extern Boolean ZCX_Exceptions (void); +extern Boolean SJLJ_Exceptions (void); +extern Boolean Front_End_Exceptions (void); +extern Boolean Back_End_Exceptions (void); + /* restrict: */ #define No_Exception_Handlers_Set restrict__no_exception_handlers_set |