mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Store compile unit corresponding to each chain of inlined debug info entries. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187792 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -366,19 +366,18 @@ void DWARFDebugInfoEntryMinimal::getCallerFrame(const DWARFCompileUnit *CU,
|
||||
CallColumn = getAttributeValueAsUnsigned(CU, DW_AT_call_column, 0);
|
||||
}
|
||||
|
||||
DWARFDebugInfoEntryMinimal::InlinedChain
|
||||
DWARFDebugInfoEntryInlinedChain
|
||||
DWARFDebugInfoEntryMinimal::getInlinedChainForAddress(
|
||||
const DWARFCompileUnit *CU,
|
||||
const uint64_t Address)
|
||||
const {
|
||||
DWARFDebugInfoEntryMinimal::InlinedChain InlinedChain;
|
||||
const DWARFCompileUnit *CU, const uint64_t Address) const {
|
||||
DWARFDebugInfoEntryInlinedChain InlinedChain;
|
||||
InlinedChain.CU = CU;
|
||||
if (isNULL())
|
||||
return InlinedChain;
|
||||
for (const DWARFDebugInfoEntryMinimal *DIE = this; DIE; ) {
|
||||
// Append current DIE to inlined chain only if it has correct tag
|
||||
// (e.g. it is not a lexical block).
|
||||
if (DIE->isSubroutineDIE()) {
|
||||
InlinedChain.push_back(*DIE);
|
||||
InlinedChain.DIEs.push_back(*DIE);
|
||||
}
|
||||
// Try to get child which also contains provided address.
|
||||
const DWARFDebugInfoEntryMinimal *Child = DIE->getFirstChild();
|
||||
@@ -392,6 +391,6 @@ DWARFDebugInfoEntryMinimal::getInlinedChainForAddress(
|
||||
DIE = Child;
|
||||
}
|
||||
// Reverse the obtained chain to make the root of inlined chain last.
|
||||
std::reverse(InlinedChain.begin(), InlinedChain.end());
|
||||
std::reverse(InlinedChain.DIEs.begin(), InlinedChain.DIEs.end());
|
||||
return InlinedChain;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user