diff options
Diffstat (limited to 'clang/unittests/Frontend/ASTUnitTest.cpp')
-rw-r--r-- | clang/unittests/Frontend/ASTUnitTest.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/unittests/Frontend/ASTUnitTest.cpp b/clang/unittests/Frontend/ASTUnitTest.cpp index 7148ca0..7160453 100644 --- a/clang/unittests/Frontend/ASTUnitTest.cpp +++ b/clang/unittests/Frontend/ASTUnitTest.cpp @@ -55,7 +55,8 @@ protected: if (!CInvok) return nullptr; - FileManager *FileMgr = new FileManager(FileSystemOptions(), VFS); + auto FileMgr = + llvm::makeIntrusiveRefCnt<FileManager>(FileSystemOptions(), VFS); PCHContainerOps = std::make_shared<PCHContainerOperations>(); return ASTUnit::LoadFromCompilerInvocation( @@ -143,7 +144,8 @@ TEST_F(ASTUnitTest, ModuleTextualHeader) { CInvok = createInvocation(Args, std::move(CIOpts)); ASSERT_TRUE(CInvok); - FileManager *FileMgr = new FileManager(FileSystemOptions(), InMemoryFs); + auto FileMgr = + llvm::makeIntrusiveRefCnt<FileManager>(FileSystemOptions(), InMemoryFs); PCHContainerOps = std::make_shared<PCHContainerOperations>(); auto AU = ASTUnit::LoadFromCompilerInvocation( |