[llvm-commits] [llvm] r84054 - in /llvm/trunk: include/llvm/Support/DebugLoc.h lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/DwarfDebug.cpp lib/CodeGen/MachineInstr.cpp lib/CodeGen/SelectionDAG/FastISel.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/ExecutionEngine/JIT/JITEmitter.cpp lib/Target/PIC16/PIC16DebugInfo.cpp
Devang Patel
dpatel at apple.com
Tue Oct 13 16:28:54 PDT 2009
Author: dpatel
Date: Tue Oct 13 18:28:53 2009
New Revision: 84054
URL: http://llvm.org/viewvc/llvm-project?rev=84054&view=rev
Log:
s/DebugLoc.CompileUnit/DebugLoc.Scope/g
s/DebugLoc.InlinedLoc/DebugLoc.InlinedAtLoc/g
Modified:
llvm/trunk/include/llvm/Support/DebugLoc.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/MachineInstr.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp
Modified: llvm/trunk/include/llvm/Support/DebugLoc.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DebugLoc.h?rev=84054&r1=84053&r2=84054&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/DebugLoc.h (original)
+++ llvm/trunk/include/llvm/Support/DebugLoc.h Tue Oct 13 18:28:53 2009
@@ -24,19 +24,19 @@
/// DebugLocTuple - Debug location tuple of filename id, line and column.
///
struct DebugLocTuple {
- MDNode *CompileUnit;
- MDNode *InlinedLoc;
+ MDNode *Scope;
+ MDNode *InlinedAtLoc;
unsigned Line, Col;
DebugLocTuple()
- : CompileUnit(0), InlinedLoc(0), Line(~0U), Col(~0U) {};
+ : Scope(0), InlinedAtLoc(0), Line(~0U), Col(~0U) {};
DebugLocTuple(MDNode *n, MDNode *i, unsigned l, unsigned c)
- : CompileUnit(n), InlinedLoc(i), Line(l), Col(c) {};
+ : Scope(n), InlinedAtLoc(i), Line(l), Col(c) {};
bool operator==(const DebugLocTuple &DLT) const {
- return CompileUnit == DLT.CompileUnit &&
- InlinedLoc == DLT.InlinedLoc &&
+ return Scope == DLT.Scope &&
+ InlinedAtLoc == DLT.InlinedAtLoc &&
Line == DLT.Line && Col == DLT.Col;
}
bool operator!=(const DebugLocTuple &DLT) const {
@@ -74,16 +74,16 @@
return DebugLocTuple((MDNode*)~1U, (MDNode*)~1U, ~1U, ~1U);
}
static unsigned getHashValue(const DebugLocTuple &Val) {
- return DenseMapInfo<MDNode*>::getHashValue(Val.CompileUnit) ^
- DenseMapInfo<MDNode*>::getHashValue(Val.InlinedLoc) ^
+ return DenseMapInfo<MDNode*>::getHashValue(Val.Scope) ^
+ DenseMapInfo<MDNode*>::getHashValue(Val.InlinedAtLoc) ^
DenseMapInfo<unsigned>::getHashValue(Val.Line) ^
DenseMapInfo<unsigned>::getHashValue(Val.Col);
}
static bool isEqual(const DebugLocTuple &LHS, const DebugLocTuple &RHS) {
- return LHS.CompileUnit == RHS.CompileUnit &&
- LHS.InlinedLoc == RHS.InlinedLoc &&
- LHS.Line == RHS.Line &&
- LHS.Col == RHS.Col;
+ return LHS.Scope == RHS.Scope &&
+ LHS.InlinedAtLoc == RHS.InlinedAtLoc &&
+ LHS.Line == RHS.Line &&
+ LHS.Col == RHS.Col;
}
static bool isPod() { return true; }
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=84054&r1=84053&r2=84054&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Oct 13 18:28:53 2009
@@ -1362,9 +1362,9 @@
if (!DL.isUnknown()) {
DebugLocTuple CurDLT = MF->getDebugLocTuple(DL);
if (BeforePrintingInsn) {
- if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) {
+ if (CurDLT.Scope != 0 && PrevDLT != CurDLT) {
unsigned L = DW->RecordSourceLine(CurDLT.Line, CurDLT.Col,
- CurDLT.CompileUnit);
+ CurDLT.Scope);
printLabel(L);
#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
DW->SetDbgScopeBeginLabels(MI, L);
@@ -1773,9 +1773,10 @@
// Print source line info.
O.PadToColumn(MAI->getCommentColumn());
O << MAI->getCommentString() << " SrcLine ";
- if (DLT.CompileUnit) {
- DICompileUnit CU(DLT.CompileUnit);
- O << CU.getFilename() << " ";
+ if (DLT.Scope) {
+ DICompileUnit CU(DLT.Scope);
+ if (!CU.isNull())
+ O << CU.getFilename() << " ";
}
O << DLT.Line;
if (DLT.Col != 0)
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=84054&r1=84053&r2=84054&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Oct 13 18:28:53 2009
@@ -1842,14 +1842,14 @@
if (DL.isUnknown())
continue;
DebugLocTuple DLT = MF->getDebugLocTuple(DL);
- if (!DLT.CompileUnit)
+ if (!DLT.Scope)
continue;
// There is no need to create another DIE for compile unit. For all
// other scopes, create one DbgScope now. This will be translated
// into a scope DIE at the end.
- DIDescriptor D(DLT.CompileUnit);
+ DIDescriptor D(DLT.Scope);
if (!D.isCompileUnit()) {
- DbgScope *Scope = getDbgScope(DLT.CompileUnit, MInsn);
+ DbgScope *Scope = getDbgScope(DLT.Scope, MInsn);
Scope->setLastInsn(MInsn);
}
}
@@ -1942,11 +1942,11 @@
if (!FDL.isUnknown()) {
DebugLocTuple DLT = MF->getDebugLocTuple(FDL);
unsigned LabelID = 0;
- DISubprogram SP = getDISubprogram(DLT.CompileUnit);
+ DISubprogram SP = getDISubprogram(DLT.Scope);
if (!SP.isNull())
- LabelID = RecordSourceLine(SP.getLineNumber(), 0, DLT.CompileUnit);
+ LabelID = RecordSourceLine(SP.getLineNumber(), 0, DLT.Scope);
else
- LabelID = RecordSourceLine(DLT.Line, DLT.Col, DLT.CompileUnit);
+ LabelID = RecordSourceLine(DLT.Line, DLT.Col, DLT.Scope);
Asm->printLabel(LabelID);
O << '\n';
}
@@ -1954,7 +1954,7 @@
DebugLoc FDL = MF->getDefaultDebugLoc();
if (!FDL.isUnknown()) {
DebugLocTuple DLT = MF->getDebugLocTuple(FDL);
- unsigned LabelID = RecordSourceLine(DLT.Line, DLT.Col, DLT.CompileUnit);
+ unsigned LabelID = RecordSourceLine(DLT.Line, DLT.Col, DLT.Scope);
Asm->printLabel(LabelID);
O << '\n';
}
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=84054&r1=84053&r2=84054&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Oct 13 18:28:53 2009
@@ -1082,11 +1082,12 @@
if (!debugLoc.isUnknown()) {
const MachineFunction *MF = getParent()->getParent();
DebugLocTuple DLT = MF->getDebugLocTuple(debugLoc);
- DICompileUnit CU(DLT.CompileUnit);
- OS << " [dbg: "
- << CU.getDirectory() << '/' << CU.getFilename() << ","
- << DLT.Line << ","
- << DLT.Col << "]";
+ DICompileUnit CU(DLT.Scope);
+ if (!CU.isNull())
+ OS << " [dbg: "
+ << CU.getDirectory() << '/' << CU.getFilename() << ","
+ << DLT.Line << ","
+ << DLT.Col << "]";
}
OS << "\n";
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=84054&r1=84053&r2=84054&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Oct 13 18:28:53 2009
@@ -385,10 +385,9 @@
DebugLocTuple PrevLocTpl = MF.getDebugLocTuple(PrevLoc);
DISubprogram SP(FSI->getSubprogram());
- unsigned LabelID = DW->RecordInlinedFnStart(SP,
- DICompileUnit(PrevLocTpl.CompileUnit),
- PrevLocTpl.Line,
- PrevLocTpl.Col);
+ unsigned LabelID =
+ DW->RecordInlinedFnStart(SP,DICompileUnit(PrevLocTpl.Scope),
+ PrevLocTpl.Line, PrevLocTpl.Col);
const TargetInstrDesc &II = TII.get(TargetInstrInfo::DBG_LABEL);
BuildMI(MBB, DL, II).addImm(LabelID);
return true;
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=84054&r1=84053&r2=84054&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Tue Oct 13 18:28:53 2009
@@ -3910,7 +3910,7 @@
return 0;
DebugLocTuple PrevLocTpl = MF.getDebugLocTuple(PrevLoc);
DISubprogram SP(FSI.getSubprogram());
- DICompileUnit CU(PrevLocTpl.CompileUnit);
+ DICompileUnit CU(PrevLocTpl.Scope);
unsigned LabelID = DW->RecordInlinedFnStart(SP, CU,
PrevLocTpl.Line,
PrevLocTpl.Col);
Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=84054&r1=84053&r2=84054&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Tue Oct 13 18:28:53 2009
@@ -710,7 +710,7 @@
DebugLocTuple CurDLT = EmissionDetails.MF->getDebugLocTuple(DL);
if (BeforePrintingInsn) {
- if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT) {
+ if (CurDLT.Scope != 0 && PrevDLT != CurDLT) {
JITEvent_EmittedFunctionDetails::LineStart NextLine;
NextLine.Address = getCurrentPCValue();
NextLine.Loc = DL;
Modified: llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp?rev=84054&r1=84053&r2=84054&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16DebugInfo.cpp Tue Oct 13 18:28:53 2009
@@ -258,7 +258,7 @@
if (! EmitDebugDirectives) return;
assert (! DL.isUnknown() && "can't change to invalid debug loc");
- MDNode *CU = MF.getDebugLocTuple(DL).CompileUnit;
+ MDNode *CU = MF.getDebugLocTuple(DL).Scope;
unsigned line = MF.getDebugLocTuple(DL).Line;
SwitchToCU(CU);
More information about the llvm-commits
mailing list