Put code that generates debug labels into TableGen so that it can be used by
everyone.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64978 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
index 9af3ba6..12cfda1 100644
--- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
@@ -26,6 +26,7 @@
 #include "llvm/Type.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/ADT/StringExtras.h"
+#include "llvm/CodeGen/DwarfWriter.h"
 #include "llvm/CodeGen/MachineJumpTableInfo.h"
 #include "llvm/Support/Mangler.h"
 #include "llvm/Support/raw_ostream.h"
@@ -725,23 +726,6 @@
 void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
   ++EmittedInsts;
 
-  if (TAI->doesSupportDebugInformation()) {
-    const Function *F = MF->getFunction();
-
-    // FIXME: Support more than '-Os'.
-    if (F->hasFnAttr(Attribute::OptimizeForSize)) {
-      static DebugLoc PrevDL = DebugLoc::getUnknownLoc();
-      DebugLoc CurDL = MI->getDebugLoc();
-
-      if (!CurDL.isUnknown() && PrevDL != CurDL) {
-        DebugLocTuple DLT = MF->getDebugLocTuple(CurDL);
-        printLabel(DW->RecordSourceLine(DLT.Line, DLT.Col, DLT.Src));
-      }
-
-      PrevDL = CurDL;
-    }
-  }
-
   // Call the autogenerated instruction printer routines.
   printInstruction(MI);
 }