From: Piotr Trojanek Date: Tue, 17 Jul 2018 08:12:08 +0000 (+0000) Subject: [Ada] Reuse Is_Rewrite_Substitution in Relocate_Node X-Git-Tag: upstream/12.2.0~30308 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e164710e27346c3a9450416afaea2190c1055a95;p=platform%2Fupstream%2Fgcc.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 7fe98a6..bde7a0e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,9 @@ 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. * sem_warn.adb (Warn_On_Overlapping_Actuals): Fix RM rule references. diff --git a/gcc/ada/atree.adb b/gcc/ada/atree.adb index 102d7f6..c788977 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;