This is an archive of the discontinued LLVM Phabricator instance.

Further delay calling DeclMustBeEmitted until it's safe.
ClosedPublic

Authored by teemperor on Apr 25 2017, 11:10 AM.

Details

Reviewers
rsmith
Summary

As discussed in D30793, we have some unsafe calls to isConsumerInterestedIn(). This patch implements Richard's suggestion (from the inline comment) that we should track if we just deserialized an declaration. If we just deserialized, we can skip the unsafe call because we know it's interesting. If we didn't just deserialize the declaration, calling isConsumerInterestedIn() should be safe.

Diff Detail

Event Timeline

teemperor created this revision.Apr 25 2017, 11:10 AM
rsmith accepted this revision.May 9 2017, 10:16 AM

Let's go ahead with this. I've been unable to find a testcase that triggers the problem, but we shouldn't keep a known latent bug around just because we don't know how to expose it yet.

This revision is now accepted and ready to land.May 9 2017, 10:16 AM

This is mentioned as a fix for PR31863, which is a blocker for the 4.0.1 release, is there any reason this hasn't been committed to trunk yet?

We were trying to come up with a test case. So far we are unsuccessful. I will check it in as is.

v.g.vassilev closed this revision.May 19 2017, 9:59 AM

Landed in r303432.