Explicit copy ctors are no longer needed
authorChris Lattner <sabre@nondot.org>
Fri, 3 Oct 2003 19:02:41 +0000 (19:02 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 3 Oct 2003 19:02:41 +0000 (19:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8844 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index 3d53a34a5252badc5b408f34de3d7fc5dcdfda4a..1f6ffe1bdc65a3965c48021b59507a13cb9ef08a 100644 (file)
@@ -604,16 +604,6 @@ public:
       ArgTypes.push_back(args[i]);
   }
 
-  // We *MUST* have an explicit copy ctor so that the TypeHandles think that
-  // this FunctionValType owns them, not the old one!
-  //
-  FunctionValType(const FunctionValType &MVT)
-    : RetTy(MVT.RetTy), isVarArg(MVT.isVarArg) {
-    ArgTypes.reserve(MVT.ArgTypes.size());
-    for (unsigned i = 0; i < MVT.ArgTypes.size(); ++i)
-      ArgTypes.push_back(MVT.ArgTypes[i]);
-  }
-
   static FunctionValType get(const FunctionType *FT);
 
   // Subclass should override this... to update self as usual
@@ -676,11 +666,6 @@ class ArrayValType {
 public:
   ArrayValType(const Type *val, int sz) : ValTy(val), Size(sz) {}
 
-  // We *MUST* have an explicit copy ctor so that the ValTy thinks that this
-  // ArrayValType owns it, not the old one!
-  //
-  ArrayValType(const ArrayValType &AVT) : ValTy(AVT.ValTy), Size(AVT.Size) {}
-
   static ArrayValType get(const ArrayType *AT) {
     return ArrayValType(AT->getElementType(), AT->getNumElements());
   }
@@ -734,9 +719,6 @@ class StructValType {
 public:
   StructValType(const std::vector<const Type*> &args) : ElTypes(args) {}
 
-  // Explicit copy ctor not needed
-  StructValType(const StructValType &SVT) : ElTypes(SVT.ElTypes) {}
-
   static StructValType get(const StructType *ST) {
     std::vector<const Type *> ElTypes;
     ElTypes.reserve(ST->getElementTypes().size());
@@ -791,9 +773,6 @@ class PointerValType {
 public:
   PointerValType(const Type *val) : ValTy(val) {}
 
-  // FIXME: delete explicit copy ctor
-  PointerValType(const PointerValType &PVT) : ValTy(PVT.ValTy) {}
-
   static PointerValType get(const PointerType *PT) {
     return PointerValType(PT->getElementType());
   }