Add some std::move where the value is only read otherwise.

This mostly affects smart pointers. No functionality change intended.

llvm-svn: 272520
This commit is contained in:
Benjamin Kramer
2016-06-12 20:05:23 +00:00
parent ea76b6fde2
commit d6da1a097b
9 changed files with 32 additions and 27 deletions

View File

@@ -280,7 +280,7 @@ directory_iterator RealFileSystem::dir_begin(const Twine &Dir,
// OverlayFileSystem implementation
//===-----------------------------------------------------------------------===/
OverlayFileSystem::OverlayFileSystem(IntrusiveRefCntPtr<FileSystem> BaseFS) {
FSList.push_back(BaseFS);
FSList.push_back(std::move(BaseFS));
}
void OverlayFileSystem::pushOverlay(IntrusiveRefCntPtr<FileSystem> FS) {
@@ -1395,7 +1395,7 @@ RedirectingFileSystem::create(std::unique_ptr<MemoryBuffer> Buffer,
RedirectingFileSystemParser P(Stream);
std::unique_ptr<RedirectingFileSystem> FS(
new RedirectingFileSystem(ExternalFS));
new RedirectingFileSystem(std::move(ExternalFS)));
if (!YAMLFilePath.empty()) {
// Use the YAML path from -ivfsoverlay to compute the dir to be prefixed
@@ -1576,7 +1576,8 @@ vfs::getVFSFromYAML(std::unique_ptr<MemoryBuffer> Buffer,
void *DiagContext,
IntrusiveRefCntPtr<FileSystem> ExternalFS) {
return RedirectingFileSystem::create(std::move(Buffer), DiagHandler,
YAMLFilePath, DiagContext, ExternalFS);
YAMLFilePath, DiagContext,
std::move(ExternalFS));
}
UniqueID vfs::getNextVirtualUniqueID() {