summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-25 21:34:35 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-25 21:34:35 +0000
commitdaefdbf3ad41bc72d6c4c3f70bbaee39ed9f5d18 (patch)
tree528bc96b8ae70e1556b5bfce8005153279ef808f /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
parent001ecd9aa988f88d66ca9fb9e15dc0bfe04ea40b (diff)
downloadbcm5719-llvm-daefdbf3ad41bc72d6c4c3f70bbaee39ed9f5d18.tar.gz
bcm5719-llvm-daefdbf3ad41bc72d6c4c3f70bbaee39ed9f5d18.zip
Encapsulate the DWARF string pool in a separate type.
Pulls out some more code from some of the rather monolithic DWARF classes. Unlike the address table, the string table won't move up into DwarfDebug - each DWARF file has its own string table (but there can be only one address table). llvm-svn: 207277
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index c7d22724ce3..326243278ec 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -208,7 +208,7 @@ void DwarfUnit::addString(DIE &Die, dwarf::Attribute Attribute,
if (!DD->useSplitDwarf())
return addLocalString(Die, Attribute, String);
- unsigned idx = DU->getStringPoolIndex(String);
+ unsigned idx = DU->getStringPool().getIndex(*Asm, String);
DIEValue *Value = new (DIEValueAllocator) DIEInteger(idx);
DIEValue *Str = new (DIEValueAllocator) DIEString(Value, String);
Die.addValue(Attribute, dwarf::DW_FORM_GNU_str_index, Str);
@@ -218,12 +218,12 @@ void DwarfUnit::addString(DIE &Die, dwarf::Attribute Attribute,
/// to be in the local string pool instead of indirected.
void DwarfUnit::addLocalString(DIE &Die, dwarf::Attribute Attribute,
StringRef String) {
- MCSymbol *Symb = DU->getStringPoolEntry(String);
+ MCSymbol *Symb = DU->getStringPool().getSymbol(*Asm, String);
DIEValue *Value;
if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
Value = new (DIEValueAllocator) DIELabel(Symb);
else {
- MCSymbol *StringPool = DU->getStringPoolSym();
+ MCSymbol *StringPool = DU->getStringPool().getSectionSymbol();
Value = new (DIEValueAllocator) DIEDelta(Symb, StringPool);
}
DIEValue *Str = new (DIEValueAllocator) DIEString(Value, String);
OpenPOWER on IntegriCloud