From: Piotr Trojanek Date: Tue, 17 Jul 2018 08:12:08 +0000 (+0000) Subject: [Ada] Reuse Is_Rewrite_Substitution in Relocate_Node X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e164710e27346c3a9450416afaea2190c1055a95;p=gcc.git [Ada] Reuse Is_Rewrite_Substitution in Relocate_Node Semantics not affected; the reused routine is exactly the same as the replaced condition. 2018-07-17 Piotr Trojanek gcc/ada/ * atree.adb (Relocate_Node): Simplify with Is_Rewrite_Substitution. From-SVN: r262799 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7fe98a6d73d..bde7a0eee81 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2018-07-17 Piotr Trojanek + + * atree.adb (Relocate_Node): Simplify with Is_Rewrite_Substitution. + 2018-07-17 Piotr Trojanek * sem_util.ads (Denotes_Same_Object): Likewise. diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb index 102d7f6a08a..c7889779e77 100644 --- a/gcc/ada/atree.adb +++ b/gcc/ada/atree.adb @@ -2186,7 +2186,7 @@ package body Atree is -- If the node being relocated was a rewriting of some original node, -- then the relocated node has the same original node. - if Orig_Nodes.Table (Source) /= Source then + if Is_Rewrite_Substitution (Source) then Orig_Nodes.Table (New_Node) := Orig_Nodes.Table (Source); end if;