mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-06 05:06:45 +00:00
Ignore variable if scope info is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86753 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6b41aba7ce
commit
fb0ee43438
@ -1453,7 +1453,8 @@ DIE *DwarfDebug::UpdateSubprogramScopeDIE(MDNode *SPNode) {
|
||||
DIGlobalVariable GV(N);
|
||||
if (GV.getContext().getNode() == SPNode) {
|
||||
DIE *ScopedGVDie = CreateGlobalVariableDIE(ModuleCU, GV);
|
||||
SPDie->AddChild(ScopedGVDie);
|
||||
if (ScopedGVDie)
|
||||
SPDie->AddChild(ScopedGVDie);
|
||||
}
|
||||
}
|
||||
return SPDie;
|
||||
@ -2076,7 +2077,9 @@ void DwarfDebug::CollectVariableInfo() {
|
||||
ConcreteScopes.lookup(ScopeLoc.getOrigLocation().getNode());
|
||||
if (!Scope)
|
||||
Scope = DbgScopeMap.lookup(ScopeLoc.getScope().getNode());
|
||||
assert (Scope && "Unable to find variable scope!");
|
||||
// If variable scope is not found then skip this variable.
|
||||
if (!Scope)
|
||||
continue;
|
||||
|
||||
DbgVariable *RegVar = new DbgVariable(DV, VP.first);
|
||||
Scope->AddVariable(RegVar);
|
||||
|
Loading…
Reference in New Issue
Block a user