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
This commit is contained in:
Chris Lattner 2006-10-15 23:26:46 +00:00
parent 1d4b6bfd3e
commit 9e76ce97b8

View File

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