Skip to content

Commit 85381a5

Browse files
committed
Optimizer: move notifyNewFunction from Context to FunctionPassContext
1 parent bc244d1 commit 85381a5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

SwiftCompilerSources/Sources/Optimizer/PassManager/ContextCommon.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ extension Context {
4545
func canMakeStaticObjectReadOnly(objectType: Type) -> Bool {
4646
bridgedPassContext.canMakeStaticObjectReadOnly(objectType.bridged)
4747
}
48-
49-
func notifyNewFunction(function: Function, derivedFrom: Function) {
50-
bridgedPassContext.addFunctionToPassManagerWorklist(function.bridged, derivedFrom.bridged)
51-
}
5248
}
5349

5450
extension MutatingContext {

SwiftCompilerSources/Sources/Optimizer/PassManager/FunctionPassContext.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ struct FunctionPassContext : MutatingContext {
5151
return LoopTree(bridged: bridgedLT, context: self)
5252
}
5353

54+
func notifyNewFunction(function: Function, derivedFrom: Function) {
55+
bridgedPassContext.addFunctionToPassManagerWorklist(function.bridged, derivedFrom.bridged)
56+
}
57+
5458
func loadFunction(name: StaticString, loadCalleesRecursively: Bool) -> Function? {
5559
return name.withUTF8Buffer { (nameBuffer: UnsafeBufferPointer<UInt8>) in
5660
let nameStr = BridgedStringRef(data: nameBuffer.baseAddress, count: nameBuffer.count)

0 commit comments

Comments
 (0)