diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 13:20:37 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-27 13:20:37 +0000 |
commit | ed1955558aba1fc7929d187428212e81843a0b93 (patch) | |
tree | 6e8682c976a9051e2545f9219739a10e43057474 /gcc/ada/sem_util.adb | |
parent | a53791eee599e9d577e60b015199417c8d95c9a6 (diff) | |
download | gcc-ed1955558aba1fc7929d187428212e81843a0b93.tar.gz |
2009-07-27 Robert Dewar <dewar@adacore.com>
* exp_ch6.adb (Expand_Call): Reset Is_Known_Valid after call
* sem_ch3.adb, sem_eval.adb, sem_aux.adb: Minor comment reformatting
2009-07-27 Geert Bosch <bosch@adacore.com>
* checks.adb (Find_Check): Minor streamlining of logic.
* gnat1drv.adb(Gnat1drv): Put Check_Rep_Info in its alphabetical order.
* debug.adb: Document -gnatdX debug flag
* exp_ch2.adb(Expand_Entity_Reference): Implement new -gnatdX flag to
list information about reads from scalar entities.
Also slightly simplify condition for Expand_Current_Value.
* sem_util.ads, sem_util.adb (Is_LHS, Is_Actual_Out_Parameter): New
functions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150110 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r-- | gcc/ada/sem_util.adb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 8cd32783e1a..11abc976d2c 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -5334,6 +5334,20 @@ package body Sem_Util is and then E = Base_Type (E); end Is_AAMP_Float; + ----------------------------- + -- Is_Actual_Out_Parameter -- + ----------------------------- + + function Is_Actual_Out_Parameter (N : Node_Id) return Boolean is + Formal : Entity_Id; + Call : Node_Id; + begin + Find_Actual (N, Formal, Call); + + return Present (Formal) + and then Ekind (Formal) = E_Out_Parameter; + end Is_Actual_Out_Parameter; + ------------------------- -- Is_Actual_Parameter -- ------------------------- @@ -6113,6 +6127,17 @@ package body Sem_Util is end if; end Is_Fully_Initialized_Variant; + ------------ + -- Is_LHS -- + ------------ + + function Is_LHS (N : Node_Id) return Boolean is + P : constant Node_Id := Parent (N); + begin + return Nkind (P) = N_Assignment_Statement + and then Name (P) = N; + end Is_LHS; + ---------------------------- -- Is_Inherited_Operation -- ---------------------------- |