Skip to content

Commit c60ee7c

Browse files
authored
[clang][deps] Implement move-conversion for CowCompilerInvocation (#66301)
This avoids making copies at the end of `makeCommonInvocationForModuleBuild()` (in `ModuleDepCollector.cpp`).
1 parent 8f5d519 commit c60ee7c

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
@@ -354,6 +354,9 @@ class CowCompilerInvocation : public CompilerInvocationBase {
354354
deep_copy_assign(X);
355355
}
356356

357+
CowCompilerInvocation(CompilerInvocation &&X)
358+
: CompilerInvocationBase(std::move(X)) {}
359+
357360
// Const getters are inherited from the base class.
358361

359362
/// Mutable getters.

0 commit comments

Comments
 (0)