summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-25 22:21:35 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-25 22:21:35 +0000
commit772ab8ae5aa48f9dafe7d2de4a24436266f603c2 (patch)
tree8e4d6bff5bc4284d19ec2c0c7dd0859c32a2846e /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentf0ffdb2e6014987e16e685d96adaf09f3261a2f3 (diff)
downloadbcm5719-llvm-772ab8ae5aa48f9dafe7d2de4a24436266f603c2.tar.gz
bcm5719-llvm-772ab8ae5aa48f9dafe7d2de4a24436266f603c2.zip
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. llvm-svn: 207281
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 90c127c5dd2..8f4d89a12b1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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);
}
OpenPOWER on IntegriCloud