mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user