Commits

Slava Pestov committed 37c461cc594
Serialization: Serialize shared thunks referenced from fragile functions If a thunk is referenced from two different functions, the thunk inherits the fragile attribute from the first function that forced it to be emitted. This is wrong, in case the first function might not be fragile, while the second one is. Copying the fragile attribute to an existing thunk when checking if it has already been emitted is also wrong, because the thunk might reference another thunk, and so on. The correct fix is to have SIL serialization serialize the transitive closure of all fragile functions and thunks referenced from fragile functions. Re-work SIL function serialization to use a worklist so that we can do this. Part of https://bugs.swift.org/browse/SR-267.