aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2024-03-01 16:49:52 -0800
committerJan Svoboda <jan_svoboda@apple.com>2024-03-01 16:53:12 -0800
commit164c0985681648cf18bef69d75ece2b327525737 (patch)
tree94cc9abf2d1a003448bb8c1a12411bf98932d362 /clang/lib/Frontend/CompilerInvocation.cpp
parent864593b91d289c57c64a0f12658b9ff415da1ad8 (diff)
downloadllvm-164c0985681648cf18bef69d75ece2b327525737.zip
llvm-164c0985681648cf18bef69d75ece2b327525737.tar.gz
llvm-164c0985681648cf18bef69d75ece2b327525737.tar.bz2
[clang][deps] Implement move-conversion for `CowCompilerInvocation` (follow-up)
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp11
1 files changed, 11 insertions, 0 deletions
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 <typename T>
T &ensureOwned(std::shared_ptr<T> &Storage) {