diff --git a/src/flags.cc b/src/flags.cc index 8c2e91c397..d16c547c52 100644 --- a/src/flags.cc +++ b/src/flags.cc @@ -308,11 +308,7 @@ static void SplitArgument(const char* arg, char* buffer, int buffer_size, arg++; // remove 1st '-' if (*arg == '-') { arg++; // remove 2nd '-' - if (arg[0] == '\0') { - const char* kJSArgumentsFlagName = "js_arguments"; - *name = kJSArgumentsFlagName; - return; - } + DCHECK_NE('\0', arg[0]); // '--' arguments are handled in the caller. } if (arg[0] == 'n' && arg[1] == 'o') { arg += 2; // remove "no" @@ -587,11 +583,10 @@ void FlagList::PrintHelp() { "The following syntax for options is accepted (both '-' and '--' are " "ok):\n" " --flag (bool flags only)\n" - " --noflag (bool flags only)\n" + " --no-flag (bool flags only)\n" " --flag=value (non-bool flags only, no spaces around '=')\n" " --flag value (non-bool flags only)\n" - " -- (equivalent to --js_arguments, captures all remaining " - "args)\n\n" + " -- (captures all remaining args in JavaScript)\n\n" "Options:\n"; for (const Flag& f : flags) { diff --git a/src/flags.h b/src/flags.h index 7f4e842f69..d82c5b40d1 100644 --- a/src/flags.h +++ b/src/flags.h @@ -40,10 +40,10 @@ class V8_EXPORT_PRIVATE FlagList { // The following syntax for flags is accepted (both '-' and '--' are ok): // // --flag (bool flags only) - // --noflag (bool flags only) + // --no-flag (bool flags only) // --flag=value (non-bool flags only, no spaces around '=') // --flag value (non-bool flags only) - // -- (equivalent to --js_arguments, captures all remaining args) + // -- (capture all remaining args in JavaScript) static int SetFlagsFromCommandLine(int* argc, char** argv, bool remove_flags);