Print the label if we will use it in debug_frame.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 26 Apr 2011 19:26:53 +0000 (19:26 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 26 Apr 2011 19:26:53 +0000 (19:26 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130232 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index b605de2b875f18b028bbdd3ef839662b68469152..f42e628899ae1f1328cdf6feaade073c3bdb16a6 100644 (file)
@@ -593,10 +593,13 @@ static bool EmitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
 
 void AsmPrinter::emitPrologLabel(const MachineInstr &MI) {
   MCSymbol *Label = MI.getOperand(0).getMCSymbol();
-  if (MAI->getExceptionHandlingType() != ExceptionHandling::DwarfCFI) {
+
+  if (MAI->doesDwarfRequireFrameSection() ||
+      MAI->getExceptionHandlingType() != ExceptionHandling::DwarfCFI)
     OutStreamer.EmitLabel(Label);
+
+  if (MAI->getExceptionHandlingType() != ExceptionHandling::DwarfCFI)
     return;
-  }
 
   const MachineFunction &MF = *MI.getParent()->getParent();
   MachineModuleInfo &MMI = MF.getMMI();