[COMMITTED] ada: Small refactor

Message ID 20230728073056.1852677-1-poulhies@adacore.com
State Unresolved
Headers
Series [COMMITTED] ada: Small refactor |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Marc Poulhiès July 28, 2023, 7:30 a.m. UTC
  From: Viljar Indus <indus@adacore.com>

gcc/ada/

	* exp_util.adb (Find_Optional_Prim_Op): use "No" instead of "= Empty"

Tested on x86_64-pc-linux-gnu, committed on master.

---
 gcc/ada/exp_util.adb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 66e1acbf65e..9f843d6d71e 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -6291,8 +6291,9 @@  package body Exp_Util is
 
       Typ := Underlying_Type (Typ);
 
-      --  We cannot find the operation if there is no full view available.
-      if Typ = Empty then
+      --  We cannot find the operation if there is no full view available
+
+      if No (Typ) then
          return Empty;
       end if;