Now that setStartLabel takes an MCSymbol, we can de-ID'ize
beginScope and RecordSourceLine.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98035 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index af651a7..a0842d8 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1948,14 +1948,14 @@
 }
 
 /// beginScope - Process beginning of a scope starting at Label.
-void DwarfDebug::beginScope(const MachineInstr *MI, unsigned Label) {
+void DwarfDebug::beginScope(const MachineInstr *MI, MCSymbol *Label) {
   InsnToDbgScopeMapTy::iterator I = DbgScopeBeginMap.find(MI);
   if (I == DbgScopeBeginMap.end())
     return;
   ScopeVector &SD = I->second;
   for (ScopeVector::iterator SDI = SD.begin(), SDE = SD.end();
        SDI != SDE; ++SDI)
-    (*SDI)->setStartLabel(getDWLabel("label", Label));
+    (*SDI)->setStartLabel(Label);
 }
 
 /// endScope - Process end of a scope.
@@ -2124,7 +2124,7 @@
       Col = DLT.getColumnNumber();
     }
     
-    Asm->printLabel(recordSourceLine(Line, Col, DLT.getScope().getNode()));
+    recordSourceLine(Line, Col, DLT.getScope().getNode());
   }
   if (TimePassesIsEnabled)
     DebugTimer->stopTimer();
@@ -2180,11 +2180,10 @@
     DebugTimer->stopTimer();
 }
 
-/// recordSourceLine - Records location information and associates it with a
-/// label. Returns a unique label ID used to generate a label and provide
-/// correspondence to the source line list.
-unsigned DwarfDebug::recordSourceLine(unsigned Line, unsigned Col,
-                                      MDNode *S) {
+/// recordSourceLine - Register a source line with debug info. Returns the
+/// unique label that was emitted and which provides correspondence to
+/// the source line list.
+MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) {
   if (!MMI)
     return 0;
 
@@ -2217,7 +2216,9 @@
   if (TimePassesIsEnabled)
     DebugTimer->stopTimer();
 
-  return ID;
+  MCSymbol *Label = getDWLabel("label", ID);
+  Asm->OutStreamer.EmitLabel(Label);
+  return Label;
 }
 
 /// getOrCreateSourceID - Public version of GetOrCreateSourceID. This can be