@@ -26,8 +26,7 @@ private import TestingInternals
26
26
/// - Warning: This function is used by Swift Package Manager. Do not call it
27
27
/// directly.
28
28
@_disfavoredOverload public func __swiftPMEntryPoint( passing args: __CommandLineArguments_v0 ? = nil ) async -> CInt {
29
- var args = args
30
- return await entryPoint ( passing: & args, eventHandler: nil )
29
+ await entryPoint ( passing: args, eventHandler: nil )
31
30
}
32
31
33
32
/// The entry point to the testing library used by Swift Package Manager.
@@ -56,17 +55,12 @@ public func __swiftPMEntryPoint(passing args: __CommandLineArguments_v0? = nil)
56
55
/// - args: A previously-parsed command-line arguments structure to interpret.
57
56
/// If `nil`, a new instance is created from the command-line arguments to
58
57
/// the current process.
59
- /// - eventHandler: An event handler.
60
- ///
61
- /// - Bug: This function takes `args` as a pointer in order to work around a
62
- /// code generation bug when using the Swift 5.10 toolchain on Windows. This
63
- /// function should be updated to take `args` directly when Swift 5.10
64
- /// support is removed.
65
- func entryPoint( passing args: UnsafePointer < __CommandLineArguments_v0 ? > , eventHandler: Event . Handler ? ) async -> CInt {
58
+ /// - eventHandler: An event handler
59
+ func entryPoint( passing args: consuming __CommandLineArguments_v0 ? , eventHandler: Event . Handler ? ) async -> CInt {
66
60
let exitCode = Locked ( rawValue: EXIT_SUCCESS)
67
61
68
62
do {
69
- let args = try args. pointee ?? parseCommandLineArguments ( from: CommandLine . arguments ( ) )
63
+ let args = try args ?? parseCommandLineArguments ( from: CommandLine . arguments ( ) )
70
64
if args. listTests {
71
65
for testID in await listTestsForSwiftPM ( Test . all) {
72
66
#if SWT_TARGET_OS_APPLE && !SWT_NO_FILE_IO
0 commit comments