it isn't valid to take the address of the entry block.

llvm-svn: 85621
This commit is contained in:
Chris Lattner 2009-10-30 22:15:48 +00:00
parent 1d0015f8e1
commit 112caed500
1 changed files with 2 additions and 0 deletions

View File

@ -658,6 +658,8 @@ void Verifier::visitFunction(Function &F) {
BasicBlock *Entry = &F.getEntryBlock(); BasicBlock *Entry = &F.getEntryBlock();
Assert1(pred_begin(Entry) == pred_end(Entry), Assert1(pred_begin(Entry) == pred_end(Entry),
"Entry block to function must not have predecessors!", Entry); "Entry block to function must not have predecessors!", Entry);
Assert1(!Entry->hasAddressTaken(),
"blockaddress may not be used with the entry block!", Entry);
} }
// If this function is actually an intrinsic, verify that it is only used in // If this function is actually an intrinsic, verify that it is only used in