Enable the assertion in getIntPtrType (I've audited all users of this method and
authorDuncan Sands <baldrick@free.fr>
Fri, 2 Nov 2012 09:02:37 +0000 (09:02 +0000)
committerDuncan Sands <baldrick@free.fr>
Fri, 2 Nov 2012 09:02:37 +0000 (09:02 +0000)
they are now all correct; hopefully the buildbots will agree!).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167289 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/DataLayout.cpp

index c127aaba42ca62e9689785a971946841b9dd5ad9..19cf0f5cd3e88aa75113bc7f1a965a3a5f88876c 100644 (file)
@@ -671,13 +671,8 @@ IntegerType *DataLayout::getIntPtrType(LLVMContext &C,
 /// least as big as that of a pointer of the given pointer (vector of pointer)
 /// type.
 Type *DataLayout::getIntPtrType(Type *Ty) const {
-#if 0
-  // FIXME: This assert should always have been here, but the review comments
-  // weren't addressed in time, and now there is lots of code "depending" on
-  // this. Uncomment once this is cleaned up.
   assert(Ty->isPtrOrPtrVectorTy() &&
          "Expected a pointer or pointer vector type.");
-#endif
   unsigned NumBits = getTypeSizeInBits(Ty->getScalarType());
   IntegerType *IntTy = IntegerType::get(Ty->getContext(), NumBits);
   if (VectorType *VecTy = dyn_cast<VectorType>(Ty))