mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-03 00:33:09 +00:00
Revert r100117.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8ef3acba00
commit
c8e77640a5
@ -2147,8 +2147,6 @@ bool DwarfDebug::extractScopeInformation() {
|
|||||||
|
|
||||||
DenseMap<const MachineInstr *, unsigned> MIIndexMap;
|
DenseMap<const MachineInstr *, unsigned> MIIndexMap;
|
||||||
unsigned MIIndex = 0;
|
unsigned MIIndex = 0;
|
||||||
MDNode *PrevScope = NULL;
|
|
||||||
MDNode *PrevInlinedAt = NULL;
|
|
||||||
// Scan each instruction and create scopes. First build working set of scopes.
|
// Scan each instruction and create scopes. First build working set of scopes.
|
||||||
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
|
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
@ -2162,23 +2160,17 @@ bool DwarfDebug::extractScopeInformation() {
|
|||||||
if (DL.isUnknown()) continue;
|
if (DL.isUnknown()) continue;
|
||||||
DILocation DLT = MF->getDILocation(DL);
|
DILocation DLT = MF->getDILocation(DL);
|
||||||
DIScope DLTScope = DLT.getScope();
|
DIScope DLTScope = DLT.getScope();
|
||||||
MDNode *NewScope = DLTScope.getNode();
|
if (!DLTScope.getNode()) continue;
|
||||||
if (!NewScope) continue;
|
|
||||||
// There is no need to create another DIE for compile unit. For all
|
// There is no need to create another DIE for compile unit. For all
|
||||||
// other scopes, create one DbgScope now. This will be translated
|
// other scopes, create one DbgScope now. This will be translated
|
||||||
// into a scope DIE at the end.
|
// into a scope DIE at the end.
|
||||||
if (DLTScope.isCompileUnit()) continue;
|
if (DLTScope.isCompileUnit()) continue;
|
||||||
MDNode *NewInlinedAt = DLT.getOrigLocation().getNode();
|
createDbgScope(DLTScope.getNode(), DLT.getOrigLocation().getNode());
|
||||||
if (NewScope == PrevScope && NewInlinedAt == PrevInlinedAt) continue;
|
|
||||||
createDbgScope(NewScope, NewInlinedAt);
|
|
||||||
PrevScope = NewScope;
|
|
||||||
PrevInlinedAt = NewInlinedAt;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Build scope hierarchy using working set of scopes.
|
// Build scope hierarchy using working set of scopes.
|
||||||
PrevScope = NULL;
|
|
||||||
PrevInlinedAt = NULL;
|
|
||||||
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
|
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
||||||
@ -2190,18 +2182,14 @@ bool DwarfDebug::extractScopeInformation() {
|
|||||||
if (DL.isUnknown()) continue;
|
if (DL.isUnknown()) continue;
|
||||||
DILocation DLT = MF->getDILocation(DL);
|
DILocation DLT = MF->getDILocation(DL);
|
||||||
DIScope DLTScope = DLT.getScope();
|
DIScope DLTScope = DLT.getScope();
|
||||||
MDNode *NewScope = DLTScope.getNode();
|
if (!DLTScope.getNode()) continue;
|
||||||
if (!NewScope) continue;
|
|
||||||
// There is no need to create another DIE for compile unit. For all
|
// There is no need to create another DIE for compile unit. For all
|
||||||
// other scopes, create one DbgScope now. This will be translated
|
// other scopes, create one DbgScope now. This will be translated
|
||||||
// into a scope DIE at the end.
|
// into a scope DIE at the end.
|
||||||
if (DLTScope.isCompileUnit()) continue;
|
if (DLTScope.isCompileUnit()) continue;
|
||||||
MDNode *NewInlinedAt = DLT.getOrigLocation().getNode();
|
DbgScope *Scope = getUpdatedDbgScope(DLTScope.getNode(), MInsn,
|
||||||
if (NewScope == PrevScope && NewInlinedAt == PrevInlinedAt) continue;
|
DLT.getOrigLocation().getNode());
|
||||||
DbgScope *Scope = getUpdatedDbgScope(NewScope, MInsn, NewInlinedAt);
|
|
||||||
Scope->setLastInsn(MInsn);
|
Scope->setLastInsn(MInsn);
|
||||||
PrevScope = NewScope;
|
|
||||||
PrevInlinedAt = NewInlinedAt;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user