mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 04:17:17 +08:00
[Reproducers] Include lldb version in the reproducer root
Generally, reproducers are rev-locked to the version of LLDB, so it's valuable to have the LLDB version in the reproducer. For now I just want the information to be present, without enforcing it, but I envision emitting a warning during replay in the future. Differential revision: https://reviews.llvm.org/D63229 llvm-svn: 363225
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include "lldb/Utility/Log.h"
|
||||
#include "lldb/Utility/Reproducer.h"
|
||||
#include "lldb/Utility/Timer.h"
|
||||
#include "lldb/lldb-private.h"
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
|
||||
@@ -67,7 +68,6 @@ llvm::Error SystemInitializerCommon::Initialize() {
|
||||
return e;
|
||||
}
|
||||
|
||||
// Initialize the file system.
|
||||
auto &r = repro::Reproducer::Instance();
|
||||
if (repro::Loader *loader = r.GetLoader()) {
|
||||
FileSpec vfs_mapping = loader->GetFile<FileProvider::Info>();
|
||||
@@ -78,6 +78,8 @@ llvm::Error SystemInitializerCommon::Initialize() {
|
||||
FileSystem::Initialize();
|
||||
}
|
||||
} else 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(fp.GetFileCollector());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user