Produce a useful error message for Regression/Verifier/2006-10-15-AddrLabel.ll

llvm-svn: 30970
This commit is contained in:
Chris Lattner 2006-10-15 23:26:46 +00:00
parent 7fce911edd
commit aad30b7804
1 changed files with 2 additions and 0 deletions

View 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