Skip to content

Commit d49d448

Browse files
committed
Remove use of deprecated STSC 'Lock'
- SwiftScan use of it seems not needed anymore - ArgsResolver use can use 'NSLock' directly
1 parent c771555 commit d49d448

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Sources/SwiftDriver/Execution/ArgsResolver.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
import class Foundation.NSLock
1314
import TSCBasic
1415
@_implementationOnly import Yams
1516

@@ -25,7 +26,7 @@ public final class ArgsResolver {
2526
// FIXME: We probably need a dedicated type for this...
2627
private let temporaryDirectory: VirtualPath
2728

28-
private let lock = Lock()
29+
private let lock = NSLock()
2930

3031
public init(fileSystem: FileSystem, temporaryDirectory: VirtualPath? = nil) throws {
3132
self.pathMapping = [:]

Sources/SwiftDriver/SwiftScan/SwiftScan.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ internal final class SwiftScan {
6363
/// The handle to the dylib.
6464
let dylib: Loader.Handle
6565

66-
/// Lock protecting private state.
67-
let lock: Lock = Lock()
68-
6966
/// libSwiftScan API functions.
7067
let api: swiftscan_functions_t;
7168

0 commit comments

Comments
 (0)