From 9e76ce97b84b47a2ce278d4b83a4425af7343e27 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 15 Oct 2006 23:26:46 +0000 Subject: [PATCH] Produce a useful error message for Regression/Verifier/2006-10-15-AddrLabel.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30970 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index b64a07dd41e..e57ca4ca5d4 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -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