Skip to content

Commit 5d157c5

Browse files
committed
[ome] Make sure to skip functions that do not have ownership.
This is not an actual bug since given where OME is in the pipeline today it will only process ossa functions. But philosophically this is the right thing to do.
1 parent 7b73135 commit 5d157c5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SILOptimizer/Transforms/OwnershipModelEliminator.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ struct OwnershipModelEliminator : SILModuleTransform {
297297
if (F.wasDeserializedCanonical())
298298
continue;
299299

300+
// If F does not have ownership, skip it. We have no further work to do.
301+
if (!F.hasOwnership())
302+
continue;
303+
300304
// Set F to have unqualified ownership.
301305
F.setOwnershipEliminated();
302306

0 commit comments

Comments
 (0)