Place dwarf headers at earliest possible point.  Well behaved when skipping
functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28781 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86ATTAsmPrinter.cpp b/lib/Target/X86/X86ATTAsmPrinter.cpp
index 3e690aa..f103bcc 100755
--- a/lib/Target/X86/X86ATTAsmPrinter.cpp
+++ b/lib/Target/X86/X86ATTAsmPrinter.cpp
@@ -29,6 +29,8 @@
   // Let PassManager know we need debug information and relay
   // the MachineDebugInfo address on to DwarfWriter.
   DW.SetDebugInfo(&getAnalysis<MachineDebugInfo>());
+  // FIXME - should be able to debug coalesced functions.
+  bool IsNormalText = true;
 
   SetupMachineFunction(MF);
   O << "\n\n";
@@ -72,13 +74,14 @@
       SwitchToTextSection("", F);
       O << "\t.weak " << CurrentFnName << "\n";
     }
+    IsNormalText = false;
     break;
   }
   O << CurrentFnName << ":\n";
 
   if (Subtarget->TargetType == X86Subtarget::isDarwin) {
     // Emit pre-function debug information.
-    DW.BeginFunction(&MF);
+    DW.BeginFunction(&MF, IsNormalText);
   }
 
   // Print out code for the function.