[Reproducer] Make 'reproducer generate' a NOOP during replay.
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 27 Feb 2019 17:47:06 +0000 (17:47 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 27 Feb 2019 17:47:06 +0000 (17:47 +0000)
Instead of filtering out the 'reproducer generate' command during
replay, just make the operation a NOOP.

llvm-svn: 355009

lldb/source/Commands/CommandObjectReproducer.cpp

index 7d2b7ed..c7cdd64 100644 (file)
@@ -37,8 +37,13 @@ protected:
     auto &r = repro::Reproducer::Instance();
     if (auto generator = r.GetGenerator()) {
       generator->Keep();
+    } else if (r.GetLoader()) {
+      // Make this operation a NOP in replay mode.
+      result.SetStatus(eReturnStatusSuccessFinishNoResult);
+      return result.Succeeded();
     } else {
       result.AppendErrorWithFormat("Unable to get the reproducer generator");
+      result.SetStatus(eReturnStatusFailed);
       return false;
     }