mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 23:29:22 +00:00
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
This commit is contained in:
parent
75096077d4
commit
7a986ec4de
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user