- if (BB->hasName()) { // Print out the label if it exists...
- Out << "\n" << getLLVMName(BB->getName(), LabelPrefix) << ':';
- } else if (!BB->use_empty()) { // Don't print block # of no uses...
- Out << "\n; <label>:";
+ if (BB->hasName()) // Print out the label if it exists...
+ Out << getLLVMName(BB->getName(), LabelPrefix) << ':';
+
+ if (const BasicBlock* unwindDest = BB->getUnwindDest()) {
+ if (BB->hasName())
+ Out << ' ';
+
+ Out << "unwinds to";
+ writeOperand(unwindDest, false);
+ }
+
+ if (!BB->hasName() && !BB->use_empty()) { // Don't print block # of no uses...
+ Out << "; <label>:";