[Ada] Deconstruct always-false calls to Withed_Body in Walk_Library_Items
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 16 Jul 2018 14:11:25 +0000 (14:11 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 16 Jul 2018 14:11:25 +0000 (14:11 +0000)
commitfeb7f36cad506b667a778b78d034491cb909c8c2
treefa77ff3a79db958884c625643647d578d95ad160
parent9cd7bc5e000a2be07995aea4ff762f89c0e0661e
[Ada] Deconstruct always-false calls to Withed_Body in Walk_Library_Items

We previously removed the calls to Set_Withed_Body; this commit deconstructs
calls to Withed_Body, which always returned False.

The Set_Withed_Body/Withed_Body were helping the Walk_Library_Items routine
traverse the AST of several compilation units such that declarations are
visited before references. However, this never worked as it should and there is
no point to keep the code more complicated than necessary.

No test provided, because thie removed code was ineffective (and only used in
the non-compiler backends, i.e. CodePeer and GNATprove).

2018-07-16  Piotr Trojanek  <trojanek@adacore.com>

gcc/ada/

* sem.adb (Walk_Library_Items): Deconstruct dead code.

From-SVN: r262718
gcc/ada/ChangeLog
gcc/ada/sem.adb