diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-15 15:54:37 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-08-15 15:54:37 +0000 |
commit | 0eaee545eef49ff9498234d3a51a5cbde59bf976 (patch) | |
tree | fd7691e102022fb97622c5485fa8c4f506fc124e /llvm/lib/Support/VirtualFileSystem.cpp | |
parent | 1c34d10776828c0756ff4f0b2b9aa8bda2be348a (diff) | |
download | llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.zip llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.tar.gz llvm-0eaee545eef49ff9498234d3a51a5cbde59bf976.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r-- | llvm/lib/Support/VirtualFileSystem.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp index 5d3480e..e4197c1 100644 --- a/llvm/lib/Support/VirtualFileSystem.cpp +++ b/llvm/lib/Support/VirtualFileSystem.cpp @@ -349,7 +349,7 @@ IntrusiveRefCntPtr<FileSystem> vfs::getRealFileSystem() { } std::unique_ptr<FileSystem> vfs::createPhysicalFileSystem() { - return llvm::make_unique<RealFileSystem>(false); + return std::make_unique<RealFileSystem>(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<detail::InMemoryDirectory>(Dir->addChild( - Name, llvm::make_unique<detail::InMemoryDirectory>(std::move(Stat)))); + Name, std::make_unique<detail::InMemoryDirectory>(std::move(Stat)))); continue; } @@ -1209,7 +1209,7 @@ class llvm::vfs::RedirectingFileSystemParser { // ... or create a new one std::unique_ptr<RedirectingFileSystem::Entry> E = - llvm::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( + std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( 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<RedirectingFileSystem::RedirectingDirectoryEntry>( NewParentE); DE->addContent( - llvm::make_unique<RedirectingFileSystem::RedirectingFileEntry>( + std::make_unique<RedirectingFileSystem::RedirectingFileEntry>( Name, FE->getExternalContentsPath(), FE->getUseName())); break; } @@ -1423,12 +1423,12 @@ class llvm::vfs::RedirectingFileSystemParser { std::unique_ptr<RedirectingFileSystem::Entry> Result; switch (Kind) { case RedirectingFileSystem::EK_File: - Result = llvm::make_unique<RedirectingFileSystem::RedirectingFileEntry>( + Result = std::make_unique<RedirectingFileSystem::RedirectingFileEntry>( LastComponent, std::move(ExternalContentsPath), UseExternalName); break; case RedirectingFileSystem::EK_Directory: Result = - llvm::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( + std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( LastComponent, std::move(EntryArrayContents), Status("", getNextVirtualUniqueID(), std::chrono::system_clock::now(), 0, 0, 0, @@ -1447,7 +1447,7 @@ class llvm::vfs::RedirectingFileSystemParser { std::vector<std::unique_ptr<RedirectingFileSystem::Entry>> Entries; Entries.push_back(std::move(Result)); Result = - llvm::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( + std::make_unique<RedirectingFileSystem::RedirectingDirectoryEntry>( *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<File>( - llvm::make_unique<FileWithFixedStatus>(std::move(*Result), S)); + std::make_unique<FileWithFixedStatus>(std::move(*Result), S)); } std::error_code |