From: Eric Botcazou Date: Tue, 23 Jun 2020 15:44:43 +0000 (+0200) Subject: Minor cleanup in elaborate_expression X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cd42cdc225a905cb1eb38dfad453e654261a659e;p=gcc.git Minor cleanup in elaborate_expression gcc/ada/ChangeLog: * gcc-interface/decl.c (elaborate_expression): Replace calls to Is_OK_Static_Expression with Compile_Time_Known_Value. --- diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 589154ba392..63118bee930 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -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. */