diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 1bb8f26ae01..46640f85f42 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 a3b0242fd5f..165eb5a2da0 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