diff options
author | 2017-07-11 15:56:42 +0200 | |
---|---|---|
committer | 2017-07-11 18:26:01 +0200 | |
commit | 2a32a66878ca6f3de6dcb35c8c2043b02ca8f89d (patch) | |
tree | 4c43b263baca4d4ab4c3706a38263839edf5409d | |
parent | 1c2b02767c05e3a53a7303c31f8183fbaec6d394 (diff) |
Delete the unused OptionProcessor::ParseOptions(argc,argv).
PiperOrigin-RevId: 161523047
-rw-r--r-- | src/main/cpp/blaze.cc | 11 | ||||
-rw-r--r-- | src/main/cpp/option_processor.cc | 14 | ||||
-rw-r--r-- | src/main/cpp/option_processor.h | 5 |
3 files changed, 7 insertions, 23 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index a77504b88f..6809b0b7f7 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -1155,10 +1155,13 @@ static ATTRIBUTE_NORETURN void SendServerRequest( // Parse the options, storing parsed values in globals. static void ParseOptions(int argc, const char *argv[]) { - string error; - blaze_exit_code::ExitCode parse_exit_code = - globals->option_processor->ParseOptions(argc, argv, globals->workspace, - globals->cwd, &error); + std::string error; + std::vector<std::string> args; + args.insert(args.end(), argv, argv + argc); + const blaze_exit_code::ExitCode parse_exit_code = + globals->option_processor->ParseOptions( + args, globals->workspace, globals->cwd, &error); + if (parse_exit_code != blaze_exit_code::SUCCESS) { die(parse_exit_code, "%s", error.c_str()); } diff --git a/src/main/cpp/option_processor.cc b/src/main/cpp/option_processor.cc index 868f09f0fd..3a92ae227f 100644 --- a/src/main/cpp/option_processor.cc +++ b/src/main/cpp/option_processor.cc @@ -386,20 +386,6 @@ blaze_exit_code::ExitCode OptionProcessor::ParseOptions( return blaze_exit_code::SUCCESS; } -blaze_exit_code::ExitCode OptionProcessor::ParseOptions( - int argc, - const char* argv[], - const string& workspace, - const string& cwd, - string* error) { - vector<string> args(argc); - for (int arg = 0; arg < argc; arg++) { - args[arg] = argv[arg]; - } - - return ParseOptions(args, workspace, cwd, error); -} - blaze_exit_code::ExitCode OptionProcessor::ParseStartupOptions( std::string *error) { std::vector<RcStartupFlag> rcstartup_flags; diff --git a/src/main/cpp/option_processor.h b/src/main/cpp/option_processor.h index f572003982..b09a5fcff3 100644 --- a/src/main/cpp/option_processor.h +++ b/src/main/cpp/option_processor.h @@ -84,11 +84,6 @@ class OptionProcessor { const std::string& cwd, std::string* error); - blaze_exit_code::ExitCode ParseOptions(int argc, const char* argv[], - const std::string& workspace, - const std::string& cwd, - std::string* error); - // Get the Blaze command to be executed. // Returns an empty string if no command was found on the command line. std::string GetCommand() const; |