In a large LTO build, the assert inside this loop body is triggered because Worklist is empty. This change avoids the problem and appears to successfully compile. The code appears to strongly expect the Worklist to be non-empty.
I will try to find a test case.... but any suggestions along the way would be appreciated.
Hi Wei,
AFAICT, you introduced this code in D21755. It would be great if you could explain the rationale/add a comment for the isOutOfScope part (especially that it has led to this bug).
Also, was there a test added for the case of an out-of-scope condition in D21755?
Thank you,
Adam