diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 1c3e2aec64a..3a583e71c4c 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -278,13 +278,10 @@ class DwarfDebug : public AsmPrinterHandler { // Holder for the file specific debug information. DwarfFile InfoHolder; - // Holders for the various debug information flags that we might need to - // have exposed. See accessor functions below for description. - - // Holder for imported entities. + // Holder for local declaration DI nodes per scope. typedef SmallVector<std::pair<const MDNode *, const MDNode *>, 32> - ImportedEntityMap; - ImportedEntityMap ScopesWithImportedEntities; + LocalDeclMap; + LocalDeclMap ScopesWithLocalDeclNodes; // Map from MDNodes for user-defined types to the type units that describe // them. @@ -619,10 +616,12 @@ public: const MachineFunction *getCurrentFunction() const { return CurFn; } - iterator_range<ImportedEntityMap::const_iterator> - findImportedEntitiesForScope(const MDNode *Scope) const { + typedef iterator_range<LocalDeclMap::const_iterator> LocalDeclMapRange; + + LocalDeclMapRange findLocalDeclNodesForScope(const MDNode *Scope) const { + assert(DILexicalBlockBase::classof(Scope) && "Expected LexicalBlock scope"); return make_range(std::equal_range( - ScopesWithImportedEntities.begin(), ScopesWithImportedEntities.end(), + ScopesWithLocalDeclNodes.begin(), ScopesWithLocalDeclNodes.end(), std::pair<const MDNode *, const MDNode *>(Scope, nullptr), less_first())); } |

