diff options
Diffstat (limited to 'clang/unittests/Support/TimeProfilerTest.cpp')
-rw-r--r-- | clang/unittests/Support/TimeProfilerTest.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/unittests/Support/TimeProfilerTest.cpp b/clang/unittests/Support/TimeProfilerTest.cpp index f70149d..871c59f 100644 --- a/clang/unittests/Support/TimeProfilerTest.cpp +++ b/clang/unittests/Support/TimeProfilerTest.cpp @@ -52,8 +52,7 @@ bool compileFromString(StringRef Code, StringRef Standard, StringRef File, FS->addFile(Header.getKey(), 0, MemoryBuffer::getMemBuffer(Header.getValue())); } - llvm::IntrusiveRefCntPtr<FileManager> Files( - new FileManager(FileSystemOptions(), FS)); + auto Files = llvm::makeIntrusiveRefCnt<FileManager>(FileSystemOptions(), FS); auto Invocation = std::make_shared<CompilerInvocation>(); std::vector<const char *> Args = {Standard.data(), File.data()}; @@ -64,7 +63,7 @@ bool compileFromString(StringRef Code, StringRef Standard, StringRef File, CompilerInstance Compiler(std::move(Invocation)); Compiler.createDiagnostics(Files->getVirtualFileSystem()); - Compiler.setFileManager(Files.get()); + Compiler.setFileManager(Files); class TestFrontendAction : public ASTFrontendAction { private: |