diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2024-01-31 13:44:19 +0100 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2025-01-03 16:39:13 +0100 |
commit | c1d22d40490a5b0e2429f0c206e53c8f95948b30 (patch) | |
tree | f8a48e834fea15fc369ada2a4a3eb03f4c85a869 /gcc/fortran/trans-expr.cc | |
parent | b045b3e266f9897a0e3fe15d333bdcb486ae288b (diff) | |
download | gcc-c1d22d40490a5b0e2429f0c206e53c8f95948b30.zip gcc-c1d22d40490a5b0e2429f0c206e53c8f95948b30.tar.gz gcc-c1d22d40490a5b0e2429f0c206e53c8f95948b30.tar.bz2 |
ada: Simplify traversal procedures into traversal functions
Instead of using the generic routine Traverse_Proc to set a global flag when a
particular node is found, we can use its underlying routine Traverse_Func and
check if traversal has been abandoned. We already used this pattern in a number
of places; this patch merely applies it the remaining uses of Traverse_Proc.
Code cleanup; semantics is unaffected.
gcc/ada/ChangeLog:
* exp_ch3.adb (Search_Access_Discriminant, Search_Current_Instance,
Search_Internal_Call): Use traversal function instead of traversal
procedure and remove associated global variables.
* exp_util.adb (Search_Calls): Likewise.
* sem_prag.adb (Contains_Loop_Entry): Likewise.
* sem_util.adb (Mentions_Post_State): Likewise.
Diffstat (limited to 'gcc/fortran/trans-expr.cc')
0 files changed, 0 insertions, 0 deletions