diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-14 12:33:56 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-14 12:33:56 +0000 |
commit | fdbdf68c8796ebac7183fcc30d2ff120dfb90c3e (patch) | |
tree | fdf7de0ad79f5ebf51755f94bd08abec7d1fa29c /gcc/ada/sem_util.ads | |
parent | 27d48d240678c34bc7270c3e3db63dfe1de08969 (diff) | |
download | gcc-fdbdf68c8796ebac7183fcc30d2ff120dfb90c3e.tar.gz |
2016-06-14 Ed Schonberg <schonberg@adacore.com>
* contracts.adb (Has_Null_Body): Move to sem_util, for general
availability.
* sem_util.ads, sem_util.adb (Has_Null_Body): Predicate to
determine when an internal procedure created for some assertion
checking (e.g. type invariant) is a null procedure. Used to
eliminate redundant calls to such procedures when they apply to
components of composite types.
* exp_ch3.adb (Build_Component_Invariant_Call): Do not add call
if invariant procedure has a null body.
2016-06-14 Thomas Quinot <quinot@adacore.com>
* g-socket.ads (Check_Selector): Clarify effect on IN OUT socket
set parameters.
2016-06-14 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Process_Action): Pass the action
list to Process_Transient_Object.
(Process_If_Case_Statements): Pass the action list to
Process_Transient_Object.
(Process_Transient_Object): Add new parameter Stmts and update the
comment on usage. When the context is a Boolean evaluation, insert
any finalization calls after the last statement of the construct.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237435 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r-- | gcc/ada/sem_util.ads | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index d0e3d4ee87f..a1e703fbba9 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1103,6 +1103,11 @@ package Sem_Util is -- as expressed in pragma Refined_State. This function does not take into -- account the visible refinement region of abstract state Id. + function Has_Null_Body (Proc_Id : Entity_Id) return Boolean; + -- Determine whether the body of procedure Proc_Id contains a sole + -- null statement, possibly followed by an optional return. Used to + -- optimize useless calls to assertion checks. + function Has_Null_Exclusion (N : Node_Id) return Boolean; -- Determine whether node N has a null exclusion |