When not destroying the source, the linker is not remapping the types. Added support
[oota-llvm.git] / include / llvm / DerivedTypes.h
index 445c3deb7ce205dc8b21a2a45796fa5e63f2a446..b9ade512cfb434af751d7ca8b61535418dcd6830 100644 (file)
@@ -374,6 +374,7 @@ public:
   ///
   static VectorType *getInteger(VectorType *VTy) {
     unsigned EltBits = VTy->getElementType()->getPrimitiveSizeInBits();
+    assert(EltBits && "Element size must be of a non-zero size");
     Type *EltTy = IntegerType::get(VTy->getContext(), EltBits);
     return VectorType::get(EltTy, VTy->getNumElements());
   }
@@ -408,6 +409,7 @@ public:
   unsigned getNumElements() const { return NumElements; }
 
   /// @brief Return the number of bits in the Vector type.
+  /// Returns zero when the vector is a vector of pointers.
   unsigned getBitWidth() const {
     return NumElements * getElementType()->getPrimitiveSizeInBits();
   }