forked from OSchip/llvm-project
Use MDNode * directly as an RecordSourceLine() argument.
llvm-svn: 83182
This commit is contained in:
parent
5c13c2d392
commit
3256c751f5
|
@ -85,7 +85,7 @@ public:
|
||||||
/// RecordSourceLine - Register a source line with debug info. Returns a
|
/// RecordSourceLine - Register a source line with debug info. Returns a
|
||||||
/// unique label ID used to generate a label and provide correspondence to
|
/// unique label ID used to generate a label and provide correspondence to
|
||||||
/// the source line list.
|
/// the source line list.
|
||||||
unsigned RecordSourceLine(unsigned Line, unsigned Col, DICompileUnit CU);
|
unsigned RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
|
||||||
|
|
||||||
/// RecordRegionStart - Indicate the start of a region.
|
/// RecordRegionStart - Indicate the start of a region.
|
||||||
unsigned RecordRegionStart(MDNode *N);
|
unsigned RecordRegionStart(MDNode *N);
|
||||||
|
|
|
@ -1356,8 +1356,8 @@ void AsmPrinter::processDebugLoc(DebugLoc DL) {
|
||||||
DebugLocTuple CurDLT = MF->getDebugLocTuple(DL);
|
DebugLocTuple CurDLT = MF->getDebugLocTuple(DL);
|
||||||
|
|
||||||
if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) {
|
if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) {
|
||||||
printLabel(DW->RecordSourceLine(CurDLT.Line, CurDLT.Col,
|
printLabel(DW->RecordSourceLine(CurDLT.Line, CurDLT.Col,
|
||||||
DICompileUnit(CurDLT.CompileUnit)));
|
CurDLT.CompileUnit));
|
||||||
O << '\n';
|
O << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1731,8 +1731,7 @@ void DwarfDebug::BeginFunction(MachineFunction *MF) {
|
||||||
DebugLoc FDL = MF->getDefaultDebugLoc();
|
DebugLoc FDL = MF->getDefaultDebugLoc();
|
||||||
if (!FDL.isUnknown()) {
|
if (!FDL.isUnknown()) {
|
||||||
DebugLocTuple DLT = MF->getDebugLocTuple(FDL);
|
DebugLocTuple DLT = MF->getDebugLocTuple(FDL);
|
||||||
unsigned LabelID = RecordSourceLine(DLT.Line, DLT.Col,
|
unsigned LabelID = RecordSourceLine(DLT.Line, DLT.Col, DLT.CompileUnit);
|
||||||
DICompileUnit(DLT.CompileUnit));
|
|
||||||
Asm->printLabel(LabelID);
|
Asm->printLabel(LabelID);
|
||||||
O << '\n';
|
O << '\n';
|
||||||
}
|
}
|
||||||
|
@ -1825,14 +1824,15 @@ unsigned DwarfDebug::RecordSourceLine(Value *V, unsigned Line, unsigned Col) {
|
||||||
/// RecordSourceLine - Records location information and associates it with a
|
/// RecordSourceLine - Records location information and associates it with a
|
||||||
/// label. Returns a unique label ID used to generate a label and provide
|
/// label. Returns a unique label ID used to generate a label and provide
|
||||||
/// correspondence to the source line list.
|
/// correspondence to the source line list.
|
||||||
unsigned DwarfDebug::RecordSourceLine(unsigned Line, unsigned Col,
|
unsigned DwarfDebug::RecordSourceLine(unsigned Line, unsigned Col,
|
||||||
DICompileUnit CU) {
|
MDNode *Scope) {
|
||||||
if (!MMI)
|
if (!MMI)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (TimePassesIsEnabled)
|
if (TimePassesIsEnabled)
|
||||||
DebugTimer->startTimer();
|
DebugTimer->startTimer();
|
||||||
|
|
||||||
|
DICompileUnit CU(Scope);
|
||||||
unsigned Src = GetOrCreateSourceID(CU.getDirectory(),
|
unsigned Src = GetOrCreateSourceID(CU.getDirectory(),
|
||||||
CU.getFilename());
|
CU.getFilename());
|
||||||
unsigned ID = MMI->NextLabelID();
|
unsigned ID = MMI->NextLabelID();
|
||||||
|
|
|
@ -510,7 +510,7 @@ public:
|
||||||
/// RecordSourceLine - Records location information and associates it with a
|
/// RecordSourceLine - Records location information and associates it with a
|
||||||
/// label. Returns a unique label ID used to generate a label and provide
|
/// label. Returns a unique label ID used to generate a label and provide
|
||||||
/// correspondence to the source line list.
|
/// correspondence to the source line list.
|
||||||
unsigned RecordSourceLine(unsigned Line, unsigned Col, DICompileUnit CU);
|
unsigned RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
|
||||||
|
|
||||||
/// getRecordSourceLineCount - Return the number of source lines in the debug
|
/// getRecordSourceLineCount - Return the number of source lines in the debug
|
||||||
/// info.
|
/// info.
|
||||||
|
|
|
@ -77,8 +77,8 @@ void DwarfWriter::EndFunction(MachineFunction *MF) {
|
||||||
/// label. Returns a unique label ID used to generate a label and provide
|
/// label. Returns a unique label ID used to generate a label and provide
|
||||||
/// correspondence to the source line list.
|
/// correspondence to the source line list.
|
||||||
unsigned DwarfWriter::RecordSourceLine(unsigned Line, unsigned Col,
|
unsigned DwarfWriter::RecordSourceLine(unsigned Line, unsigned Col,
|
||||||
DICompileUnit CU) {
|
MDNode *Scope) {
|
||||||
return DD->RecordSourceLine(Line, Col, CU);
|
return DD->RecordSourceLine(Line, Col, Scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// RecordRegionStart - Indicate the start of a region.
|
/// RecordRegionStart - Indicate the start of a region.
|
||||||
|
|
|
@ -1598,7 +1598,6 @@ SDValue SelectionDAGLegalize::ExpandDBG_STOPPOINT(SDNode* Node) {
|
||||||
const DbgStopPointSDNode *DSP = cast<DbgStopPointSDNode>(Node);
|
const DbgStopPointSDNode *DSP = cast<DbgStopPointSDNode>(Node);
|
||||||
MDNode *CU_Node = DSP->getCompileUnit();
|
MDNode *CU_Node = DSP->getCompileUnit();
|
||||||
if (DW && (useDEBUG_LOC || useLABEL)) {
|
if (DW && (useDEBUG_LOC || useLABEL)) {
|
||||||
DICompileUnit CU(CU_Node);
|
|
||||||
|
|
||||||
unsigned Line = DSP->getLine();
|
unsigned Line = DSP->getLine();
|
||||||
unsigned Col = DSP->getColumn();
|
unsigned Col = DSP->getColumn();
|
||||||
|
@ -1610,9 +1609,9 @@ SDValue SelectionDAGLegalize::ExpandDBG_STOPPOINT(SDNode* Node) {
|
||||||
return DAG.getNode(ISD::DEBUG_LOC, dl, MVT::Other, Node->getOperand(0),
|
return DAG.getNode(ISD::DEBUG_LOC, dl, MVT::Other, Node->getOperand(0),
|
||||||
DAG.getConstant(Line, MVT::i32),
|
DAG.getConstant(Line, MVT::i32),
|
||||||
DAG.getConstant(Col, MVT::i32),
|
DAG.getConstant(Col, MVT::i32),
|
||||||
DAG.getSrcValue(CU.getNode()));
|
DAG.getSrcValue(CU_Node));
|
||||||
} else {
|
} else {
|
||||||
unsigned ID = DW->RecordSourceLine(Line, Col, CU);
|
unsigned ID = DW->RecordSourceLine(Line, Col, CU_Node);
|
||||||
return DAG.getLabel(ISD::DBG_LABEL, dl, Node->getOperand(0), ID);
|
return DAG.getLabel(ISD::DBG_LABEL, dl, Node->getOperand(0), ID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue