Refactor code that finds context for a given die.

Create global variable DIEs after creating subprogram DIEs. This allows function level static variable's to find their context at the time of DIE creation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91055 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-12-10 19:14:49 +00:00
parent cbd77d2cb1
commit c366f83d89
2 changed files with 24 additions and 42 deletions

View File

@@ -163,10 +163,6 @@ class DwarfDebug : public Dwarf {
SmallPtrSet<DIE *, 4> TopLevelDIEs;
SmallVector<DIE *, 4> TopLevelDIEsVector;
/// ScopedGVs - Tracks global variables that are not at file scope.
/// For example void f() { static int b = 42; }
SmallVector<WeakVH, 4> ScopedGVs;
typedef SmallVector<DbgScope *, 2> ScopeVector;
typedef DenseMap<const MachineInstr *, ScopeVector>
InsnToDbgScopeMapTy;
@@ -313,6 +309,9 @@ class DwarfDebug : public Dwarf {
void addBlockByrefAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute,
const MachineLocation &Location);
/// addToContextOwner - Add Die into the list of its context owner's children.
void addToContextOwner(DIE *Die, DIDescriptor Context);
/// addType - Add a new type attribute to the specified entity.
void addType(DIE *Entity, DIType Ty);