[Ada] Add assertions to Preserve_Comes_From_Source and reuse it
authorPiotr Trojanek <trojanek@adacore.com>
Sat, 11 Apr 2020 10:38:06 +0000 (12:38 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 17 Jun 2020 08:14:08 +0000 (04:14 -0400)
commit73642e6899a36de223ea07292e8e7236fb22aee7
tree1b58f1ccfb6f7e2287fcb44b38b2ab583742176d
parent2ead6a05ac937063483ab73a5b63c98bcd5e3f98
[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.
gcc/ada/atree.adb
gcc/ada/exp_ch4.adb
gcc/ada/exp_ch5.adb
gcc/ada/sem_ch12.adb
gcc/ada/sem_ch6.adb
gcc/ada/sem_res.adb