aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Utility/Reproducer.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2021-03-31 21:08:55 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2021-03-31 21:10:56 -0700
commitdfc8da19c5d7ed48f62a4cc588b641f2deee8789 (patch)
tree8d467cba493a0744f04e897ef5a6ad5b8aeadf81 /lldb/source/Utility/Reproducer.cpp
parenta8219991d0245db8f31a923ba7f24e6beda345b0 (diff)
downloadllvm-dfc8da19c5d7ed48f62a4cc588b641f2deee8789.tar.gz
llvm-dfc8da19c5d7ed48f62a4cc588b641f2deee8789.tar.bz2
llvm-dfc8da19c5d7ed48f62a4cc588b641f2deee8789.zip
[lldb] Remove LLDB_CAPTURE_REPRODUCER override
Remove the LLDB_CAPTURE_REPRODUCER as it is inherently dangerous. The reproducers require careful initialization which cannot be guaranteed by overwriting the reproducer mode at this level. If we want to provide this functionality, we should do it in the driver instead. It was originally added to enable capture in CI, but we now have a dedicated CI job that captures and replays the test suite.
Diffstat (limited to 'lldb/source/Utility/Reproducer.cpp')
-rw-r--r--lldb/source/Utility/Reproducer.cpp19
1 files changed, 0 insertions, 19 deletions
diff --git a/lldb/source/Utility/Reproducer.cpp b/lldb/source/Utility/Reproducer.cpp
index d9207b1eb49f..b63863c535fa 100644
--- a/lldb/source/Utility/Reproducer.cpp
+++ b/lldb/source/Utility/Reproducer.cpp
@@ -20,15 +20,6 @@ using namespace lldb_private::repro;
using namespace llvm;
using namespace llvm::yaml;
-static llvm::Optional<bool> GetEnv(const char *var) {
- std::string val = llvm::StringRef(getenv(var)).lower();
- if (val == "0" || val == "off")
- return false;
- if (val == "1" || val == "on")
- return true;
- return {};
-}
-
Reproducer &Reproducer::Instance() { return *InstanceImpl(); }
llvm::Error Reproducer::Initialize(ReproducerMode mode,
@@ -36,16 +27,6 @@ llvm::Error Reproducer::Initialize(ReproducerMode mode,
lldbassert(!InstanceImpl() && "Already initialized.");
InstanceImpl().emplace();
- // The environment can override the capture mode.
- if (mode != ReproducerMode::Replay) {
- if (llvm::Optional<bool> override = GetEnv("LLDB_CAPTURE_REPRODUCER")) {
- if (*override)
- mode = ReproducerMode::Capture;
- else
- mode = ReproducerMode::Off;
- }
- }
-
switch (mode) {
case ReproducerMode::Capture: {
if (!root) {