diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfFile.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h index 272a26851b7..2e7d25f01bb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h @@ -24,7 +24,9 @@ namespace llvm { class AsmPrinter; +class DbgEntity; class DbgVariable; +class DbgLabel; class DwarfCompileUnit; class DwarfUnit; class LexicalScope; @@ -62,9 +64,13 @@ class DwarfFile { /// Collection of DbgVariables of each lexical scope. DenseMap<LexicalScope *, ScopeVars> ScopeVariables; + /// Collection of DbgLabels of each lexical scope. + using LabelList = SmallVector<DbgLabel *, 4>; + DenseMap<LexicalScope *, LabelList> ScopeLabels; + // Collection of abstract subprogram DIEs. DenseMap<const MDNode *, DIE *> AbstractSPDies; - DenseMap<const MDNode *, std::unique_ptr<DbgVariable>> AbstractVariables; + DenseMap<const DINode *, std::unique_ptr<DbgEntity>> AbstractEntities; /// Maps MDNodes for type system with the corresponding DIEs. These DIEs can /// be shared across CUs, that is why we keep the map here instead @@ -125,16 +131,22 @@ public: /// \returns false if the variable was merged with a previous one. bool addScopeVariable(LexicalScope *LS, DbgVariable *Var); + void addScopeLabel(LexicalScope *LS, DbgLabel *Label); + DenseMap<LexicalScope *, ScopeVars> &getScopeVariables() { return ScopeVariables; } + DenseMap<LexicalScope *, LabelList> &getScopeLabels() { + return ScopeLabels; + } + DenseMap<const MDNode *, DIE *> &getAbstractSPDies() { return AbstractSPDies; } - DenseMap<const MDNode *, std::unique_ptr<DbgVariable>> &getAbstractVariables() { - return AbstractVariables; + DenseMap<const DINode *, std::unique_ptr<DbgEntity>> &getAbstractEntities() { + return AbstractEntities; } void insertDIE(const MDNode *TypeMD, DIE *Die) { |