mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Some changes I was working on uncovered a latent bug where we would emit a class_method instruction to call an allocating initializer that did not have a vtable entry. Previously this wasn't caught because the only example of this in our test suite was in test/SILGen/objc_bridging_any.swift, which did not test with IRGen; if it did, an IRGen crash would have been observed. Factor out some code duplication to prevent this from happening again, and add a SILGen test that we emit a vtable entry in this case, and that the test case passes IRGen also.
1.5 KiB
1.5 KiB