X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FAsmPrinter%2FDwarfDebug.h;h=6fceb05be525f2b5e8f962cf94e3381c0d473d63;hb=1decd56b8dec415b9d2270d636226b9fdb0b9c25;hp=b81688ea3f0d37293968257526aaff0405dd720f;hpb=782b70f4b3f1ba68ec26ed99a1a5c095adf80298;p=oota-llvm.git diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index b81688ea3f0..6fceb05be52 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -18,6 +18,7 @@ #include "DIE.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" +#include "llvm/ADT/MapVector.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/StringMap.h" @@ -42,7 +43,7 @@ class MCAsmInfo; class MCObjectFileInfo; class DIEAbbrev; class DIE; -class DIEBlock; +class DIELoc; class DIEEntry; //===----------------------------------------------------------------------===// @@ -243,10 +244,15 @@ class DwarfFile { unsigned NextStringPoolNumber; std::string StringPref; + struct AddressPoolEntry { + unsigned Number; + bool TLS; + AddressPoolEntry(unsigned Number, bool TLS) : Number(Number), TLS(TLS) {} + }; // Collection of addresses for this unit and assorted labels. // A Symbol->unsigned mapping of addresses used by indirect // references. - typedef DenseMap AddrPool; + typedef DenseMap AddrPool; AddrPool AddressPool; unsigned NextAddrPoolNumber; @@ -302,8 +308,7 @@ public: /// \brief Returns the index into the address pool with the given /// label/symbol. - unsigned getAddrPoolIndex(const MCExpr *Sym); - unsigned getAddrPoolIndex(const MCSymbol *Sym); + unsigned getAddrPoolIndex(const MCSymbol *Sym, bool TLS = false); /// \brief Returns the address pool. AddrPool *getAddrPool() { return &AddressPool; } @@ -334,7 +339,7 @@ class DwarfDebug : public AsmPrinterHandler { DwarfCompileUnit *FirstCU; // Maps MDNode with its corresponding DwarfCompileUnit. - DenseMap CUMap; + MapVector CUMap; // Maps subprogram MDNode with its corresponding DwarfCompileUnit. DenseMap SPMap; @@ -458,6 +463,13 @@ class DwarfDebug : public AsmPrinterHandler { // Whether to emit the pubnames/pubtypes sections. bool HasDwarfPubSections; + // Whether or not to use AT_ranges for compilation units. + bool HasCURanges; + + // Whether we emitted a function into a section other than the default + // text. + bool UsedNonDefaultText; + // Version of dwarf we're emitting. unsigned DwarfVersion; @@ -589,10 +601,17 @@ class DwarfDebug : public AsmPrinterHandler { /// DWARF 5 Experimental Split Dwarf Emitters + /// \brief Initialize common features of skeleton units. + void initSkeletonUnit(const DwarfUnit *U, DIE *Die, DwarfUnit *NewU); + /// \brief Construct the split debug info compile unit for the debug info /// section. DwarfCompileUnit *constructSkeletonCU(const DwarfCompileUnit *CU); + /// \brief Construct the split debug info compile unit for the debug info + /// section. + DwarfTypeUnit *constructSkeletonTU(DwarfTypeUnit *TU); + /// \brief Emit the debug info dwo section. void emitDebugInfoDWO(); @@ -695,7 +714,8 @@ public: /// \brief Add a DIE to the set of types that we're going to pull into /// type units. - void addDwarfTypeUnitType(uint16_t Language, DIE *Die, DICompositeType CTy); + void addDwarfTypeUnitType(DwarfCompileUnit &CU, StringRef Identifier, + DIE *Die, DICompositeType CTy); /// \brief Add a label so that arange data can be generated for it. void addArangeLabel(SymbolCU SCU) { ArangeLabels.push_back(SCU); } @@ -725,6 +745,9 @@ public: /// split dwarf proposal support. bool useSplitDwarf() { return HasSplitDwarf; } + /// \brief Returns whether or not to use AT_ranges for compilation units. + bool useCURanges() { return HasCURanges; } + /// Returns the Dwarf Version. unsigned getDwarfVersion() const { return DwarfVersion; }