Produce a useful error message for Regression/Verifier/2006-10-15-AddrLabel.ll
authorChris Lattner <sabre@nondot.org>
Sun, 15 Oct 2006 23:26:46 +0000 (23:26 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 15 Oct 2006 23:26:46 +0000 (23:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30970 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index b64a07dd41ea5f106c20f2ba31f073f56a108617..e57ca4ca5d41d0e775b922818c98e179715c4817 100644 (file)
@@ -1296,6 +1296,8 @@ UpRTypes : '\\' EUINT64VAL {                   // Type UpReference
     CHECK_FOR_ERROR
   }
   | UpRTypes '*' {                             // Pointer type?
+    if (*$1 == Type::LabelTy)
+      GEN_ERROR("Cannot form a pointer to a basic block");
     $$ = new PATypeHolder(HandleUpRefs(PointerType::get(*$1)));
     delete $1;
     CHECK_FOR_ERROR