mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
DebugInfo: Use the comp_dir of the referencing type units when building debug_line.dwo
This isn't a complete fix - it falls back to non-comp_dir when multiple compile units are in play. Adding a map of comp_dir to table is part of the more general solution, but I gave up (in the short term) when I realized I'd also have to calculate the size of each type unit so as to produce correct DW_AT_stmt_list attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -467,10 +467,18 @@ class DwarfDebug : public AsmPrinterHandler {
|
||||
// Holder for the skeleton information.
|
||||
DwarfFile SkeletonHolder;
|
||||
|
||||
// Store file names for type units under fission in a line table header that
|
||||
// will be emitted into debug_line.dwo.
|
||||
/// Store file names for type units under fission in a line table header that
|
||||
/// will be emitted into debug_line.dwo.
|
||||
// FIXME: replace this with a map from comp_dir to table so that we can emit
|
||||
// multiple tables during LTO each of which uses directory 0, referencing the
|
||||
// comp_dir of all the type units that use it.
|
||||
MCDwarfDwoLineTable SplitTypeUnitFileTable;
|
||||
|
||||
// True iff there are multiple CUs in this module.
|
||||
bool SingleCU;
|
||||
|
||||
MCDwarfDwoLineTable *getDwoLineTable(const DwarfCompileUnit &);
|
||||
|
||||
void addScopeVariable(LexicalScope *LS, DbgVariable *Var);
|
||||
|
||||
const SmallVectorImpl<DwarfUnit *> &getUnits() {
|
||||
@@ -618,8 +626,7 @@ class DwarfDebug : public AsmPrinterHandler {
|
||||
|
||||
/// \brief Create new DwarfCompileUnit for the given metadata node with tag
|
||||
/// DW_TAG_compile_unit.
|
||||
DwarfCompileUnit *constructDwarfCompileUnit(DICompileUnit DIUnit,
|
||||
bool Singular);
|
||||
DwarfCompileUnit *constructDwarfCompileUnit(DICompileUnit DIUnit);
|
||||
|
||||
/// \brief Construct subprogram DIE.
|
||||
void constructSubprogramDIE(DwarfCompileUnit *TheCU, const MDNode *N);
|
||||
|
Reference in New Issue
Block a user