diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-06-05 01:30:50 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-06-05 01:30:50 +0000 |
commit | 367fb01d70300b07ea689c3ac622013f2f9ee416 (patch) | |
tree | 19433325b21da08c16968939af41831b10e4c6c7 /llvm/lib/CodeGen | |
parent | 087e7203a971c905f0fd74b4e17f27f04def2b18 (diff) | |
download | bcm5719-llvm-367fb01d70300b07ea689c3ac622013f2f9ee416.tar.gz bcm5719-llvm-367fb01d70300b07ea689c3ac622013f2f9ee416.zip |
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.
llvm-svn: 210234
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 1 |
2 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 1bb8f26ae01..46640f85f42 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index a3b0242fd5f..165eb5a2da0 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/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 |