summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-06-05 01:30:50 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-06-05 01:30:50 +0000
commit7a986ec4ded2597ff42ad21f87ff91b194fdb98d (patch)
tree50324b8f983d0964444523060aa2b6048237d395 /lib
parent75096077d49c50478e8f252e41432387030a5fe5 (diff)
downloadllvm-7a986ec4ded2597ff42ad21f87ff91b194fdb98d.tar.gz
llvm-7a986ec4ded2597ff42ad21f87ff91b194fdb98d.tar.bz2
llvm-7a986ec4ded2597ff42ad21f87ff91b194fdb98d.tar.xz
DebugInfo: Reuse existing LexicalScope to retrieve the scope's MDNode, rather than looking it up through the DebugLoc.
No functional change intended, just streamlines the abstract variable lookup/construction to use a common entry point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h1
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 1bb8f26ae0..46640f85f4 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1047,11 +1047,6 @@ void DwarfDebug::endModule() {
}
// Find abstract variable, if any, associated with Var.
-DbgVariable *DwarfDebug::findAbstractVariable(DIVariable &DV,
- DebugLoc ScopeLoc) {
- return findAbstractVariable(DV, ScopeLoc.getScope(DV->getContext()));
-}
-
DbgVariable *DwarfDebug::getExistingAbstractVariable(DIVariable &DV,
DIVariable &Cleansed) {
LLVMContext &Ctx = DV->getContext();
@@ -1131,7 +1126,8 @@ void DwarfDebug::collectVariableInfoFromMMITable(
if (!Scope)
continue;
- DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VI.Loc);
+ DbgVariable *AbsDbgVariable =
+ findAbstractVariable(DV, Scope->getScopeNode());
DbgVariable *RegVar = new DbgVariable(DV, AbsDbgVariable, this);
RegVar->setFrameIndex(VI.Slot);
addScopeVariable(Scope, RegVar);
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index a3b0242fd5..165eb5a2da 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -348,7 +348,6 @@ class DwarfDebug : public AsmPrinterHandler {
DbgVariable *createAbstractVariable(DIVariable &DV, LexicalScope *Scope);
DbgVariable *getOrCreateAbstractVariable(DIVariable &Var,
const MDNode *Scope);
- DbgVariable *findAbstractVariable(DIVariable &Var, DebugLoc Loc);
DbgVariable *findAbstractVariable(DIVariable &Var, const MDNode *Scope);
/// \brief Find DIE for the given subprogram and attach appropriate