ScopeVariablesMap ScopeVariables;
// Collection of abstract variables.
- DenseMap<const MDNode *, DbgVariable *> AbstractVariables;
+ DenseMap<const MDNode *, std::unique_ptr<DbgVariable>> AbstractVariables;
// Collection of DebugLocEntry. Stored in a linked list so that DIELocLists
// can refer to them in spite of insertions into this list.
// Maps instruction with label emitted after instruction.
DenseMap<const MachineInstr *, MCSymbol *> LabelsAfterInsn;
- // Every user variable mentioned by a DBG_VALUE instruction in order of
- // appearance.
- SmallVector<const MDNode *, 8> UserVariables;
-
// History of DBG_VALUE and clobber instructions for each user variable.
+ // Variables are listed in order of appearance.
DbgValueHistoryMap DbgValues;
// Previous instruction's location information. This is used to determine
/// \brief Find abstract variable associated with Var.
DbgVariable *findAbstractVariable(DIVariable &Var, DebugLoc Loc);
+ DbgVariable *findAbstractVariable(DIVariable &Var, const MDNode *Scope);
/// \brief Find DIE for the given subprogram and attach appropriate
/// DW_AT_low_pc and DW_AT_high_pc attributes. If there are global
/// \brief Compute the size and offset of all the DIEs.
void computeSizeAndOffsets();
- /// \brief Attach DW_AT_inline attribute with inlined subprogram DIEs.
- void computeInlinedDIEs();
-
/// \brief Collect info for variables that were optimized out.
void collectDeadVariables();
+ void finishSubprogramDefinitions();
+
/// \brief Finish off debug information after all functions have been
/// processed.
void finalizeModuleInfo();
/// DW_TAG_compile_unit.
DwarfCompileUnit &constructDwarfCompileUnit(DICompileUnit DIUnit);
- /// \brief Construct subprogram DIE.
- void constructSubprogramDIE(DwarfCompileUnit &TheCU, const MDNode *N);
-
/// \brief Construct imported_module or imported_declaration DIE.
void constructImportedEntityDIE(DwarfCompileUnit &TheCU, const MDNode *N);
/// \brief Return Label immediately following the instruction.
MCSymbol *getLabelAfterInsn(const MachineInstr *MI);
+ void attachRangesOrLowHighPC(DwarfCompileUnit &Unit, DIE &D,
+ const SmallVectorImpl<InsnRange> &Ranges);
void attachLowHighPC(DwarfCompileUnit &Unit, DIE &D, MCSymbol *Begin,
MCSymbol *End);