[lldb] Remove LLDB reproducers

This patch removes the remaining reproducer code. The SBReproducer class
remains for ABI stability but is just an empty shell. This completes the
removal process outlined on the mailing list [1].

[1] https://lists.llvm.org/pipermail/lldb-dev/2021-September/017045.html
This commit is contained in:
Jonas Devlieghere
2022-09-19 10:47:09 -07:00
parent 2e8817b90a
commit 70599d7027
102 changed files with 57 additions and 3218 deletions

View File

@@ -13,7 +13,6 @@
#include "lldb/Host/Host.h"
#include "lldb/Host/Socket.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/ReproducerProvider.h"
#include "lldb/Utility/Timer.h"
#include "lldb/Version/Version.h"
@@ -32,7 +31,6 @@
#include <string>
using namespace lldb_private;
using namespace lldb_private::repro;
SystemInitializerCommon::SystemInitializerCommon(
HostInfo::SharedLibraryDirectoryHelper *helper)
@@ -40,31 +38,6 @@ SystemInitializerCommon::SystemInitializerCommon(
SystemInitializerCommon::~SystemInitializerCommon() = default;
/// Initialize the FileSystem based on the current reproducer mode.
static llvm::Error InitializeFileSystem() {
auto &r = repro::Reproducer::Instance();
if (repro::Generator *g = r.GetGenerator()) {
repro::VersionProvider &vp = g->GetOrCreate<repro::VersionProvider>();
vp.SetVersion(lldb_private::GetVersion());
repro::FileProvider &fp = g->GetOrCreate<repro::FileProvider>();
FileSystem::Initialize(llvm::FileCollector::createCollectorVFS(
llvm::vfs::getRealFileSystem(), fp.GetFileCollector()));
fp.RecordInterestingDirectory(
g->GetOrCreate<repro::WorkingDirectoryProvider>().GetDirectory());
fp.RecordInterestingDirectory(
g->GetOrCreate<repro::HomeDirectoryProvider>().GetDirectory());
return llvm::Error::success();
}
FileSystem::Initialize();
return llvm::Error::success();
}
llvm::Error SystemInitializerCommon::Initialize() {
#if defined(_WIN32)
const char *disable_crash_dialog_var = getenv("LLDB_DISABLE_CRASH_DIALOG");
@@ -88,17 +61,9 @@ llvm::Error SystemInitializerCommon::Initialize() {
}
#endif
// If the reproducer wasn't initialized before, we can safely assume it's
// off.
if (!Reproducer::Initialized()) {
if (auto e = Reproducer::Initialize(ReproducerMode::Off, llvm::None))
return e;
}
if (auto e = InitializeFileSystem())
return e;
InitializeLldbChannel();
FileSystem::Initialize();
HostInfo::Initialize(m_shlib_dir_helper);
llvm::Error error = Socket::Initialize();
@@ -130,5 +95,4 @@ void SystemInitializerCommon::Terminate() {
HostInfo::Terminate();
Log::DisableAllLogChannels();
FileSystem::Terminate();
Reproducer::Terminate();
}