Skip to content

Commit 9208154

Browse files
modocacheCodaFi
authored andcommitted
Document what a "subcommand" is
There are a few references to "subcommands" in the repository, but no explanation of what they are. Beef up the docblock for `shouldRunAsSubcommand()` to make things a little clearer. Specifically, I'd like to make the difference between driver jobs and driver subcomnmands clearer. In addition, remove a double negative comment, "If we are not run as 'swift', don't do anything special", and replace it with something a little clearer (in my opinion).
1 parent 0366e61 commit 9208154

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/driver/driver.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,11 @@ extern int swift_indent_main(ArrayRef<const char *> Args, const char *Argv0,
7474
extern int swift_symbolgraph_extract_main(ArrayRef<const char *> Args, const char *Argv0,
7575
void *MainAddr);
7676

77-
/// Determine if the given invocation should run as a subcommand.
77+
/// Determine if the given invocation should run as a "subcommand".
78+
///
79+
/// Examples of "subcommands" are 'swift build' or 'swift test', which are
80+
/// usually used to invoke the Swift package manager executables 'swift-build'
81+
/// and 'swift-test', respectively.
7882
///
7983
/// \param ExecName The name of the argv[0] we were invoked as.
8084
/// \param SubcommandName On success, the full name of the subcommand to invoke.

0 commit comments

Comments
 (0)