r328623 - Move a ref-counted pointer instead of copying it. NFC.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 27 07:02:06 PDT 2018


Author: alexfh
Date: Tue Mar 27 07:02:06 2018
New Revision: 328623

URL: http://llvm.org/viewvc/llvm-project?rev=328623&view=rev
Log:
Move a ref-counted pointer instead of copying it. NFC.

Modified:
    cfe/trunk/lib/Tooling/Tooling.cpp

Modified: cfe/trunk/lib/Tooling/Tooling.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Tooling.cpp?rev=328623&r1=328622&r2=328623&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/Tooling.cpp (original)
+++ cfe/trunk/lib/Tooling/Tooling.cpp Tue Mar 27 07:02:06 2018
@@ -361,7 +361,7 @@ ClangTool::ClangTool(const CompilationDa
                      IntrusiveRefCntPtr<vfs::FileSystem> BaseFS)
     : Compilations(Compilations), SourcePaths(SourcePaths),
       PCHContainerOps(std::move(PCHContainerOps)),
-      OverlayFileSystem(new vfs::OverlayFileSystem(BaseFS)),
+      OverlayFileSystem(new vfs::OverlayFileSystem(std::move(BaseFS))),
       InMemoryFileSystem(new vfs::InMemoryFileSystem),
       Files(new FileManager(FileSystemOptions(), OverlayFileSystem)) {
   OverlayFileSystem->pushOverlay(InMemoryFileSystem);




More information about the cfe-commits mailing list