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

Chris Lattner sabre at nondot.org
Sun Apr 20 21:20:34 PDT 2008


Author: lattner
Date: Sun Apr 20 23:20:33 2008
New Revision: 50024

URL: http://llvm.org/viewvc/llvm-project?rev=50024&view=rev
Log:
fix a bug introduced by Nicholas' "unwinds to" stuff: we
lost newlines between blocks.

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=50024&r1=50023&r2=50024&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Sun Apr 20 23:20:33 2008
@@ -1164,7 +1164,7 @@
 ///
 void AssemblyWriter::printBasicBlock(const BasicBlock *BB) {
   if (BB->hasName())              // Print out the label if it exists...
-    Out << getLLVMName(BB->getName(), LabelPrefix) << ':';
+    Out << '\n' << getLLVMName(BB->getName(), LabelPrefix) << ':';
 
   if (const BasicBlock* unwindDest = BB->getUnwindDest()) {
     if (BB->hasName())
@@ -1175,7 +1175,7 @@
   }
 
   if (!BB->hasName() && !BB->use_empty()) { // Don't print block # of no uses...
-    Out << "; <label>:";
+    Out << "\n; <label>:";
     int Slot = Machine.getLocalSlot(BB);
     if (Slot != -1)
       Out << Slot;





More information about the llvm-commits mailing list