class Module;
class MDNode;
class MCAsmInfo;
-class MCSymbol;
class raw_ostream;
class Instruction;
class DICompileUnit;
///
void EndFunction(const MachineFunction *MF);
- /// RecordSourceLine - Register a source line with debug info. Returns the
- /// unique label that was emitted and which provides correspondence to
+ /// RecordSourceLine - Register a source line with debug info. Returns a
+ /// unique label ID used to generate a label and provide correspondence to
/// the source line list.
- MCSymbol *RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
+ unsigned RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
/// getRecordSourceLineCount - Count source lines.
unsigned getRecordSourceLineCount();
/// be emitted.
bool ShouldEmitDwarfDebug() const;
- void BeginScope(const MachineInstr *MI, MCSymbol *Label);
+ void BeginScope(const MachineInstr *MI, unsigned Label);
void EndScope(const MachineInstr *MI);
};
// After printing instruction
DW->EndScope(MI);
} else if (CurDLT.getNode() != PrevDLT) {
- MCSymbol *L = DW->RecordSourceLine(CurDLT.getLineNumber(),
- CurDLT.getColumnNumber(),
- CurDLT.getScope().getNode());
+ unsigned L = DW->RecordSourceLine(CurDLT.getLineNumber(),
+ CurDLT.getColumnNumber(),
+ CurDLT.getScope().getNode());
+ printLabel(L);
DW->BeginScope(MI, L);
PrevDLT = CurDLT.getNode();
}
}
/// 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.
Col = DLT.getColumnNumber();
}
- recordSourceLine(Line, Col, DLT.getScope().getNode());
+ Asm->printLabel(recordSourceLine(Line, Col, DLT.getScope().getNode()));
}
if (TimePassesIsEnabled)
DebugTimer->stopTimer();
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;
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
///
void endFunction(const MachineFunction *MF);
- /// 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 *recordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
+ /// 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 recordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
/// getSourceLineCount - Return the number of source lines in the debug
/// info.
void collectVariableInfo();
/// beginScope - Process beginning of a scope starting at Label.
- void beginScope(const MachineInstr *MI, MCSymbol *Label);
+ void beginScope(const MachineInstr *MI, unsigned Label);
/// endScope - Prcess end of a scope.
void endScope(const MachineInstr *MI);
MMI->EndFunction();
}
-/// 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 *DwarfWriter::RecordSourceLine(unsigned Line, unsigned Col,
- MDNode *Scope) {
+/// 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 DwarfWriter::RecordSourceLine(unsigned Line, unsigned Col,
+ MDNode *Scope) {
return DD->recordSourceLine(Line, Col, Scope);
}
return DD && DD->ShouldEmitDwarfDebug();
}
-void DwarfWriter::BeginScope(const MachineInstr *MI, MCSymbol *L) {
+void DwarfWriter::BeginScope(const MachineInstr *MI, unsigned L) {
DD->beginScope(MI, L);
}
void DwarfWriter::EndScope(const MachineInstr *MI) {