From 164c0985681648cf18bef69d75ece2b327525737 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Fri, 1 Mar 2024 16:49:52 -0800 Subject: [clang][deps] Implement move-conversion for `CowCompilerInvocation` (follow-up) --- clang/lib/Frontend/CompilerInvocation.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 9555dbf6..691f3b9 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -191,6 +191,17 @@ CompilerInvocationBase::shallow_copy_assign(const CompilerInvocationBase &X) { return *this; } +CompilerInvocation::CompilerInvocation(const CowCompilerInvocation &X) + : CompilerInvocationBase(EmptyConstructor{}) { + CompilerInvocationBase::deep_copy_assign(X); +} + +CompilerInvocation & +CompilerInvocation::operator=(const CowCompilerInvocation &X) { + CompilerInvocationBase::deep_copy_assign(X); + return *this; +} + namespace { template T &ensureOwned(std::shared_ptr &Storage) { -- cgit v1.1