mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL function can be serialized with different kinds: [serialized] or
[serialized_for_package] if Package CMO is enabled. The latter kind allows a function to be serialized even if it contains loadable types, if Package CMO is enabled. Renamed IsSerialized_t as SerializedKind_t. The tri-state serialization kind requires validating inlinability depending on the serialization kinds of callee vs caller; e.g. if the callee is [serialized_for_package], the caller must be _not_ [serialized]. Renamed `hasValidLinkageForFragileInline` as `canBeInlinedIntoCaller` that takes in its caller's SerializedKind as an argument. Another argument `assumeFragileCaller` is also added to ensure that the calle sites of this function know the caller is serialized unless it's called for SIL inlining optimization passes. The [serialized_for_package] attribute is allowed for SIL function, global var, v-table, and witness-table. Resolves rdar://128406520
This commit is contained in:
@@ -936,7 +936,7 @@ void SILModule::performOnceForPrespecializedImportedExtensions(
|
||||
}
|
||||
|
||||
SILProperty *
|
||||
SILProperty::create(SILModule &M, bool Serialized, AbstractStorageDecl *Decl,
|
||||
SILProperty::create(SILModule &M, unsigned Serialized, AbstractStorageDecl *Decl,
|
||||
std::optional<KeyPathPatternComponent> Component) {
|
||||
auto prop = new (M) SILProperty(Serialized, Decl, Component);
|
||||
M.properties.push_back(prop);
|
||||
|
||||
Reference in New Issue
Block a user