1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Don't print 'No predecessors!' on the entry block

llvm-svn: 10038
This commit is contained in:
Chris Lattner 2003-11-16 22:59:57 +00:00
parent ca6f25286f
commit 21c40d8641

View File

@ -748,18 +748,20 @@ void AssemblyWriter::printBasicBlock(const BasicBlock *BB) {
Out << "<badref>";
}
// Output predecessors for the block...
Out << "\t\t;";
pred_const_iterator PI = pred_begin(BB), PE = pred_end(BB);
if (PI == PE) {
Out << " No predecessors!";
} else {
Out << " preds =";
writeOperand(*PI, false, true);
for (++PI; PI != PE; ++PI) {
Out << ",";
if (BB != &BB->getParent()->front()) { // Not the entry block?
// Output predecessors for the block...
Out << "\t\t;";
pred_const_iterator PI = pred_begin(BB), PE = pred_end(BB);
if (PI == PE) {
Out << " No predecessors!";
} else {
Out << " preds =";
writeOperand(*PI, false, true);
for (++PI; PI != PE; ++PI) {
Out << ",";
writeOperand(*PI, false, true);
}
}
}