Commit Graph

6 Commits

Author SHA1 Message Date
Slava Pestov
ce2a434587 SILGen: Fix bug with vtable entries for allocating initializers
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.
2017-11-11 02:01:50 -08:00
Michael Gottesman
3eb4cfd7da [sil-ownership] Enable sil ownership verification on 84 more tests.
rdar://33358110
2017-08-29 19:17:25 -07:00
Robert Widmann
71bf312a25 Migrate the rest of the tests to %empty-directory 2017-06-04 11:08:39 -07:00
Joe Groff
85e4456457 SILGen: Substitute initializer's interface type into thunk's context in emitForeignToNativeThunk.
rdar://problem/32331915
2017-05-22 12:26:33 -07:00
Joe Groff
e8245256cc Test requires objc_interop 2017-05-20 12:22:35 -07:00
Joe Groff
ff2e4bfd0c SILGen: Use VarDecl::getInterfaceType instead of getType in emitForeignToNativeThunk.
getType() only gets set if the decl is type-checked, and is deprecated moreover. Fixes rdar://problem/32280288.
2017-05-19 17:57:54 -07:00