summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h36
1 files changed, 7 insertions, 29 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 38772fd8f25..bacf87d95c4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -15,7 +15,6 @@
#define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
#include "DwarfUnit.h"
-#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/Support/Dwarf.h"
@@ -49,10 +48,11 @@ class DwarfCompileUnit : public DwarfUnit {
/// The start of the unit macro info within macro section.
MCSymbol *MacroLabelBegin;
- typedef llvm::SmallVector<const MDNode *, 8> LocalDeclNodeList;
- typedef llvm::DenseMap<const MDNode *, LocalDeclNodeList> LocalScopesMap;
+ typedef llvm::SmallVector<const MDNode *, 8> ImportedEntityList;
+ typedef llvm::DenseMap<const MDNode *, ImportedEntityList>
+ ImportedEntityMap;
- LocalScopesMap LocalDeclNodes;
+ ImportedEntityMap ImportedEntities;
/// GlobalNames - A map of globally visible named entities for this unit.
StringMap<const DIE *> GlobalNames;
@@ -71,15 +71,6 @@ class DwarfCompileUnit : public DwarfUnit {
// ranges/locs.
const MCSymbol *BaseAddress;
- struct LocalScopeDieInfo {
- DIE *ConcreteLSDie = nullptr;
- DIE *AbstractLSDie = nullptr;
- SetVector<DIE *> InlineLSDies;
- SetVector<DIE *> LocalDclDies;
- };
- // Collection of local scope DIE info.
- DenseMap<const MDNode *, LocalScopeDieInfo> LocalScopeDieInfoMap;
-
/// \brief Construct a DIE for the given DbgVariable without initializing the
/// DbgVariable's DIE reference.
DIE *constructVariableDIEImpl(const DbgVariable &DV, bool Abstract);
@@ -126,8 +117,8 @@ public:
unsigned getOrCreateSourceID(StringRef FileName, StringRef DirName) override;
- void addLocalDeclNode(const DINode *DI, DILocalScope *Scope) {
- LocalDeclNodes[Scope].push_back(DI);
+ void addImportedEntity(const DIImportedEntity* IE) {
+ ImportedEntities[IE->getScope()].push_back(IE);
}
/// addRange - Add an address range to the list of ranges for this unit.
@@ -175,7 +166,7 @@ public:
/// A helper function to create children of a Scope DIE.
DIE *createScopeChildrenDIE(LexicalScope *Scope,
SmallVectorImpl<DIE *> &Children,
- bool *HasNonScopeChildren = nullptr);
+ unsigned *ChildScopeCount = nullptr);
/// \brief Construct a DIE for this subprogram scope.
void constructSubprogramScopeDIE(LexicalScope *Scope);
@@ -184,15 +175,11 @@ public:
void constructAbstractSubprogramScopeDIE(LexicalScope *Scope);
- /// \brief Get or create import_module DIE.
- DIE *getOrCreateImportedEntityDIE(const DIImportedEntity *Module);
/// \brief Construct import_module DIE.
DIE *constructImportedEntityDIE(const DIImportedEntity *Module);
void finishSubprogramDefinition(const DISubprogram *SP);
- void finishLocalScopeDefinitions();
-
void collectDeadVariables(const DISubprogram *SP);
/// Set the skeleton unit associated with this unit.
@@ -266,15 +253,6 @@ public:
void setBaseAddress(const MCSymbol *Base) { BaseAddress = Base; }
const MCSymbol *getBaseAddress() const { return BaseAddress; }
-
- DenseMap<const MDNode *, LocalScopeDieInfo> &getLSDieInfoMap() {
- return LocalScopeDieInfoMap;
- }
-
- /// Add local scope DIE entry to lexical scope info.
- void addLocalScopeDieToLexicalScope(LexicalScope *LS, DIE *D);
- /// Add local declaration DIE entry to lexical scope info.
- void addLocalDclDieToLexicalScope(LexicalScope *LS, DIE *D);
};
} // end llvm namespace
OpenPOWER on IntegriCloud