aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-01-08 22:22:06 +0000
committerEric Christopher <echristo@gmail.com>2013-01-08 22:22:06 +0000
commitb6714227eda5d499f7667fc865f931126a8dc488 (patch)
tree51c6f64596e2c989e3f8be8a48a4d2cd262b87f9 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent0fdcef6030fb69bee45f604c71c53bebb17c1079 (diff)
downloadexternal_llvm-b6714227eda5d499f7667fc865f931126a8dc488.zip
external_llvm-b6714227eda5d499f7667fc865f931126a8dc488.tar.gz
external_llvm-b6714227eda5d499f7667fc865f931126a8dc488.tar.bz2
Move the string pools down into the units. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 5c8ef24..66a5a6d 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -155,15 +155,14 @@ DIType DbgVariable::getType() const {
DwarfDebug::DwarfDebug(AsmPrinter *A, Module *M)
: Asm(A), MMI(Asm->MMI), FirstCU(0),
AbbreviationsSet(InitAbbreviationsSetSize),
- SourceIdMap(DIEValueAllocator), InfoStringPool(DIEValueAllocator),
+ SourceIdMap(DIEValueAllocator),
PrevLabel(NULL), GlobalCUIndexCount(0),
- InfoHolder(A, &AbbreviationsSet, &Abbreviations,
- &InfoStringPool, "info_string"),
+ InfoHolder(A, &AbbreviationsSet, &Abbreviations, "info_string",
+ DIEValueAllocator),
SkeletonCU(0),
SkeletonAbbrevSet(InitAbbreviationsSetSize),
- SkeletonStringPool(DIEValueAllocator),
- SkeletonHolder(A, &SkeletonAbbrevSet, &SkeletonAbbrevs,
- &SkeletonStringPool, "skel_string") {
+ SkeletonHolder(A, &SkeletonAbbrevSet, &SkeletonAbbrevs, "skel_string",
+ DIEValueAllocator) {
DwarfInfoSectionSym = DwarfAbbrevSectionSym = 0;
DwarfStrSectionSym = TextSectionSym = 0;
@@ -221,7 +220,7 @@ MCSymbol *DwarfUnits::getStringPoolSym() {
MCSymbol *DwarfUnits::getStringPoolEntry(StringRef Str) {
std::pair<MCSymbol*, unsigned> &Entry =
- StringPool->GetOrCreateValue(Str).getValue();
+ StringPool.GetOrCreateValue(Str).getValue();
if (Entry.first) return Entry.first;
Entry.second = NextStringPoolNumber++;
@@ -230,7 +229,7 @@ MCSymbol *DwarfUnits::getStringPoolEntry(StringRef Str) {
unsigned DwarfUnits::getStringPoolIndex(StringRef Str) {
std::pair<MCSymbol*, unsigned> &Entry =
- StringPool->GetOrCreateValue(Str).getValue();
+ StringPool.GetOrCreateValue(Str).getValue();
if (Entry.first) return Entry.second;
Entry.second = NextStringPoolNumber++;
@@ -2130,7 +2129,7 @@ void DwarfUnits::emitStrings(const MCSection *StrSection,
const MCSection *OffsetSection = NULL,
const MCSymbol *StrSecSym = NULL) {
- if (StringPool->empty()) return;
+ if (StringPool.empty()) return;
// Start the dwarf str section.
Asm->OutStreamer.SwitchSection(StrSection);
@@ -2141,7 +2140,7 @@ void DwarfUnits::emitStrings(const MCSection *StrSection,
StringMapEntry<std::pair<MCSymbol*, unsigned> >*>, 64> Entries;
for (StringMap<std::pair<MCSymbol*, unsigned> >::iterator
- I = StringPool->begin(), E = StringPool->end();
+ I = StringPool.begin(), E = StringPool.end();
I != E; ++I)
Entries.push_back(std::make_pair(I->second.second, &*I));