mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[existential-specializer] Do not process callees with ownership as well as callers without ownership.
I already turned this off for callers. I just didn't do it for callees. Just an oversight. rdar://57291312
This commit is contained in:
@@ -207,7 +207,6 @@ bool ExistentialSpecializer::canSpecializeExistentialArgsInFunction(
|
||||
|
||||
/// Determine if this callee function can be specialized or not.
|
||||
bool ExistentialSpecializer::canSpecializeCalleeFunction(FullApplySite &Apply) {
|
||||
|
||||
/// Determine the caller of the apply.
|
||||
auto *Callee = Apply.getReferencedFunctionOrNull();
|
||||
if (!Callee)
|
||||
@@ -221,6 +220,13 @@ bool ExistentialSpecializer::canSpecializeCalleeFunction(FullApplySite &Apply) {
|
||||
if (!Callee->isDefinition())
|
||||
return false;
|
||||
|
||||
// If the callee has ownership enabled, bail.
|
||||
//
|
||||
// FIXME: We should be able to handle callees that have ownership, but the
|
||||
// pass has not been updated yet.
|
||||
if (Callee->hasOwnership())
|
||||
return false;
|
||||
|
||||
/// Ignore functions with indirect results.
|
||||
if (Callee->getConventions().hasIndirectSILResults())
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user