summaryrefslogtreecommitdiff
path: root/unittests/Basic/FileManagerTest.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-10-10 13:27:25 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-10-10 13:27:25 +0000
commitef858170ac4ee33edebe4afdadaec624325e7aa3 (patch)
tree2ac2f2e9947d707bca25570a1571a47212311ad4 /unittests/Basic/FileManagerTest.cpp
parent37521757fa2168cc9b401c37069623f19d07b0b7 (diff)
downloadclang-ef858170ac4ee33edebe4afdadaec624325e7aa3.tar.gz
Lift VFS from clang to llvm (NFC)
This patch moves the virtual file system form clang to llvm so it can be used by more projects. Concretely the patch: - Moves VirtualFileSystem.{h|cpp} from clang/Basic to llvm/Support. - Moves the corresponding unit test from clang to llvm. - Moves the vfs namespace from clang::vfs to llvm::vfs. - Formats the lines affected by this change, mostly this is the result of the added llvm namespace. RFC on the mailing list: http://lists.llvm.org/pipermail/llvm-dev/2018-October/126657.html Differential revision: https://reviews.llvm.org/D52783 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@344140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Basic/FileManagerTest.cpp')
-rw-r--r--unittests/Basic/FileManagerTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/unittests/Basic/FileManagerTest.cpp b/unittests/Basic/FileManagerTest.cpp
index 52cb5b2f0d..309de47949 100644
--- a/unittests/Basic/FileManagerTest.cpp
+++ b/unittests/Basic/FileManagerTest.cpp
@@ -10,9 +10,9 @@
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/FileSystemStatCache.h"
-#include "clang/Basic/VirtualFileSystem.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Path.h"
+#include "llvm/Support/VirtualFileSystem.h"
#include "gtest/gtest.h"
using namespace llvm;
@@ -60,8 +60,8 @@ public:
// Implement FileSystemStatCache::getStat().
LookupResult getStat(StringRef Path, FileData &Data, bool isFile,
- std::unique_ptr<vfs::File> *F,
- vfs::FileSystem &FS) override {
+ std::unique_ptr<llvm::vfs::File> *F,
+ llvm::vfs::FileSystem &FS) override {
#ifndef _WIN32
SmallString<128> NormalizedPath(Path);
llvm::sys::path::native(NormalizedPath);
@@ -305,8 +305,8 @@ TEST_F(FileManagerTest, makeAbsoluteUsesVFS) {
#endif
llvm::sys::path::append(CustomWorkingDir, "some", "weird", "path");
- auto FS =
- IntrusiveRefCntPtr<vfs::InMemoryFileSystem>(new vfs::InMemoryFileSystem);
+ auto FS = IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem>(
+ new llvm::vfs::InMemoryFileSystem);
// setCurrentworkingdirectory must finish without error.
ASSERT_TRUE(!FS->setCurrentWorkingDirectory(CustomWorkingDir));