File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,9 @@ class Generator final {
248
248
// / Enable or disable auto generate.
249
249
void SetAutoGenerate (bool b);
250
250
251
+ // / Return whether auto generate is enabled.
252
+ bool IsAutoGenerate () const ;
253
+
251
254
// / Create and register a new provider.
252
255
template <typename T> T *Create () {
253
256
std::unique_ptr<ProviderBase> provider = llvm::make_unique<T>(m_root);
Original file line number Diff line number Diff line change 10
10
#
11
11
# RUN: %lldb --capture --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
12
12
# RUN: %lldb --capture -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING --check-prefix STATUS-CAPTURE
13
- # RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix WARNING --check-prefix STATUS-CAPTURE
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
14
# RUN: %lldb --capture-path %t.repro -b -o 'reproducer status' --reproducer-auto-generate 2>&1 | FileCheck %s --check-prefix WARNING2
15
15
#
16
16
# NO-WARNING-NOT: warning: -capture-path specified without -capture
17
17
# WARNING: warning: -capture-path specified without -capture
18
18
# WARNING2: warning: -reproducer-auto-generate specified without -capture
19
19
# STATUS-CAPTURE: Reproducer is in capture mode.
20
+ # NOAUTOGEN-NOT: Auto generate
20
21
21
22
# Check auto generate.
22
23
# RUN: rm -rf %t.repro
23
- # RUN: %lldb --capture --capture-path %t.repro -b --reproducer-auto-generate -o 'reproducer status' 2>&1 | FileCheck %s --check-prefix NO-WARNING
24
+ # 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
24
25
# RUN: cat %t.repro/index.yaml
26
+ # AUTOGEN: Auto generate: on
Original file line number Diff line number Diff line change @@ -259,6 +259,18 @@ class CommandObjectReproducerStatus : public CommandObjectParsed {
259
259
result.GetOutputStream () << " Reproducer is off.\n " ;
260
260
}
261
261
262
+ if (r.IsCapturing () || r.IsReplaying ()) {
263
+ result.GetOutputStream ()
264
+ << " Path: " << r.GetReproducerPath ().GetPath () << ' \n ' ;
265
+ }
266
+
267
+ // Auto generate is hidden unless enabled because this is mostly for
268
+ // development and testing.
269
+ if (Generator *g = r.GetGenerator ()) {
270
+ if (g->IsAutoGenerate ())
271
+ result.GetOutputStream () << " Auto generate: on\n " ;
272
+ }
273
+
262
274
result.SetStatus (eReturnStatusSuccessFinishResult);
263
275
return result.Succeeded ();
264
276
}
Original file line number Diff line number Diff line change @@ -205,6 +205,8 @@ void Generator::Discard() {
205
205
206
206
void Generator::SetAutoGenerate (bool b) { m_auto_generate = b; }
207
207
208
+ bool Generator::IsAutoGenerate () const { return m_auto_generate; }
209
+
208
210
const FileSpec &Generator::GetRoot () const { return m_root; }
209
211
210
212
void Generator::AddProvidersToIndex () {
You can’t perform that action at this time.
0 commit comments