File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed
SwiftCompilerSources/Sources/Optimizer/PassManager Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
swift_compiler_sources (Optimizer
10
10
ModulePassContext.swift
11
+ Options .swift
11
12
Passes.swift
12
13
PassContext.swift
13
14
PassRegistration.swift )
Original file line number Diff line number Diff line change @@ -91,6 +91,8 @@ struct ModulePassContext {
91
91
DefaultWitnessTableList ( first: PassContext_firstDefaultWitnessTableInModule ( _bridged) . table)
92
92
}
93
93
94
+ var options : Options { Options ( _bridged: _bridged) }
95
+
94
96
/// Run a closure with a `PassContext` for a function, which allows to modify that function.
95
97
///
96
98
/// Only a single `transform` can be alive at the same time, i.e. it's not allowed to nest
Original file line number Diff line number Diff line change
1
+ //===--- Options.swift ----------------------------------------------------===//
2
+ //
3
+ // This source file is part of the Swift.org open source project
4
+ //
5
+ // Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
6
+ // Licensed under Apache License v2.0 with Runtime Library Exception
7
+ //
8
+ // See https://swift.org/LICENSE.txt for license information
9
+ // See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10
+ //
11
+ //===----------------------------------------------------------------------===//
12
+
13
+ import OptimizerBridging
14
+
15
+ struct Options {
16
+ let _bridged : BridgedPassContext
17
+ }
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ struct PassContext {
22
22
23
23
let _bridged : BridgedPassContext
24
24
25
+ var options : Options { Options ( _bridged: _bridged) }
26
+
25
27
func continueWithNextSubpassRun( for inst: Instruction ? = nil ) -> Bool {
26
28
let bridgedInst = OptionalBridgedInstruction ( obj: inst? . bridged. obj)
27
29
return PassContext_continueWithNextSubpassRun ( _bridged, bridgedInst) != 0
You can’t perform that action at this time.
0 commit comments