Skip to content

Commit df4f824

Browse files
authored
Merge pull request #68484 from kubamracek/embedded-perfect-bug
[embedded] Fix accidentally reversed logic in isGenericFunction + addAllNonGenericFunctions
2 parents 222e8b7 + c0750cd commit df4f824

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

SwiftCompilerSources/Sources/Optimizer/ModulePasses/MandatoryPerformanceOptimizations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ fileprivate struct FunctionWorklist {
312312
}
313313

314314
mutating func addAllNonGenericFunctions(of moduleContext: ModulePassContext) {
315-
for f in moduleContext.functions where f.isGenericFunction {
315+
for f in moduleContext.functions where !f.isGenericFunction {
316316
pushIfNotVisited(f)
317317
}
318318
return

include/swift/SIL/SILBridging.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ struct BridgedFunction {
261261
}
262262

263263
bool isGenericFunction() const {
264-
return getFunction()->getGenericSignature().isNull();
264+
return !getFunction()->getGenericSignature().isNull();
265265
}
266266

267267
bool hasSemanticsAttr(llvm::StringRef attrName) const {

0 commit comments

Comments
 (0)