Make sure that debug labels are defined within the same section and after the
entry point of a function.

llvm-svn: 27494
diff --git a/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp b/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
index c49f892..718a95b 100755
--- a/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
+++ b/llvm/lib/Target/X86/X86IntelAsmPrinter.cpp
@@ -34,11 +34,6 @@
   SetupMachineFunction(MF);
   O << "\n\n";
 
-  if (forDarwin) {
-    // Emit pre-function debug information.
-    DW.BeginFunction(&MF);
-  }
-
   // Print out constants referenced by the function
   EmitConstantPool(MF.getConstantPool());
 
@@ -49,6 +44,11 @@
   if (HasDotTypeDotSizeDirective)
     O << "\t.type\t" << CurrentFnName << ", @function\n";
   O << CurrentFnName << ":\n";
+  
+  if (forDarwin) {
+    // Emit pre-function debug information.
+    DW.BeginFunction(&MF);
+  }
 
   // Print out code for the function.
   for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();