[PATCH] D22057: Prevent devirtualization of calls to un-instantiated functions.

Richard Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 9 17:42:16 PST 2017


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D22057#543199, @Sunil_Srivastava wrote:

> Now: Why the InstantiationIsPending bit is not precisely tracking the presence in the PendingInstantiations list?


[...]

> The instantiation loop removes items from the PendingInstantiations list and instantiates them, if the body is present. In the case of Func2, the body is not present, the function has already been removed from the list, yet it is not isDefined().

I see, so the only case in which the list and the flag differs is when we're doing the final instantiation step at the end of the TU? (In all other cases, we'd put the function back on the list for later instantiations to retry.) That seems fine.


https://reviews.llvm.org/D22057





More information about the cfe-commits mailing list