summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-09-20 23:22:52 +0000
committerEric Christopher <echristo@gmail.com>2013-09-20 23:22:52 +0000
commit9cd26af8b6e316525347fe9cca648ef1ee60787e (patch)
treeb47756fbc50b94749c2bddc694f4634f08f008c9 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
parent6e35094bbfbd01ded191006c8fe4da9af6ffd855 (diff)
downloadbcm5719-llvm-9cd26af8b6e316525347fe9cca648ef1ee60787e.tar.gz
bcm5719-llvm-9cd26af8b6e316525347fe9cca648ef1ee60787e.zip
Move emission of the debug string table to early in the debug
info finalization to greatly reduce the number of fixups that the assembler has to handle in order to improve compile time. llvm-svn: 191119
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index fe4a729e965..39f61e1ad09 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -843,6 +843,34 @@ void CompileUnit::addType(DIE *Entity, DIType Ty, uint16_t Attribute) {
addGlobalType(Ty);
}
+// Accelerator table mutators - add each name along with its companion
+// DIE to the proper table while ensuring that the name that we're going
+// to reference is in the string table. We do this since the names we
+// add may not only be identical to the names in the DIE.
+void CompileUnit::addAccelName(StringRef Name, DIE *Die) {
+ DU->getStringPoolEntry(Name);
+ std::vector<DIE*> &DIEs = AccelNames[Name];
+ DIEs.push_back(Die);
+}
+
+void CompileUnit::addAccelObjC(StringRef Name, DIE *Die) {
+ DU->getStringPoolEntry(Name);
+ std::vector<DIE*> &DIEs = AccelObjC[Name];
+ DIEs.push_back(Die);
+}
+
+void CompileUnit::addAccelNamespace(StringRef Name, DIE *Die) {
+ DU->getStringPoolEntry(Name);
+ std::vector<DIE*> &DIEs = AccelNamespace[Name];
+ DIEs.push_back(Die);
+}
+
+void CompileUnit::addAccelType(StringRef Name, std::pair<DIE *, unsigned> Die) {
+ DU->getStringPoolEntry(Name);
+ std::vector<std::pair<DIE *, unsigned> > &DIEs = AccelTypes[Name];
+ DIEs.push_back(Die);
+}
+
/// addGlobalName - Add a new global name to the compile unit.
void CompileUnit::addGlobalName(StringRef Name, DIE *Die) {
GlobalNames[Name] = Die;
OpenPOWER on IntegriCloud