Minor cleanup in elaborate_expression
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 23 Jun 2020 15:44:43 +0000 (17:44 +0200)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Tue, 23 Jun 2020 16:35:46 +0000 (18:35 +0200)
gcc/ada/ChangeLog:
* gcc-interface/decl.c (elaborate_expression): Replace calls to
Is_OK_Static_Expression with Compile_Time_Known_Value.

gcc/ada/gcc-interface/decl.c

index 589154b..63118be 100644 (file)
@@ -6774,13 +6774,13 @@ elaborate_expression (Node_Id gnat_expr, Entity_Id gnat_entity, const char *s,
   /* If we don't need a value and this is static or a discriminant,
      we don't need to do anything.  */
   if (!need_value
-      && (Is_OK_Static_Expression (gnat_expr)
+      && (Compile_Time_Known_Value (gnat_expr)
          || (Nkind (gnat_expr) == N_Identifier
              && Ekind (Entity (gnat_expr)) == E_Discriminant)))
     return NULL_TREE;
 
   /* If it's a static expression, we don't need a variable for debugging.  */
-  if (need_debug && Is_OK_Static_Expression (gnat_expr))
+  if (need_debug && Compile_Time_Known_Value (gnat_expr))
     need_debug = false;
 
   /* Otherwise, convert this tree to its GCC equivalent and elaborate it.  */