aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Frontend/PCHPreambleTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Frontend/PCHPreambleTest.cpp')
-rw-r--r--clang/unittests/Frontend/PCHPreambleTest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/unittests/Frontend/PCHPreambleTest.cpp b/clang/unittests/Frontend/PCHPreambleTest.cpp
index faad408..9991838 100644
--- a/clang/unittests/Frontend/PCHPreambleTest.cpp
+++ b/clang/unittests/Frontend/PCHPreambleTest.cpp
@@ -62,7 +62,7 @@ public:
void TearDown() override {}
void ResetVFS() {
- VFS = new ReadCountingInMemoryFileSystem();
+ VFS = llvm::makeIntrusiveRefCnt<ReadCountingInMemoryFileSystem>();
// We need the working directory to be set to something absolute,
// otherwise it ends up being inadvertently set to the current
// working directory in the real file system due to a series of
@@ -100,7 +100,7 @@ public:
CompilerInstance::createDiagnostics(*VFS, *DiagOpts,
new DiagnosticConsumer));
- FileManager *FileMgr = new FileManager(FSOpts, VFS);
+ auto FileMgr = llvm::makeIntrusiveRefCnt<FileManager>(FSOpts, VFS);
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromCompilerInvocation(
CI, PCHContainerOpts, DiagOpts, Diags, FileMgr, false,