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
This commit is contained in:
Eric Christopher
2010-03-09 02:36:31 +00:00
parent 19b3826d0f
commit ee6414cf04
5 changed files with 28 additions and 29 deletions

View File

@ -35,7 +35,6 @@ class Value;
class Module; class Module;
class MDNode; class MDNode;
class MCAsmInfo; class MCAsmInfo;
class MCSymbol;
class raw_ostream; class raw_ostream;
class Instruction; class Instruction;
class DICompileUnit; class DICompileUnit;
@ -83,10 +82,10 @@ public:
/// ///
void EndFunction(const MachineFunction *MF); void EndFunction(const MachineFunction *MF);
/// RecordSourceLine - Register a source line with debug info. Returns the /// RecordSourceLine - Register a source line with debug info. Returns a
/// unique label that was emitted and which provides correspondence to /// unique label ID used to generate a label and provide correspondence to
/// the source line list. /// the source line list.
MCSymbol *RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope); unsigned RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
/// getRecordSourceLineCount - Count source lines. /// getRecordSourceLineCount - Count source lines.
unsigned getRecordSourceLineCount(); unsigned getRecordSourceLineCount();
@ -95,7 +94,7 @@ public:
/// be emitted. /// be emitted.
bool ShouldEmitDwarfDebug() const; bool ShouldEmitDwarfDebug() const;
void BeginScope(const MachineInstr *MI, MCSymbol *Label); void BeginScope(const MachineInstr *MI, unsigned Label);
void EndScope(const MachineInstr *MI); void EndScope(const MachineInstr *MI);
}; };

View File

@ -1319,9 +1319,10 @@ void AsmPrinter::processDebugLoc(const MachineInstr *MI,
// After printing instruction // After printing instruction
DW->EndScope(MI); DW->EndScope(MI);
} else if (CurDLT.getNode() != PrevDLT) { } else if (CurDLT.getNode() != PrevDLT) {
MCSymbol *L = DW->RecordSourceLine(CurDLT.getLineNumber(), unsigned L = DW->RecordSourceLine(CurDLT.getLineNumber(),
CurDLT.getColumnNumber(), CurDLT.getColumnNumber(),
CurDLT.getScope().getNode()); CurDLT.getScope().getNode());
printLabel(L);
DW->BeginScope(MI, L); DW->BeginScope(MI, L);
PrevDLT = CurDLT.getNode(); PrevDLT = CurDLT.getNode();
} }

View File

@ -1948,14 +1948,14 @@ void DwarfDebug::collectVariableInfo() {
} }
/// beginScope - Process beginning of a scope starting at Label. /// 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); InsnToDbgScopeMapTy::iterator I = DbgScopeBeginMap.find(MI);
if (I == DbgScopeBeginMap.end()) if (I == DbgScopeBeginMap.end())
return; return;
ScopeVector &SD = I->second; ScopeVector &SD = I->second;
for (ScopeVector::iterator SDI = SD.begin(), SDE = SD.end(); for (ScopeVector::iterator SDI = SD.begin(), SDE = SD.end();
SDI != SDE; ++SDI) SDI != SDE; ++SDI)
(*SDI)->setStartLabel(Label); (*SDI)->setStartLabel(getDWLabel("label", Label));
} }
/// endScope - Process end of a scope. /// endScope - Process end of a scope.
@ -2124,7 +2124,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
Col = DLT.getColumnNumber(); Col = DLT.getColumnNumber();
} }
recordSourceLine(Line, Col, DLT.getScope().getNode()); Asm->printLabel(recordSourceLine(Line, Col, DLT.getScope().getNode()));
} }
if (TimePassesIsEnabled) if (TimePassesIsEnabled)
DebugTimer->stopTimer(); DebugTimer->stopTimer();
@ -2180,10 +2180,11 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
DebugTimer->stopTimer(); DebugTimer->stopTimer();
} }
/// recordSourceLine - Register a source line with debug info. Returns the /// recordSourceLine - Records location information and associates it with a
/// unique label that was emitted and which provides correspondence to /// label. Returns a unique label ID used to generate a label and provide
/// the source line list. /// correspondence to the source line list.
MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) { unsigned DwarfDebug::recordSourceLine(unsigned Line, unsigned Col,
MDNode *S) {
if (!MMI) if (!MMI)
return 0; return 0;
@ -2216,9 +2217,7 @@ MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) {
if (TimePassesIsEnabled) if (TimePassesIsEnabled)
DebugTimer->stopTimer(); DebugTimer->stopTimer();
MCSymbol *Label = getDWLabel("label", ID); return ID;
Asm->OutStreamer.EmitLabel(Label);
return Label;
} }
/// getOrCreateSourceID - Public version of GetOrCreateSourceID. This can be /// getOrCreateSourceID - Public version of GetOrCreateSourceID. This can be

View File

@ -512,10 +512,10 @@ public:
/// ///
void endFunction(const MachineFunction *MF); void endFunction(const MachineFunction *MF);
/// recordSourceLine - Register a source line with debug info. Returns the /// recordSourceLine - Records location information and associates it with a
/// unique label that was emitted and which provides correspondence to /// label. Returns a unique label ID used to generate a label and provide
/// the source line list. /// correspondence to the source line list.
MCSymbol *recordSourceLine(unsigned Line, unsigned Col, MDNode *Scope); unsigned recordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
/// getSourceLineCount - Return the number of source lines in the debug /// getSourceLineCount - Return the number of source lines in the debug
/// info. /// info.
@ -539,7 +539,7 @@ public:
void collectVariableInfo(); void collectVariableInfo();
/// beginScope - Process beginning of a scope starting at Label. /// 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. /// endScope - Prcess end of a scope.
void endScope(const MachineInstr *MI); void endScope(const MachineInstr *MI);

View File

@ -73,11 +73,11 @@ void DwarfWriter::EndFunction(const MachineFunction *MF) {
MMI->EndFunction(); MMI->EndFunction();
} }
/// RecordSourceLine - Register a source line with debug info. Returns the /// RecordSourceLine - Records location information and associates it with a
/// unique label that was emitted and which provides correspondence to /// label. Returns a unique label ID used to generate a label and provide
/// the source line list. /// correspondence to the source line list.
MCSymbol *DwarfWriter::RecordSourceLine(unsigned Line, unsigned Col, unsigned DwarfWriter::RecordSourceLine(unsigned Line, unsigned Col,
MDNode *Scope) { MDNode *Scope) {
return DD->recordSourceLine(Line, Col, Scope); return DD->recordSourceLine(Line, Col, Scope);
} }
@ -92,7 +92,7 @@ bool DwarfWriter::ShouldEmitDwarfDebug() const {
return DD && DD->ShouldEmitDwarfDebug(); return DD && DD->ShouldEmitDwarfDebug();
} }
void DwarfWriter::BeginScope(const MachineInstr *MI, MCSymbol *L) { void DwarfWriter::BeginScope(const MachineInstr *MI, unsigned L) {
DD->beginScope(MI, L); DD->beginScope(MI, L);
} }
void DwarfWriter::EndScope(const MachineInstr *MI) { void DwarfWriter::EndScope(const MachineInstr *MI) {