From 4e942d63c06358cadd49f49d0db9011928f53719 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 4 Mar 2015 07:09:53 +0000 Subject: [PATCH] Make OptionValue explicitly copyable Since OptionValue (& its base classes) have user-declared dtors, use of the implicit copy ctor/assignment operator is deprecated in C++11. Provide them explicitly (defaulted) to avoid depending on this deprecated feature. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231218 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/CommandLine.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index df6f99d6d80..629fa46fac8 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -356,6 +356,9 @@ struct GenericOptionValue { protected: ~GenericOptionValue() = default; + GenericOptionValue() = default; + GenericOptionValue(const GenericOptionValue&) = default; + GenericOptionValue &operator=(const GenericOptionValue &) = default; private: virtual void anchor(); @@ -394,6 +397,8 @@ template class OptionValueCopy : public GenericOptionValue { protected: ~OptionValueCopy() = default; + OptionValueCopy(const OptionValueCopy&) = default; + OptionValueCopy &operator=(const OptionValueCopy&) = default; public: OptionValueCopy() : Valid(false) {} @@ -428,6 +433,9 @@ struct OptionValueBase : OptionValueCopy { protected: ~OptionValueBase() = default; + OptionValueBase() = default; + OptionValueBase(const OptionValueBase&) = default; + OptionValueBase &operator=(const OptionValueBase&) = default; }; // Top-level option class. -- 2.34.1