label* is not a valid type, add an assertion.
authorChris Lattner <sabre@nondot.org>
Sun, 15 Oct 2006 23:21:12 +0000 (23:21 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Oct 2006 23:21:12 +0000 (23:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30968 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index b7cf54d72a613ced7445322d1380e91ec14b977f..e87da1d6e0a25fd91f8ab8782ff53e3f906580de 100644 (file)
@@ -1204,6 +1204,7 @@ 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!");
+  assert(ValueType != Type::LabelTy && "Pointer to label is not valid!");
   PointerValType PVT(ValueType);
 
   PointerType *PT = PointerTypes->get(PVT);