summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/VirtualFileSystem.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-06-12 20:05:23 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-06-12 20:05:23 +0000
commitd6da1a097b218fc7fa15d4b89ab5a413858ff87d (patch)
tree791ddacf7f2fe167d827d926468f393cbcba5e24 /clang/lib/Basic/VirtualFileSystem.cpp
parentea76b6fde2a02522d81e8702acb7bd02fca17258 (diff)
downloadbcm5719-llvm-d6da1a097b218fc7fa15d4b89ab5a413858ff87d.tar.gz
bcm5719-llvm-d6da1a097b218fc7fa15d4b89ab5a413858ff87d.zip
Add some std::move where the value is only read otherwise.
This mostly affects smart pointers. No functionality change intended. llvm-svn: 272520
Diffstat (limited to 'clang/lib/Basic/VirtualFileSystem.cpp')
-rw-r--r--clang/lib/Basic/VirtualFileSystem.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp
index d64c4e3d8c0..2eb7a84521f 100644
--- a/clang/lib/Basic/VirtualFileSystem.cpp
+++ b/clang/lib/Basic/VirtualFileSystem.cpp
@@ -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() {
OpenPOWER on IntegriCloud