summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2012-12-27 02:14:01 +0000
committerEric Christopher <echristo@gmail.com>2012-12-27 02:14:01 +0000
commit3bf29fda91bce063d6a75708bdf29f8a499d22e0 (patch)
tree6a9460b62c1b3166f72ad8e6209722df13644c8b /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
parentc8a88ee691587d659c88234c138edbcdde8ebdd7 (diff)
downloadbcm5719-llvm-3bf29fda91bce063d6a75708bdf29f8a499d22e0.tar.gz
bcm5719-llvm-3bf29fda91bce063d6a75708bdf29f8a499d22e0.zip
For the dwarf5 split debug info code split out the string section
per compile unit/skeleton compile unit. Update tests accordingly. llvm-svn: 171133
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 870b588cf7c..59e4890dec4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -210,15 +210,17 @@ class DwarfUnits {
// A pointer to all units in the section.
SmallVector<CompileUnit *, 1> CUs;
- // Collection of strings for this unit.
+ // Collection of strings for this unit and assorted symbols.
StrPool *StringPool;
unsigned NextStringPoolNumber;
+ std::string StringPref;
public:
DwarfUnits(AsmPrinter *AP, FoldingSet<DIEAbbrev> *AS,
- std::vector<DIEAbbrev *> *A, StrPool *SP) :
+ std::vector<DIEAbbrev *> *A,
+ StrPool *SP, const char *Pref) :
Asm(AP), AbbreviationsSet(AS), Abbreviations(A),
- StringPool(SP), NextStringPoolNumber(0) {}
+ StringPool(SP), NextStringPoolNumber(0), StringPref(Pref) {}
/// \brief Compute the size and offset of a DIE given an incoming Offset.
unsigned computeSizeAndOffset(DIE *Die, unsigned Offset);
@@ -237,6 +239,9 @@ public:
void emitUnits(DwarfDebug *, const MCSection *, const MCSection *,
const MCSymbol *);
+ /// \brief Emit all of the strings to the section given.
+ void emitStrings(const MCSection *);
+
/// \brief Returns the entry into the start of the pool.
MCSymbol *getStringPoolSym();
@@ -364,7 +369,7 @@ class DwarfDebug {
MCSymbol *DwarfStrSectionSym, *TextSectionSym, *DwarfDebugRangeSectionSym;
MCSymbol *DwarfDebugLocSectionSym;
MCSymbol *FunctionBeginSym, *FunctionEndSym;
- MCSymbol *DwarfAbbrevDWOSectionSym;
+ MCSymbol *DwarfAbbrevDWOSectionSym, *DwarfStrDWOSectionSym;
// As an optimization, there is no need to emit an entry in the directory
// table for the same directory as DW_at_comp_dir.
@@ -394,12 +399,16 @@ class DwarfDebug {
// The CU left in the original object file for separated debug info.
CompileUnit *SkeletonCU;
- // Used to uniquely define abbreviations for the skeleton emission.
+ // Used to uniquely define abbreviations for the skeleton emission.
FoldingSet<DIEAbbrev> SkeletonAbbrevSet;
// A list of all the unique abbreviations in use.
std::vector<DIEAbbrev *> SkeletonAbbrevs;
+ // List of strings used in the skeleton.
+ StrPool SkeletonStringPool;
+
+ // Holder for the skeleton information.
DwarfUnits SkeletonHolder;
private:
@@ -514,6 +523,9 @@ private:
/// \brief Emit the debug abbrev dwo section.
void emitDebugAbbrevDWO();
+ /// \brief Emit the debug str dwo section.
+ void emitDebugStrDWO();
+
/// \brief Create new CompileUnit for the given metadata node with tag
/// DW_TAG_compile_unit.
CompileUnit *constructCompileUnit(const MDNode *N);
OpenPOWER on IntegriCloud