mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +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.
|
// 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,
|
DbgVariable *DwarfDebug::getExistingAbstractVariable(DIVariable &DV,
|
||||||
DIVariable &Cleansed) {
|
DIVariable &Cleansed) {
|
||||||
LLVMContext &Ctx = DV->getContext();
|
LLVMContext &Ctx = DV->getContext();
|
||||||
@ -1131,7 +1126,8 @@ void DwarfDebug::collectVariableInfoFromMMITable(
|
|||||||
if (!Scope)
|
if (!Scope)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VI.Loc);
|
DbgVariable *AbsDbgVariable =
|
||||||
|
findAbstractVariable(DV, Scope->getScopeNode());
|
||||||
DbgVariable *RegVar = new DbgVariable(DV, AbsDbgVariable, this);
|
DbgVariable *RegVar = new DbgVariable(DV, AbsDbgVariable, this);
|
||||||
RegVar->setFrameIndex(VI.Slot);
|
RegVar->setFrameIndex(VI.Slot);
|
||||||
addScopeVariable(Scope, RegVar);
|
addScopeVariable(Scope, RegVar);
|
||||||
|
@ -348,7 +348,6 @@ class DwarfDebug : public AsmPrinterHandler {
|
|||||||
DbgVariable *createAbstractVariable(DIVariable &DV, LexicalScope *Scope);
|
DbgVariable *createAbstractVariable(DIVariable &DV, LexicalScope *Scope);
|
||||||
DbgVariable *getOrCreateAbstractVariable(DIVariable &Var,
|
DbgVariable *getOrCreateAbstractVariable(DIVariable &Var,
|
||||||
const MDNode *Scope);
|
const MDNode *Scope);
|
||||||
DbgVariable *findAbstractVariable(DIVariable &Var, DebugLoc Loc);
|
|
||||||
DbgVariable *findAbstractVariable(DIVariable &Var, const MDNode *Scope);
|
DbgVariable *findAbstractVariable(DIVariable &Var, const MDNode *Scope);
|
||||||
|
|
||||||
/// \brief Find DIE for the given subprogram and attach appropriate
|
/// \brief Find DIE for the given subprogram and attach appropriate
|
||||||
|
Loading…
Reference in New Issue
Block a user