X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FCodeGen%2FAsmPrinter%2FDwarfCompileUnit.h;h=855ca39031e346f112379cd5714f2f2b9fc002e5;hp=e60993596a3f4b587e1d62653fcfe0b38031a2cf;hb=ab08da75d70c76fd946483e29366264c92cc092b;hpb=e988932602a72b494e39db93b810015ae199af12 diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index e60993596a3..855ca39031e 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -33,6 +33,11 @@ class DwarfCompileUnit : public DwarfUnit { /// the need to search for it in applyStmtList. unsigned stmtListIndex; + /// \brief Construct a DIE for the given DbgVariable without initializing the + /// DbgVariable's DIE reference. + std::unique_ptr constructVariableDIEImpl(const DbgVariable &DV, + bool Abstract); + public: DwarfCompileUnit(unsigned UID, DICompileUnit Node, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU); @@ -81,6 +86,48 @@ public: void constructScopeDIE(LexicalScope *Scope, SmallVectorImpl> &FinalChildren); + + /// \brief A helper function to construct a RangeSpanList for a given + /// lexical scope. + void addScopeRangeList(DIE &ScopeDIE, + const SmallVectorImpl &Range); + + void attachRangesOrLowHighPC(DIE &D, + const SmallVectorImpl &Ranges); + + /// \brief This scope represents inlined body of a function. Construct + /// DIE to represent this concrete inlined copy of the function. + std::unique_ptr constructInlinedScopeDIE(LexicalScope *Scope); + + /// \brief Construct new DW_TAG_lexical_block for this scope and + /// attach DW_AT_low_pc/DW_AT_high_pc labels. + std::unique_ptr constructLexicalScopeDIE(LexicalScope *Scope); + + /// constructVariableDIE - Construct a DIE for the given DbgVariable. + std::unique_ptr constructVariableDIE(DbgVariable &DV, + bool Abstract = false); + + std::unique_ptr constructVariableDIE(DbgVariable &DV, + const LexicalScope &Scope, + DIE *&ObjectPointer); + + /// A helper function to create children of a Scope DIE. + DIE *createScopeChildrenDIE(LexicalScope *Scope, + SmallVectorImpl> &Children, + unsigned *ChildScopeCount = nullptr); + + /// \brief Construct a DIE for this subprogram scope. + void constructSubprogramScopeDIE(LexicalScope *Scope); + + DIE *createAndAddScopeChildren(LexicalScope *Scope, DIE &ScopeDIE); + + DIE &constructAbstractSubprogramScopeDIE(LexicalScope *Scope); + + /// \brief Construct import_module DIE. + std::unique_ptr + constructImportedEntityDIE(const DIImportedEntity &Module); + + void finishSubprogramDefinition(DISubprogram SP); }; } // end llvm namespace