diff --git a/lldb/test/Shell/Reproducer/TestDriverOptions.test b/lldb/test/Shell/Reproducer/TestDriverOptions.test index 8bc8288e2e5f55..ccdccb3c9411c6 100644 --- a/lldb/test/Shell/Reproducer/TestDriverOptions.test +++ b/lldb/test/Shell/Reproducer/TestDriverOptions.test @@ -11,16 +11,16 @@ # RUN: %lldb --capture --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE # RUN: %lldb --capture -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE # RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE --check-prefix NOAUTOGEN -# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-auto-generate 2>&1 | FileCheck %s --check-prefix WARNING2 +# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-generate-on-exit 2>&1 | FileCheck %s --check-prefix WARNING2 # # NO-WARNING-NOT: warning: -capture-path specified without -capture # WARNING: warning: -capture-path specified without -capture -# WARNING2: warning: -reproducer-auto-generate specified without -capture +# WARNING2: warning: -reproducer-generate-on-exit specified without -capture # STATUS-CAPTURE: Reproducer is in capture mode. # NOAUTOGEN-NOT: Auto generate # Check auto generate. # RUN: rm -rf %t.repro -# RUN: %lldb --capture --capture-path %t.repro -b --reproducer-auto-generate -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix AUTOGEN +# RUN: %lldb --capture --capture-path %t.repro -b --reproducer-generate-on-exit -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix AUTOGEN # RUN: cat %t.repro/index.yaml # AUTOGEN: Auto generate: on diff --git a/lldb/test/Shell/Reproducer/TestVersionCheck.test b/lldb/test/Shell/Reproducer/TestVersionCheck.test index e3fb60367cec21..d37059be6db82d 100644 --- a/lldb/test/Shell/Reproducer/TestVersionCheck.test +++ b/lldb/test/Shell/Reproducer/TestVersionCheck.test @@ -15,8 +15,8 @@ # Make sure that replay works. # RUN: not %lldb --replay %t.repro 2>&1 | FileCheck %s --check-prefix ERROR -# Make sure that we can circumvent the version check with -reproducer-skip-version-check. -# RUN: %lldb --replay %t.repro -reproducer-skip-version-check | FileCheck %s --check-prefix CHECK --check-prefix REPLAY +# Make sure that we can circumvent the version check with -reproducer-no-version-check. +# RUN: %lldb --replay %t.repro -reproducer-no-version-check | FileCheck %s --check-prefix CHECK --check-prefix REPLAY # CAPTURE: testing # REPLAY-NOT: testing diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp index 1e639e9a1deab0..6b248329ce7b38 100644 --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -799,9 +799,9 @@ static void printHelp(LLDBOptTable &table, llvm::StringRef tool_name) { llvm::Optional InitializeReproducer(opt::InputArgList &input_args) { if (auto *replay_path = input_args.getLastArg(OPT_replay)) { - const bool skip_version_check = input_args.hasArg(OPT_skip_version_check); + const bool no_version_check = input_args.hasArg(OPT_no_version_check); if (const char *error = - SBReproducer::Replay(replay_path->getValue(), skip_version_check)) { + SBReproducer::Replay(replay_path->getValue(), no_version_check)) { WithColor::error() << "reproducer replay failed: " << error << '\n'; return 1; } @@ -809,12 +809,12 @@ llvm::Optional InitializeReproducer(opt::InputArgList &input_args) { } bool capture = input_args.hasArg(OPT_capture); - bool auto_generate = input_args.hasArg(OPT_auto_generate); + bool generate_on_exit = input_args.hasArg(OPT_generate_on_exit); auto *capture_path = input_args.getLastArg(OPT_capture_path); - if (auto_generate && !capture) { + if (generate_on_exit && !capture) { WithColor::warning() - << "-reproducer-auto-generate specified without -capture\n"; + << "-reproducer-generate-on-exit specified without -capture\n"; } if (capture || capture_path) { @@ -832,7 +832,7 @@ llvm::Optional InitializeReproducer(opt::InputArgList &input_args) { return 1; } } - if (auto_generate) + if (generate_on_exit) SBReproducer::SetAutoGenerate(true); } diff --git a/lldb/tools/driver/Options.td b/lldb/tools/driver/Options.td index e459a153d61854..f5c360de6a1414 100644 --- a/lldb/tools/driver/Options.td +++ b/lldb/tools/driver/Options.td @@ -232,9 +232,9 @@ def capture_path: Separate<["--", "-"], "capture-path">, def replay: Separate<["--", "-"], "replay">, MetaVarName<"">, HelpText<"Tells the debugger to replay a reproducer from .">; -def skip_version_check: F<"reproducer-skip-version-check">, - HelpText<"Skip the reproducer version check.">; -def auto_generate: F<"reproducer-auto-generate">, +def no_version_check: F<"reproducer-no-version-check">, + HelpText<"Disable the reproducer version check.">; +def generate_on_exit: F<"reproducer-generate-on-exit">, HelpText<"Generate reproducer on exit.">; def REM : R<["--"], "">; diff --git a/lldb/utils/lldb-repro/lldb-repro.py b/lldb/utils/lldb-repro/lldb-repro.py index 2244e97a0ff150..2b7b23f8cf29dc 100755 --- a/lldb/utils/lldb-repro/lldb-repro.py +++ b/lldb/utils/lldb-repro/lldb-repro.py @@ -49,7 +49,7 @@ def main(): elif sys.argv[1] == "capture": new_args.extend([ '--capture', '--capture-path', reproducer_path, - '--reproducer-auto-generate' + '--reproducer-generate-on-exit' ]) new_args.extend(sys.argv[2:]) else: