summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
diff options
context:
space:
mode:
authorAmjad Aboud <amjad.aboud@intel.com>2016-04-30 01:44:07 +0000
committerAmjad Aboud <amjad.aboud@intel.com>2016-04-30 01:44:07 +0000
commit72da9391f0322c3868ade631066186b5233f75c3 (patch)
treed5eb72ff934f67831f63217252118ddd01eea5d8 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
parenta85efd985c74716429b69cebbac1a5f438fd45d1 (diff)
downloadbcm5719-llvm-72da9391f0322c3868ade631066186b5233f75c3.tar.gz
bcm5719-llvm-72da9391f0322c3868ade631066186b5233f75c3.zip
Reverting 268054 & 268063 as they caused PR27579.
llvm-svn: 268150
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h37
1 files changed, 8 insertions, 29 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 349fee773a1..90f74a3686e 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/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,14 +117,15 @@ public:
unsigned getOrCreateSourceID(StringRef FileName, StringRef DirName) override;
- void addLocalDeclNode(const DINode *DI, DILocalScope *Scope) {
+ void addImportedEntity(const DIImportedEntity* IE) {
+ DIScope *Scope = IE->getScope();
assert(Scope && "Invalid Scope encoding!");
if (!isa<DILocalScope>(Scope))
// No need to add imported enities that are not local declaration.
return;
auto *LocalScope = cast<DILocalScope>(Scope)->getNonLexicalBlockFileScope();
- LocalDeclNodes[LocalScope].push_back(DI);
+ ImportedEntities[LocalScope].push_back(IE);
}
/// addRange - Add an address range to the list of ranges for this unit.
@@ -181,7 +173,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);
@@ -190,15 +182,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();
-
/// Set the skeleton unit associated with this unit.
void setSkeleton(DwarfCompileUnit &Skel) { Skeleton = &Skel; }
@@ -270,15 +258,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