From fc51490baf1d6ad5796d8cb8bb0792de13ce8fce Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 10 Oct 2018 13:27:25 +0000 Subject: 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 llvm-svn: 344140 --- clang/unittests/Basic/FileManagerTest.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/unittests/Basic/FileManagerTest.cpp') diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp index 52cb5b2f0d6..309de479499 100644 --- a/clang/unittests/Basic/FileManagerTest.cpp +++ b/clang/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 *F, - vfs::FileSystem &FS) override { + std::unique_ptr *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(new vfs::InMemoryFileSystem); + auto FS = IntrusiveRefCntPtr( + new llvm::vfs::InMemoryFileSystem); // setCurrentworkingdirectory must finish without error. ASSERT_TRUE(!FS->setCurrentWorkingDirectory(CustomWorkingDir)); -- cgit v1.2.3