summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-03-28 21:23:37 +0000
committerDevang Patel <dpatel@apple.com>2010-03-28 21:23:37 +0000
commit1e8ccb5f8bd48cd057cf90f2bf8982d811b599b6 (patch)
treee582f65d835f60a5976f69076a15086c6bbbefe1 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentd589593c930fee1f6c648ee735eca92417f82ba2 (diff)
downloadbcm5719-llvm-1e8ccb5f8bd48cd057cf90f2bf8982d811b599b6.tar.gz
bcm5719-llvm-1e8ccb5f8bd48cd057cf90f2bf8982d811b599b6.zip
Revert 99772.
llvm-svn: 99778
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp36
1 files changed, 3 insertions, 33 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 8861699f4bb..e2421eb0702 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -296,7 +296,7 @@ DwarfDebug::DwarfDebug(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T)
: DwarfPrinter(OS, A, T), ModuleCU(0),
AbbreviationsSet(InitAbbreviationsSetSize), Abbreviations(),
DIEValues(), SectionSourceLines(), didInitial(false), shouldEmit(false),
- CurrentFnDbgScope(0), PrevDILoc(0), DebugTimer(0) {
+ CurrentFnDbgScope(0), DebugTimer(0) {
NextStringPoolNumber = 0;
if (TimePassesIsEnabled)
DebugTimer = new Timer("Dwarf Debug Writer");
@@ -2036,49 +2036,19 @@ void DwarfDebug::collectVariableInfo() {
}
}
-/// beginScope - Process beginning of a scope.
-void DwarfDebug::beginScope(const MachineInstr *MI) {
- if (MI->getOpcode() == TargetOpcode::DBG_VALUE)
- return;
-
- DebugLoc DL = MI->getDebugLoc();
- if (DL.isUnknown())
- return;
- DILocation DILoc = MF->getDILocation(DL);
- if (!DILoc.getScope().Verify())
- return;
-
- if(DILoc.getNode() == PrevDILoc)
- return;
-
+/// beginScope - Process beginning of a scope starting at Label.
+void DwarfDebug::beginScope(const MachineInstr *MI, MCSymbol *Label) {
InsnToDbgScopeMapTy::iterator I = DbgScopeBeginMap.find(MI);
if (I == DbgScopeBeginMap.end())
return;
-
- MCSymbol *Label = recordSourceLine(DILoc.getLineNumber(),
- DILoc.getColumnNumber(),
- DILoc.getScope().getNode());
-
ScopeVector &SD = I->second;
for (ScopeVector::iterator SDI = SD.begin(), SDE = SD.end();
SDI != SDE; ++SDI)
(*SDI)->setStartLabel(Label);
-
- PrevDILoc = DILoc.getNode();
}
/// endScope - Process end of a scope.
void DwarfDebug::endScope(const MachineInstr *MI) {
- if (MI->getOpcode() == TargetOpcode::DBG_VALUE)
- return;
-
- DebugLoc DL = MI->getDebugLoc();
- if (DL.isUnknown())
- return;
- DILocation DILoc = MF->getDILocation(DL);
- if (!DILoc.getScope().Verify())
- return;
-
InsnToDbgScopeMapTy::iterator I = DbgScopeEndMap.find(MI);
if (I == DbgScopeEndMap.end())
return;
OpenPOWER on IntegriCloud