From 23c3288ce9339df174823a8e833d8f68ff2d8bdd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 3 Oct 2003 19:02:41 +0000 Subject: [PATCH] Explicit copy ctors are no longer needed git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8844 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Type.cpp | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 3d53a34a525..1f6ffe1bdc6 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -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 &args) : ElTypes(args) {} - // Explicit copy ctor not needed - StructValType(const StructValType &SVT) : ElTypes(SVT.ElTypes) {} - static StructValType get(const StructType *ST) { std::vector 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()); } -- 2.34.1