aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-09-30 22:51:28 +0000
committerDevang Patel <dpatel@apple.com>2009-09-30 22:51:28 +0000
commit4d23d84af58fc21b50dce528a8a26a30a62db355 (patch)
tree4787dcf46ccfbfea1d6510be6a8ff64985330962
parent16030402039c222229fe0e64cbc8307964480e31 (diff)
downloadexternal_llvm-4d23d84af58fc21b50dce528a8a26a30a62db355.zip
external_llvm-4d23d84af58fc21b50dce528a8a26a30a62db355.tar.gz
external_llvm-4d23d84af58fc21b50dce528a8a26a30a62db355.tar.bz2
Use MDNode * directly as an RecordSourceLine() argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83182 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/DwarfWriter.h2
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h2
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfWriter.cpp4
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp5
6 files changed, 12 insertions, 13 deletions
diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h
index 3635c4d..46be8d2 100644
--- a/include/llvm/CodeGen/DwarfWriter.h
+++ b/include/llvm/CodeGen/DwarfWriter.h
@@ -85,7 +85,7 @@ public:
/// 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.
- unsigned RecordSourceLine(unsigned Line, unsigned Col, DICompileUnit CU);
+ unsigned RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
/// RecordRegionStart - Indicate the start of a region.
unsigned RecordRegionStart(MDNode *N);
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 14dc898..c84019b 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1356,8 +1356,8 @@ void AsmPrinter::processDebugLoc(DebugLoc DL) {
DebugLocTuple CurDLT = MF->getDebugLocTuple(DL);
if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) {
- printLabel(DW->RecordSourceLine(CurDLT.Line, CurDLT.Col,
- DICompileUnit(CurDLT.CompileUnit)));
+ printLabel(DW->RecordSourceLine(CurDLT.Line, CurDLT.Col,
+ CurDLT.CompileUnit));
O << '\n';
}
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 8a74a8e..549644a 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1731,8 +1731,7 @@ void DwarfDebug::BeginFunction(MachineFunction *MF) {
DebugLoc FDL = MF->getDefaultDebugLoc();
if (!FDL.isUnknown()) {
DebugLocTuple DLT = MF->getDebugLocTuple(FDL);
- unsigned LabelID = RecordSourceLine(DLT.Line, DLT.Col,
- DICompileUnit(DLT.CompileUnit));
+ unsigned LabelID = RecordSourceLine(DLT.Line, DLT.Col, DLT.CompileUnit);
Asm->printLabel(LabelID);
O << '\n';
}
@@ -1825,14 +1824,15 @@ unsigned DwarfDebug::RecordSourceLine(Value *V, unsigned Line, unsigned Col) {
/// 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,
- DICompileUnit CU) {
+unsigned DwarfDebug::RecordSourceLine(unsigned Line, unsigned Col,
+ MDNode *Scope) {
if (!MMI)
return 0;
if (TimePassesIsEnabled)
DebugTimer->startTimer();
+ DICompileUnit CU(Scope);
unsigned Src = GetOrCreateSourceID(CU.getDirectory(),
CU.getFilename());
unsigned ID = MMI->NextLabelID();
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 8899529..47e17df 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -510,7 +510,7 @@ public:
/// 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, DICompileUnit CU);
+ unsigned RecordSourceLine(unsigned Line, unsigned Col, MDNode *Scope);
/// getRecordSourceLineCount - Return the number of source lines in the debug
/// info.
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index fed9668..bebf8e0 100644
--- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -77,8 +77,8 @@ void DwarfWriter::EndFunction(MachineFunction *MF) {
/// 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,
- DICompileUnit CU) {
- return DD->RecordSourceLine(Line, Col, CU);
+ MDNode *Scope) {
+ return DD->RecordSourceLine(Line, Col, Scope);
}
/// RecordRegionStart - Indicate the start of a region.
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 4ed83db..fc01b07 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1598,7 +1598,6 @@ SDValue SelectionDAGLegalize::ExpandDBG_STOPPOINT(SDNode* Node) {
const DbgStopPointSDNode *DSP = cast<DbgStopPointSDNode>(Node);
MDNode *CU_Node = DSP->getCompileUnit();
if (DW && (useDEBUG_LOC || useLABEL)) {
- DICompileUnit CU(CU_Node);
unsigned Line = DSP->getLine();
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),
DAG.getConstant(Line, MVT::i32),
DAG.getConstant(Col, MVT::i32),
- DAG.getSrcValue(CU.getNode()));
+ DAG.getSrcValue(CU_Node));
} 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);
}
}