diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2018-07-31 09:55:37 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-07-31 09:55:37 +0000 |
commit | bb6a856baf496a1b6fb5e6aa481776cdf2a399ef (patch) | |
tree | c36484de29bda5fc90c59d60ba55334e6d9f2e3e /gcc/ada/lib-xref.adb | |
parent | e8723e74410de463cdba50e31489f7803387c9bd (diff) | |
download | gcc-bb6a856baf496a1b6fb5e6aa481776cdf2a399ef.zip gcc-bb6a856baf496a1b6fb5e6aa481776cdf2a399ef.tar.gz gcc-bb6a856baf496a1b6fb5e6aa481776cdf2a399ef.tar.bz2 |
[Ada] Replace low-level calls to Ekind with high-level calls to Is_Formal
High-level wrappers are easier to read. This change came up while reading
some code related to GNATprove, but then uniformly applied to the entire
frontend. For the few remaining membership tests that could be replaced
by Is_Formal it is not obvious whether the high-level routine makes the
code better.
2018-07-31 Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* exp_aggr.adb, exp_ch4.adb, exp_ch6.adb, lib-xref.adb,
repinfo.adb, sem_ch9.adb: Minor replace Ekind membership tests
with a wrapper routine.
From-SVN: r263093
Diffstat (limited to 'gcc/ada/lib-xref.adb')
-rw-r--r-- | gcc/ada/lib-xref.adb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/lib-xref.adb b/gcc/ada/lib-xref.adb index eaa7aa6..b3ff466 100644 --- a/gcc/ada/lib-xref.adb +++ b/gcc/ada/lib-xref.adb @@ -1034,7 +1034,7 @@ package body Lib.Xref is -- parameters may end up being marked as not coming from source -- although they are. Take these into account specially. - elsif GNATprove_Mode and then Ekind (E) in Formal_Kind then + elsif GNATprove_Mode and then Is_Formal (E) then Ent := E; -- Entity does not come from source, but is a derived subprogram and |