Files
swift-mirror/SwiftCompilerSources/Sources/Optimizer/FunctionPasses/CMakeLists.txt
Erik Eckstein 8b2d27007f DiagnoseInfiniteRecursion: re-implement the pass in swift and fix a bug
Fixes a false alarm in case of recursive calls with different type parameters.
For example:

```
protocol P {
  associatedtype E: P
}

func noRecursionMismatchingTypeArgs1<T: P>(_ t: T.Type) {
  if T.self == Int.self {
    return
  }
  noRecursionMismatchingTypeArgs1(T.E.self)
}
```
2025-03-26 09:14:38 +01:00

37 lines
1.1 KiB
CMake

# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2021 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
swift_compiler_sources(Optimizer
AssumeSingleThreaded.swift
AsyncDemotion.swift
BooleanLiteralFolding.swift
CleanupDebugSteps.swift
ClosureSpecialization.swift
ComputeEscapeEffects.swift
ComputeSideEffects.swift
CopyToBorrowOptimization.swift
DeadStoreElimination.swift
DeinitDevirtualizer.swift
DestroyHoisting.swift
DiagnoseInfiniteRecursion.swift
InitializeStaticGlobals.swift
LetPropertyLowering.swift
LifetimeDependenceDiagnostics.swift
LifetimeDependenceInsertion.swift
LifetimeDependenceScopeFixup.swift
ObjectOutliner.swift
ObjCBridgingOptimization.swift
MergeCondFails.swift
NamedReturnValueOptimization.swift
RedundantLoadElimination.swift
ReleaseDevirtualizer.swift
SimplificationPasses.swift
StackPromotion.swift
StripObjectHeaders.swift
)