aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-03-09 02:36:31 +0000
committerEric Christopher <echristo@apple.com>2010-03-09 02:36:31 +0000
commitee6414cf04d680d2c49b867fc6085be79ed32a44 (patch)
tree8d86ce626a7c96595cda5eea15197ffda4adeddf /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent19b3826d0f0e299447d0a1c47d4fb2899d32d31f (diff)
Speculatively revert r98035. It appears to have caused a set of buildbot
failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index a0842d81e5..af651a71d9 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1948,14 +1948,14 @@ void DwarfDebug::collectVariableInfo() {
}
/// beginScope - Process beginning of a scope starting at Label.
-void DwarfDebug::beginScope(const MachineInstr *MI, MCSymbol *Label) {
+void DwarfDebug::beginScope(const MachineInstr *MI, unsigned 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(Label);
+ (*SDI)->setStartLabel(getDWLabel("label", Label));
}
/// endScope - Process end of a scope.
@@ -2124,7 +2124,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
Col = DLT.getColumnNumber();
}
- recordSourceLine(Line, Col, DLT.getScope().getNode());
+ Asm->printLabel(recordSourceLine(Line, Col, DLT.getScope().getNode()));
}
if (TimePassesIsEnabled)
DebugTimer->stopTimer();
@@ -2180,10 +2180,11 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
DebugTimer->stopTimer();
}
-/// 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) {
+/// 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) {
if (!MMI)
return 0;
@@ -2216,9 +2217,7 @@ MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) {
if (TimePassesIsEnabled)
DebugTimer->stopTimer();
- MCSymbol *Label = getDWLabel("label", ID);
- Asm->OutStreamer.EmitLabel(Label);
- return Label;
+ return ID;
}
/// getOrCreateSourceID - Public version of GetOrCreateSourceID. This can be