Make OptionValue explicitly copyable
[oota-llvm.git] / include / llvm / Support / CommandLine.h
index df6f99d6d809c491cdc9d733b4a6a5fce0bc35ea..629fa46fac8e44948e2a042697941a78df0c790e 100644 (file)
@@ -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.