diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-04-11 12:38:06 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-17 04:14:08 -0400 |
commit | 73642e6899a36de223ea07292e8e7236fb22aee7 (patch) | |
tree | 1b58f1ccfb6f7e2287fcb44b38b2ab583742176d /gcc/ada/exp_ch4.adb | |
parent | 2ead6a05ac937063483ab73a5b63c98bcd5e3f98 (diff) | |
download | gcc-73642e6899a36de223ea07292e8e7236fb22aee7.zip gcc-73642e6899a36de223ea07292e8e7236fb22aee7.tar.gz gcc-73642e6899a36de223ea07292e8e7236fb22aee7.tar.bz2 |
[Ada] Add assertions to Preserve_Comes_From_Source and reuse it
2020-06-17 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* atree.adb (Preserve_Comes_From_Source): Rewrite using
Set_Comes_From_Source and Comes_From_Source, which enforce that
the parameters are valid.
* exp_ch4.adb, exp_ch5.adb, sem_ch12.adb, sem_ch6.adb,
sem_res.adb: Rewrite using Preserve_Comes_From_Source.
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r-- | gcc/ada/exp_ch4.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 8d427fe..752a15f 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -937,8 +937,8 @@ package body Exp_Ch4 is -- the original allocator node. This is for proper handling of -- restriction No_Implicit_Heap_Allocations. - Set_Comes_From_Source - (Expression (Temp_Decl), Comes_From_Source (N)); + Preserve_Comes_From_Source + (Expression (Temp_Decl), N); Set_No_Initialization (Expression (Temp_Decl)); Insert_Action (N, Temp_Decl); |