don't let Reid build void*'s :)
authorChris Lattner <sabre@nondot.org>
Tue, 26 Apr 2005 20:03:33 +0000 (20:03 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 26 Apr 2005 20:03:33 +0000 (20:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21571 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index 48c468a4a461011fff28cc0ac50da2a283e0e8e0..a212c3b7b981ac1970539f998480022b9e7e7d2e 100644 (file)
@@ -1110,6 +1110,8 @@ static TypeMap<PointerValType, PointerType> PointerTypes;
 
 PointerType *PointerType::get(const Type *ValueType) {
   assert(ValueType && "Can't get a pointer to <null> type!");
+  assert(ValueType != Type::VoidTy &&
+         "Pointer to void is not valid, use sbyte* instead!");
   PointerValType PVT(ValueType);
 
   PointerType *PT = PointerTypes.get(PVT);