DwarfAccelTable: Store the string symbol in the accelerator table to avoid duplicate lookup.

This also avoids the need for subtly side-effecting calls to manifest
strings in the string table at the point where items are added to the
accelerator tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207281 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-04-25 22:21:35 +00:00
parent 817f5e2fa1
commit 82a35bf01a
3 changed files with 39 additions and 35 deletions

View File

@ -2545,27 +2545,27 @@ void DwarfDebug::attachLowHighPC(DwarfCompileUnit &Unit, DIE &D,
void DwarfDebug::addAccelName(StringRef Name, const DIE &Die) {
if (!useDwarfAccelTables())
return;
InfoHolder.getStringPool().getSymbol(*Asm, Name);
AccelNames.AddName(Name, &Die);
AccelNames.AddName(Name, InfoHolder.getStringPool().getSymbol(*Asm, Name),
&Die);
}
void DwarfDebug::addAccelObjC(StringRef Name, const DIE &Die) {
if (!useDwarfAccelTables())
return;
InfoHolder.getStringPool().getSymbol(*Asm, Name);
AccelObjC.AddName(Name, &Die);
AccelObjC.AddName(Name, InfoHolder.getStringPool().getSymbol(*Asm, Name),
&Die);
}
void DwarfDebug::addAccelNamespace(StringRef Name, const DIE &Die) {
if (!useDwarfAccelTables())
return;
InfoHolder.getStringPool().getSymbol(*Asm, Name);
AccelNamespace.AddName(Name, &Die);
AccelNamespace.AddName(Name, InfoHolder.getStringPool().getSymbol(*Asm, Name),
&Die);
}
void DwarfDebug::addAccelType(StringRef Name, const DIE &Die, char Flags) {
if (!useDwarfAccelTables())
return;
InfoHolder.getStringPool().getSymbol(*Asm, Name);
AccelTypes.AddName(Name, &Die, Flags);
AccelTypes.AddName(Name, InfoHolder.getStringPool().getSymbol(*Asm, Name),
&Die);
}