@@ -263,6 +263,15 @@ class SILModule {
263263 // / to ensure that the module is serialized only once.
264264 bool serialized;
265265
266+ // / Set if we have registered a deserialization notification handler for
267+ // / lowering ownership in non transparent functions.
268+ // / This gets set in NonTransparent OwnershipModelEliminator pass.
269+ bool regDeserializationNotificationHandlerForNonTransparentFuncOME;
270+ // / Set if we have registered a deserialization notification handler for
271+ // / lowering ownership in transparent functions.
272+ // / This gets set in OwnershipModelEliminator pass.
273+ bool regDeserializationNotificationHandlerForAllFuncOME;
274+
266275 // / Action to be executed for serializing the SILModule.
267276 ActionCallback SerializeSILAction;
268277
@@ -301,6 +310,19 @@ class SILModule {
301310 deserializationNotificationHandlers.erase (handler);
302311 }
303312
313+ bool hasRegisteredDeserializationNotificationHandlerForNonTransparentFuncOME () {
314+ return regDeserializationNotificationHandlerForNonTransparentFuncOME;
315+ }
316+ bool hasRegisteredDeserializationNotificationHandlerForAllFuncOME () {
317+ return regDeserializationNotificationHandlerForAllFuncOME;
318+ }
319+ void setRegisteredDeserializationNotificationHandlerForNonTransparentFuncOME () {
320+ regDeserializationNotificationHandlerForNonTransparentFuncOME = true ;
321+ }
322+ void setRegisteredDeserializationNotificationHandlerForAllFuncOME () {
323+ regDeserializationNotificationHandlerForAllFuncOME = true ;
324+ }
325+
304326 // / Add a delete notification handler \p Handler to the module context.
305327 void registerDeleteNotificationHandler (DeleteNotificationHandler* Handler);
306328
0 commit comments