File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,9 @@ class Reproducer {
313
313
314
314
FileSpec GetReproducerPath () const ;
315
315
316
+ bool IsCapturing () { return static_cast <bool >(m_generator); };
317
+ bool IsReplaying () { return static_cast <bool >(m_loader); };
318
+
316
319
protected:
317
320
llvm::Error SetCapture (llvm::Optional<FileSpec> root);
318
321
llvm::Error SetReplay (llvm::Optional<FileSpec> root);
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ class CommandObjectReproducerGenerate : public CommandObjectParsed {
88
88
auto &r = Reproducer::Instance ();
89
89
if (auto generator = r.GetGenerator ()) {
90
90
generator->Keep ();
91
- } else if (r.GetLoader ()) {
91
+ } else if (r.IsReplaying ()) {
92
92
// Make this operation a NOP in replay mode.
93
93
result.SetStatus (eReturnStatusSuccessFinishNoResult);
94
94
return result.Succeeded ();
@@ -132,9 +132,9 @@ class CommandObjectReproducerStatus : public CommandObjectParsed {
132
132
}
133
133
134
134
auto &r = Reproducer::Instance ();
135
- if (r.GetGenerator ()) {
135
+ if (r.IsCapturing ()) {
136
136
result.GetOutputStream () << " Reproducer is in capture mode.\n " ;
137
- } else if (r.GetLoader ()) {
137
+ } else if (r.IsReplaying ()) {
138
138
result.GetOutputStream () << " Reproducer is in replay mode.\n " ;
139
139
} else {
140
140
result.GetOutputStream () << " Reproducer is off.\n " ;
You can’t perform that action at this time.
0 commit comments