mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ownership] Do not specialize transparent ossa functions called from non-ossa functions.
This commit is contained in:
@@ -2292,6 +2292,15 @@ void swift::trySpecializeApplyOfGeneric(
|
||||
if (shouldNotSpecialize(RefF, F))
|
||||
return;
|
||||
|
||||
// If our callee has ownership, do not specialize for now. This should only
|
||||
// occur with transparent referenced functions.
|
||||
//
|
||||
// FIXME: Support this.
|
||||
if (RefF->hasOwnership()) {
|
||||
assert(RefF->isTransparent());
|
||||
return;
|
||||
}
|
||||
|
||||
// If the caller and callee are both fragile, preserve the fragility when
|
||||
// cloning the callee. Otherwise, strip it off so that we can optimize
|
||||
// the body more.
|
||||
|
||||
Reference in New Issue
Block a user