Skip to content

Commit b7b84d9

Browse files
committed
[lldb] Toggle the reproducer default in the driver
Turn off reproducer-capture-by default. See lldb-dev [0] for more context. [0] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html
1 parent 06b06ba commit b7b84d9

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

lldb/test/Shell/Reproducer/TestDriverOptions.test

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@
1010
#
1111
# RUN: %lldb --capture --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
1212
# RUN: %lldb --capture -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
13-
# BEGIN SWIFT-LLDB CHANGE (--capture does not need to be specified, as it's on by default)
14-
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE --check-prefix NOAUTOGEN
15-
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-generate-on-exit 2>&1
16-
# END SWIFT-LLDB-CHANGE
17-
13+
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE --check-prefix NOAUTOGEN
14+
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-generate-on-exit 2>&1 | FileCheck %s --check-prefix WARNING2
15+
#
1816
# NO-WARNING-NOT: warning: -capture-path specified without -capture
1917
# WARNING: warning: -capture-path specified without -capture
18+
# WARNING2: warning: -reproducer-generate-on-exit specified without -capture
2019
# STATUS-CAPTURE: Reproducer is in capture mode.
2120
# NOAUTOGEN-NOT: Auto generate
2221

lldb/tools/driver/Driver.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -826,14 +826,7 @@ static llvm::Optional<int> InitializeReproducer(llvm::StringRef argv0,
826826
return 0;
827827
}
828828

829-
// BEGIN SWIFT
830-
#if TARGET_OS_IPHONE
831829
bool capture = input_args.hasArg(OPT_capture);
832-
#else
833-
bool repl = input_args.hasArg(OPT_repl) || input_args.hasArg(OPT_repl_);
834-
bool capture = !repl || input_args.hasArg(OPT_capture);
835-
#endif
836-
// END SWIFT
837830
bool generate_on_exit = input_args.hasArg(OPT_generate_on_exit);
838831
auto *capture_path = input_args.getLastArg(OPT_capture_path);
839832

0 commit comments

Comments
 (0)