Skip to content

Commit d84e4b4

Browse files
committed
[Driver] Remove built-in run subcommand
This is as per discussion in https://bugs.swift.org/browse/SR-5332
1 parent 26d4904 commit d84e4b4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

test/Driver/subcommands.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Check that each of 'swift', 'swift repl', 'swift run' invoke the REPL.
1+
// Check that 'swift' and 'swift repl' invoke the REPL.
22
//
33
// REQUIRES: swift_interpreter
44
//
@@ -7,7 +7,6 @@
77
// RUN: %hardlink-or-copy(from: %swift_driver_plain, to: %t.dir/usr/bin/swift)
88

99
// RUN: %t.dir/usr/bin/swift -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s
10-
// RUN: %t.dir/usr/bin/swift run -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s
1110
// RUN: %t.dir/usr/bin/swift repl -### 2>&1 | %FileCheck -check-prefix=CHECK-SWIFT-INVOKES-REPL %s
1211
//
1312
// CHECK-SWIFT-INVOKES-REPL: {{.*}}/swift -frontend -repl

tools/driver/driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ static bool shouldRunAsSubcommand(StringRef ExecName,
9494
StringRef Subcommand = Args[1];
9595
Args.erase(&Args[1]);
9696

97-
// If the subcommand is one of the "built-in" 'repl' or 'run', then use the
97+
// If the subcommand is the "built-in" 'repl', then use the
9898
// normal driver.
99-
if (Subcommand == "repl" || Subcommand == "run")
99+
if (Subcommand == "repl")
100100
return false;
101101

102102
// Form the subcommand name.

0 commit comments

Comments
 (0)