diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-10-09 16:50:53 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-10-09 16:50:53 +0000 |
commit | 01b48a84dc9c4a2de9335cc717ee781cbd30450d (patch) | |
tree | 652dff77a35d323b3c365ca7aa2be37c55f38c71 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 20c1c890b3ce356b01f69aed8378f2ae6bc799d3 (diff) | |
download | bcm5719-llvm-01b48a84dc9c4a2de9335cc717ee781cbd30450d.tar.gz bcm5719-llvm-01b48a84dc9c4a2de9335cc717ee781cbd30450d.zip |
Sink DwarfDebug::constructInlinedScopeDIE into DwarfCompileUnit
This introduces access to the AbstractSPDies map from DwarfDebug so
DwarfCompileUnit can access it. Eventually this'll sink down to
DwarfFile, but it'll still be generically accessible - not much
encapsulation to provide it. (constructInlinedScopeDIE could stay
further up, in DwarfFile to avoid exposing this - but I don't think
that's particularly better)
llvm-svn: 219411
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 56d29736365..c204e72cf38 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -347,37 +347,6 @@ DwarfDebug::constructLexicalScopeDIE(DwarfCompileUnit &TheCU, return ScopeDIE; } -// This scope represents inlined body of a function. Construct DIE to -// represent this concrete inlined copy of the function. -std::unique_ptr<DIE> -DwarfDebug::constructInlinedScopeDIE(DwarfCompileUnit &TheCU, - LexicalScope *Scope) { - assert(Scope->getScopeNode()); - DIScope DS(Scope->getScopeNode()); - DISubprogram InlinedSP = getDISubprogram(DS); - // Find the subprogram's DwarfCompileUnit in the SPMap in case the subprogram - // was inlined from another compile unit. - DIE *OriginDIE = AbstractSPDies[InlinedSP]; - assert(OriginDIE && "Unable to find original DIE for an inlined subprogram."); - - auto ScopeDIE = make_unique<DIE>(dwarf::DW_TAG_inlined_subroutine); - TheCU.addDIEEntry(*ScopeDIE, dwarf::DW_AT_abstract_origin, *OriginDIE); - - TheCU.attachRangesOrLowHighPC(*ScopeDIE, Scope->getRanges()); - - // Add the call site information to the DIE. - DILocation DL(Scope->getInlinedAt()); - TheCU.addUInt(*ScopeDIE, dwarf::DW_AT_call_file, None, - TheCU.getOrCreateSourceID(DL.getFilename(), DL.getDirectory())); - TheCU.addUInt(*ScopeDIE, dwarf::DW_AT_call_line, None, DL.getLineNumber()); - - // Add name to the name table, we do this here because we're guaranteed - // to have concrete versions of our DW_TAG_inlined_subprogram nodes. - addSubprogramNames(InlinedSP, *ScopeDIE); - - return ScopeDIE; -} - static std::unique_ptr<DIE> constructVariableDIE(DwarfCompileUnit &TheCU, DbgVariable &DV, const LexicalScope &Scope, |