diff options
author | Devang Patel <dpatel@apple.com> | 2011-08-15 17:24:54 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-08-15 17:24:54 +0000 |
commit | dbc64af76d769596903485668a1dfc2d6640c4fb (patch) | |
tree | 9710ddafce452a725597717f044e4297ddc743a3 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | |
parent | 8757a4c6aba86111bacc49879d1f1c260f4631d4 (diff) |
Refactor. A subprogram is part of compile unit so let CompileUnit construct new subprogram.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index 213c7fc630..a2c6518aff 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -67,6 +67,11 @@ class CompileUnit { /// DIEBlocks - A list of all the DIEBlocks in use. std::vector<DIEBlock *> DIEBlocks; + /// ContainingTypeMap - This map is used to keep track of subprogram DIEs that + /// need DW_AT_containing_type attribute. This attribute points to a DIE that + /// corresponds to the MDNode mapped with the subprogram DIE. + DenseMap<DIE *, const MDNode *> ContainingTypeMap; + public: CompileUnit(unsigned I, DIE *D, AsmPrinter *A, DwarfDebug *DW); ~CompileUnit(); @@ -226,6 +231,9 @@ public: /// getOrCreateNameSpace - Create a DIE for DINameSpace. DIE *getOrCreateNameSpace(DINameSpace NS); + /// getOrCreateSubprogramDIE - Create new DIE using SP. + DIE *getOrCreateSubprogramDIE(DISubprogram SP); + /// getOrCreateTypeDIE - Find existing DIE or create new DIE for the /// given DIType. DIE *getOrCreateTypeDIE(DIType Ty); @@ -266,6 +274,10 @@ public: /// constructEnumTypeDIE - Construct enum type DIE from DIEnumerator. DIE *constructEnumTypeDIE(DIEnumerator ETy); + /// constructContainingTypeDIEs - Construct DIEs for types that contain + /// vtables. + void constructContainingTypeDIEs(); + /// createMemberDIE - Create new member DIE. DIE *createMemberDIE(DIDerivedType DT); |