[llvm-commits] [llvm] r167289 - /llvm/trunk/lib/VMCore/DataLayout.cpp

Duncan Sands baldrick at free.fr
Fri Nov 2 02:02:37 PDT 2012


Author: baldrick
Date: Fri Nov  2 04:02:37 2012
New Revision: 167289

URL: http://llvm.org/viewvc/llvm-project?rev=167289&view=rev
Log:
Enable the assertion in getIntPtrType (I've audited all users of this method and
they are now all correct; hopefully the buildbots will agree!).

Modified:
    llvm/trunk/lib/VMCore/DataLayout.cpp

Modified: llvm/trunk/lib/VMCore/DataLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/DataLayout.cpp?rev=167289&r1=167288&r2=167289&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/DataLayout.cpp (original)
+++ llvm/trunk/lib/VMCore/DataLayout.cpp Fri Nov  2 04:02:37 2012
@@ -671,13 +671,8 @@
 /// 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))





More information about the llvm-commits mailing list