Commit Graph

3 Commits

Author SHA1 Message Date
Michael Gottesman
93ed95847a [ownership] When deserializing a SILFunction, match the ownership of the deserialized function.
Ownership is truly a property not of a declaration, but of a function body. So
it makes sense to just match what we deserialize.

This also helps us to avoid mismatches if we lower ownership from a function,
delete it, and then relink it.

I also used this as an opportunity to clean up where we set that flag in
deserialization to only happen in one place for both declarations/definitions.
2019-08-11 15:05:54 -07:00
Arnold Schwaighofer
5f4e183302 Add [dynamically_replacable] to SILFunctions
'dynamic' functions are marked as [dynamically_replaceable].
2018-11-06 09:53:21 -08:00
Michael Gottesman
72d3323465 [sil-serialization] Create SILSerializationFunctionBuilder and use it when deserializing.
This allowed me to fold all of the weird direct calls to createFunction into a
singular SILSerializationFunctionBuilder::createDeclaration. This is the only
API that is needed by the SILParser so only providing that gives us a
significantly cleaner API.

rdar://42301529
2018-08-01 13:03:06 -07:00