diff options
Diffstat (limited to 'clang/unittests/Frontend/ReparseWorkingDirTest.cpp')
-rw-r--r-- | clang/unittests/Frontend/ReparseWorkingDirTest.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/unittests/Frontend/ReparseWorkingDirTest.cpp b/clang/unittests/Frontend/ReparseWorkingDirTest.cpp index 1b8051f..6b34b96 100644 --- a/clang/unittests/Frontend/ReparseWorkingDirTest.cpp +++ b/clang/unittests/Frontend/ReparseWorkingDirTest.cpp @@ -28,7 +28,9 @@ class ReparseWorkingDirTest : public ::testing::Test { std::shared_ptr<PCHContainerOperations> PCHContainerOpts; public: - void SetUp() override { VFS = new vfs::InMemoryFileSystem(); } + void SetUp() override { + VFS = llvm::makeIntrusiveRefCnt<vfs::InMemoryFileSystem>(); + } void TearDown() override {} void setWorkingDirectory(StringRef Path) { @@ -62,7 +64,8 @@ public: CompilerInstance::createDiagnostics(*VFS, *DiagOpts, new DiagnosticConsumer)); - FileManager *FileMgr = new FileManager(CI->getFileSystemOpts(), VFS); + auto FileMgr = + llvm::makeIntrusiveRefCnt<FileManager>(CI->getFileSystemOpts(), VFS); std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromCompilerInvocation( CI, PCHContainerOpts, DiagOpts, Diags, FileMgr, false, |