Merge pull request #76464 from kubamracek/embedded-fix-generics-check-in-perfdiags

[embedded] Fix generic function skipping in PerfDiags, diagnose KeyPathInsts in closures
This commit is contained in:
Kuba (Brecka) Mracek
2024-09-14 18:01:44 -07:00
committed by GitHub
2 changed files with 13 additions and 1 deletions

View File

@@ -203,7 +203,7 @@ bool PerformanceDiagnostics::visitFunctionEmbeddedSwift(
SILFunction *function, LocWithParent *parentLoc) {
// Don't check generic functions in embedded Swift, they're about to be
// removed anyway.
if (function->getLoweredFunctionType()->getSubstGenericSignature())
if (function->isGeneric())
return false;
if (!function->isDefinition())