Skip to content

Commit df238ba

Browse files
committed
[clang][deps] Implement move-conversion for CowCompilerInvocation (llvm#66301)
This avoids making copies at the end of `makeCommonInvocationForModuleBuild()` (in `ModuleDepCollector.cpp`).
1 parent 52a7543 commit df238ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/include/clang/Frontend/CompilerInvocation.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,9 @@ class CowCompilerInvocation : public CompilerInvocationBase {
400400
deep_copy_assign(X);
401401
}
402402

403+
CowCompilerInvocation(CompilerInvocation &&X)
404+
: CompilerInvocationBase(std::move(X)) {}
405+
403406
// Const getters are inherited from the base class.
404407

405408
/// Mutable getters.

0 commit comments

Comments
 (0)