[llvm-commits] [llvm] r50078 - /llvm/trunk/lib/VMCore/AsmWriter.cpp

Chris Lattner sabre at nondot.org
Mon Apr 21 19:45:44 PDT 2008


Author: lattner
Date: Mon Apr 21 21:45:44 2008
New Revision: 50078

URL: http://llvm.org/viewvc/llvm-project?rev=50078&view=rev
Log:
more fallout from Nicholas' asmprinter patch.

Modified:
    llvm/trunk/lib/VMCore/AsmWriter.cpp

Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=50078&r1=50077&r2=50078&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Mon Apr 21 21:45:44 2008
@@ -1185,28 +1185,24 @@
 
   if (BB->getParent() == 0)
     Out << "\t\t; Error: Block without parent!";
-  else {
-    if (BB != &BB->getParent()->getEntryBlock()) {  // 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 =";
+  else if (BB != &BB->getParent()->getEntryBlock()) {  // 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);
+      for (++PI; PI != PE; ++PI) {
+        Out << ',';
         writeOperand(*PI, false);
-        for (++PI; PI != PE; ++PI) {
-          Out << ',';
-          writeOperand(*PI, false);
-        }
       }
     }
   }
 
-  if (BB->hasName() || !BB->use_empty() || BB->getUnwindDest() ||
-      BB != &BB->getParent()->getEntryBlock())
-    Out << "\n";
+  Out << "\n";
 
   if (AnnotationWriter) AnnotationWriter->emitBasicBlockStartAnnot(BB, Out);
 





More information about the llvm-commits mailing list