mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Register deserialization notification handlers in ome only once
This commit is contained in:
@@ -263,6 +263,15 @@ private:
|
||||
/// to ensure that the module is serialized only once.
|
||||
bool serialized;
|
||||
|
||||
/// Set if we have registered a deserialization notification handler for
|
||||
/// lowering ownership in non transparent functions.
|
||||
/// This gets set in NonTransparent OwnershipModelEliminator pass.
|
||||
bool regDeserializationNotificationHandlerForNonTransparentFuncOME;
|
||||
/// Set if we have registered a deserialization notification handler for
|
||||
/// lowering ownership in transparent functions.
|
||||
/// This gets set in OwnershipModelEliminator pass.
|
||||
bool regDeserializationNotificationHandlerForAllFuncOME;
|
||||
|
||||
/// Action to be executed for serializing the SILModule.
|
||||
ActionCallback SerializeSILAction;
|
||||
|
||||
@@ -301,6 +310,19 @@ public:
|
||||
deserializationNotificationHandlers.erase(handler);
|
||||
}
|
||||
|
||||
bool hasRegisteredDeserializationNotificationHandlerForNonTransparentFuncOME() {
|
||||
return regDeserializationNotificationHandlerForNonTransparentFuncOME;
|
||||
}
|
||||
bool hasRegisteredDeserializationNotificationHandlerForAllFuncOME() {
|
||||
return regDeserializationNotificationHandlerForAllFuncOME;
|
||||
}
|
||||
void setRegisteredDeserializationNotificationHandlerForNonTransparentFuncOME() {
|
||||
regDeserializationNotificationHandlerForNonTransparentFuncOME = true;
|
||||
}
|
||||
void setRegisteredDeserializationNotificationHandlerForAllFuncOME() {
|
||||
regDeserializationNotificationHandlerForAllFuncOME = true;
|
||||
}
|
||||
|
||||
/// Add a delete notification handler \p Handler to the module context.
|
||||
void registerDeleteNotificationHandler(DeleteNotificationHandler* Handler);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user