[FileSystem] Extend file system and have it use the VFS.
This patch extends the FileSystem class with a bunch of functions that are currently implemented as methods of the FileSpec class. These methods will be removed in future commits and replaced by calls to the file system. The new functions are operated in terms of the virtual file system which was recently moved from clang into LLVM so it could be reused in lldb. Because the VFS is stateful, we turned the FileSystem class into a singleton. Differential revision: https://reviews.llvm.org/D53532 llvm-svn: 345783
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "lldb/Core/Module.h"
|
||||
#include "lldb/Core/ModuleSpec.h"
|
||||
#include "lldb/Core/Section.h"
|
||||
#include "lldb/Host/FileSystem.h"
|
||||
#include "lldb/Host/HostInfo.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/Support/Compression.h"
|
||||
@@ -29,6 +30,7 @@ using namespace lldb;
|
||||
class ObjectFileELFTest : public testing::Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
FileSystem::Initialize();
|
||||
HostInfo::Initialize();
|
||||
ObjectFileELF::Initialize();
|
||||
SymbolVendorELF::Initialize();
|
||||
@@ -38,6 +40,7 @@ public:
|
||||
SymbolVendorELF::Terminate();
|
||||
ObjectFileELF::Terminate();
|
||||
HostInfo::Terminate();
|
||||
FileSystem::Terminate();
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
Reference in New Issue
Block a user