aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/nlists.adb
diff options
context:
space:
mode:
authorJustin Squirek <squirek@adacore.com>2017-01-12 13:24:16 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2017-01-12 14:24:16 +0100
commit84e13614352202b592fd28fc12c18c07b5ae5d53 (patch)
tree15e79b2416422beed5858d9030464c5814ace26b /gcc/ada/nlists.adb
parente51102b29c1489ded25723b8149f44a32ff10696 (diff)
downloadgcc-84e13614352202b592fd28fc12c18c07b5ae5d53.zip
gcc-84e13614352202b592fd28fc12c18c07b5ae5d53.tar.gz
gcc-84e13614352202b592fd28fc12c18c07b5ae5d53.tar.bz2
exp_ch6.adb (Check_View_Conversion): Created this function to properly chain calls to check type invariants that may...
2017-01-12 Justin Squirek <squirek@adacore.com> * exp_ch6.adb (Check_View_Conversion): Created this function to properly chain calls to check type invariants that may be present in a subprogram call after the subprogram. (Expand_Call): Add a conditional to identify when a view conversion needs to be checked. * nlists.adb, nlists.ads (Prepend_New): New routine. (Prepend_New_To): New routine. From-SVN: r244354
Diffstat (limited to 'gcc/ada/nlists.adb')
-rw-r--r--gcc/ada/nlists.adb22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ada/nlists.adb b/gcc/ada/nlists.adb
index e366786..b5b2d8a 100644
--- a/gcc/ada/nlists.adb
+++ b/gcc/ada/nlists.adb
@@ -1158,6 +1158,28 @@ package body Nlists is
Prepend_List (List, To);
end Prepend_List_To;
+ -----------------
+ -- Prepend_New --
+ -----------------
+
+ procedure Prepend_New (Node : Node_Or_Entity_Id; To : in out List_Id) is
+ begin
+ if No (To) then
+ To := New_List;
+ end if;
+
+ Prepend (Node, To);
+ end Prepend_New;
+
+ --------------------
+ -- Prepend_New_To --
+ --------------------
+
+ procedure Prepend_New_To (To : in out List_Id; Node : Node_Or_Entity_Id) is
+ begin
+ Prepend_New (Node, To);
+ end Prepend_New_To;
+
----------------
-- Prepend_To --
----------------