[Ada] Further cleanup in inlining machinery
This gets rid of a small issue in the inlining machinery: under very
peculiar circumstances, it would add a pending instantiation for the
body of a generic package at the point of call to an inlined subprogram
of the instance. That's theoritically problematic because the saved
context is that of the call and not that of the instance in this case,
although the strict conditions ensure that this doesn't make a real
difference in practice.
Now that the machinery can perform the pending instantiations on demand,
we can optimistically add more of them when the instantiations are
analyzed and thus remove the problematic handling at the point of call.
No functional changes.
2019-08-19 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* inline.adb (Add_Inlined_Body): Do not add pending
instantiations.
* sem_ch12.adb (Needs_Body_Instantiated): New predicate.
(Analyze_Package_Instantiation): Use it to decide whether to add
a pending instantiation for the body of the package.
From-SVN: r274639