[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Nov 16 17:01:06 PST 2003
Changes in directory llvm/lib/VMCore:
AsmWriter.cpp updated: 1.108 -> 1.109
---
Log message:
Don't print 'No predecessors!' on the entry block
---
Diffs of the changes: (+13 -11)
Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.108 llvm/lib/VMCore/AsmWriter.cpp:1.109
--- llvm/lib/VMCore/AsmWriter.cpp:1.108 Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/AsmWriter.cpp Sun Nov 16 16:59:57 2003
@@ -748,18 +748,20 @@
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);
+ }
}
}
More information about the llvm-commits
mailing list