diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-03-04 07:09:53 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-03-04 07:09:53 +0000 |
commit | 43fbf68c0ec746dfc29382c76213d26f074608bf (patch) | |
tree | 679ee3b8a68f2ac59ee0855022b8e62c5f6d0971 /llvm/include | |
parent | 4c154c6b9120db5a382a062bd5177b4e3f0a1a86 (diff) | |
download | bcm5719-llvm-43fbf68c0ec746dfc29382c76213d26f074608bf.tar.gz bcm5719-llvm-43fbf68c0ec746dfc29382c76213d26f074608bf.zip |
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.
llvm-svn: 231218
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/Support/CommandLine.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/CommandLine.h b/llvm/include/llvm/Support/CommandLine.h index df6f99d6d80..629fa46fac8 100644 --- a/llvm/include/llvm/Support/CommandLine.h +++ b/llvm/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 DataType> 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<DataType, false> : OptionValueCopy<DataType> { protected: ~OptionValueBase() = default; + OptionValueBase() = default; + OptionValueBase(const OptionValueBase&) = default; + OptionValueBase &operator=(const OptionValueBase&) = default; }; // Top-level option class. |