[llvm-commits] CVS: llvm/lib/VMCore/Type.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Oct 3 14:03:04 PDT 2003


Changes in directory llvm/lib/VMCore:

Type.cpp updated: 1.73 -> 1.74

---
Log message:

Explicit copy ctors are no longer needed


---
Diffs of the changes:

Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.73 llvm/lib/VMCore/Type.cpp:1.74
--- llvm/lib/VMCore/Type.cpp:1.73	Fri Oct  3 13:57:54 2003
+++ llvm/lib/VMCore/Type.cpp	Fri Oct  3 14:02:41 2003
@@ -604,16 +604,6 @@
       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 @@
 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 @@
 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());
@@ -790,9 +772,6 @@
   const Type *ValTy;
 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());





More information about the llvm-commits mailing list