diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-10-31 21:49:27 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-10-31 21:49:27 +0000 |
commit | 46376966ea0f7ea9935e5d27deb423d5d9b72eff (patch) | |
tree | f67a900874bc732e7bec2afe10764076cbacc3c1 /lldb/unittests/Target/ModuleCacheTest.cpp | |
parent | 063fd98bcc06e49009df8cbd18484a81a612aeb6 (diff) | |
download | bcm5719-llvm-46376966ea0f7ea9935e5d27deb423d5d9b72eff.tar.gz bcm5719-llvm-46376966ea0f7ea9935e5d27deb423d5d9b72eff.zip |
[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
Diffstat (limited to 'lldb/unittests/Target/ModuleCacheTest.cpp')
-rw-r--r-- | lldb/unittests/Target/ModuleCacheTest.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/unittests/Target/ModuleCacheTest.cpp b/lldb/unittests/Target/ModuleCacheTest.cpp index 0b9e02df781..59abe8e6c12 100644 --- a/lldb/unittests/Target/ModuleCacheTest.cpp +++ b/lldb/unittests/Target/ModuleCacheTest.cpp @@ -5,12 +5,13 @@ #include "llvm/Support/Path.h" #include "Plugins/ObjectFile/ELF/ObjectFileELF.h" +#include "TestingSupport/TestUtilities.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Host/HostInfo.h" #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/ModuleCache.h" -#include "TestingSupport/TestUtilities.h" using namespace lldb_private; using namespace lldb; @@ -65,6 +66,7 @@ static FileSpec GetSysrootView(FileSpec spec, const char *hostname) { } void ModuleCacheTest::SetUpTestCase() { + FileSystem::Initialize(); HostInfo::Initialize(); ObjectFileELF::Initialize(); @@ -75,6 +77,7 @@ void ModuleCacheTest::SetUpTestCase() { void ModuleCacheTest::TearDownTestCase() { ObjectFileELF::Terminate(); HostInfo::Terminate(); + FileSystem::Terminate(); } static void VerifyDiskState(const FileSpec &cache_dir, const char *hostname) { |