diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index f0859ec1a8f..253fa182cd0 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -211,6 +211,10 @@ class DwarfDebug : public DebugHandlerBase { /// Size of each symbol emitted (for those symbols that have a specific size). DenseMap<const MCSymbol *, uint64_t> SymSize; + /// Holder for scopes containing local declaration DI nodes per DI function. + DenseMap<const DISubprogram *, SmallPtrSet<const DILocalScope *, 16>> + LocalScopesMap; + /// Collection of abstract variables. DenseMap<const MDNode *, std::unique_ptr<DbgVariable>> AbstractVariables; SmallVector<std::unique_ptr<DbgVariable>, 64> ConcreteVariables; @@ -327,6 +331,8 @@ class DwarfDebug : public DebugHandlerBase { void finishSubprogramDefinitions(); + void finishLocalScopeDefinitions(); + /// Finish off debug information after all functions have been /// processed. void finalizeModuleInfo(); @@ -425,6 +431,11 @@ class DwarfDebug : public DebugHandlerBase { void constructAndAddImportedEntityDIE(DwarfCompileUnit &TheCU, const DIImportedEntity *N); + /// Collect MD Node located within local scope node. + /// Return true if node was collected, false otherwise. + bool collectLocalScopedNode(DIScope *S, const DINode *N, + DwarfCompileUnit &CU); + /// Register a source line with debug info. Returns the unique /// label that was emitted and which provides correspondence to the /// source line list. @@ -567,6 +578,12 @@ public: SmallPtrSet<const MDNode *, 16> &getProcessedSPNodes() { return ProcessedSPNodes; } + + /// Return collection of function scopes that contains local declararion DIEs. + SmallPtrSet<const DILocalScope *, 16> & + getLocalScopes(const DISubprogram *SP) { + return LocalScopesMap[SP]; + } }; } // End of namespace llvm |