From 0eaee545eef49ff9498234d3a51a5cbde59bf976 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 15 Aug 2019 15:54:37 +0000 Subject: [llvm] Migrate llvm::make_unique to std::make_unique Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013 --- llvm/lib/Support/VirtualFileSystem.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'llvm/lib/Support/VirtualFileSystem.cpp') diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index 5d3480e97148..e4197c18cc99 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -349,7 +349,7 @@ IntrusiveRefCntPtr vfs::getRealFileSystem() { } std::unique_ptr vfs::createPhysicalFileSystem() { - return llvm::make_unique(false); + return std::make_unique(false); } namespace { @@ -754,7 +754,7 @@ bool InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime, ResolvedUser, ResolvedGroup, 0, sys::fs::file_type::directory_file, NewDirectoryPerms); Dir = cast(Dir->addChild( - Name, llvm::make_unique(std::move(Stat)))); + Name, std::make_unique(std::move(Stat)))); continue; } @@ -1209,7 +1209,7 @@ class llvm::vfs::RedirectingFileSystemParser { // ... or create a new one std::unique_ptr E = - llvm::make_unique( + std::make_unique( Name, Status("", getNextVirtualUniqueID(), std::chrono::system_clock::now(), 0, 0, 0, file_type::directory_file, sys::fs::all_all)); @@ -1252,7 +1252,7 @@ class llvm::vfs::RedirectingFileSystemParser { auto *DE = dyn_cast( NewParentE); DE->addContent( - llvm::make_unique( + std::make_unique( Name, FE->getExternalContentsPath(), FE->getUseName())); break; } @@ -1423,12 +1423,12 @@ class llvm::vfs::RedirectingFileSystemParser { std::unique_ptr Result; switch (Kind) { case RedirectingFileSystem::EK_File: - Result = llvm::make_unique( + Result = std::make_unique( LastComponent, std::move(ExternalContentsPath), UseExternalName); break; case RedirectingFileSystem::EK_Directory: Result = - llvm::make_unique( + std::make_unique( LastComponent, std::move(EntryArrayContents), Status("", getNextVirtualUniqueID(), std::chrono::system_clock::now(), 0, 0, 0, @@ -1447,7 +1447,7 @@ class llvm::vfs::RedirectingFileSystemParser { std::vector> Entries; Entries.push_back(std::move(Result)); Result = - llvm::make_unique( + std::make_unique( *I, std::move(Entries), Status("", getNextVirtualUniqueID(), std::chrono::system_clock::now(), 0, 0, 0, @@ -1763,7 +1763,7 @@ RedirectingFileSystem::openFileForRead(const Twine &Path) { Status S = getRedirectedFileStatus(Path, F->useExternalName(UseExternalNames), *ExternalStatus); return std::unique_ptr( - llvm::make_unique(std::move(*Result), S)); + std::make_unique(std::move(*Result), S)); } std::error_code -- cgit v1.2.3