aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-11-07 09:24:32 +0000
committerEric Christopher <echristo@apple.com>2011-11-07 09:24:32 +0000
commit09ac3d841367d5d56328eade506c951e0dc3a72d (patch)
treecba7874f9d1f2dc0421fc4a2b498d022fb4a46e9 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
parentbcbd3a4637f33036d05833364e180f9dfaabb67c (diff)
downloadexternal_llvm-09ac3d841367d5d56328eade506c951e0dc3a72d.zip
external_llvm-09ac3d841367d5d56328eade506c951e0dc3a72d.tar.gz
external_llvm-09ac3d841367d5d56328eade506c951e0dc3a72d.tar.bz2
Add the support code to enable the dwarf accelerator tables. Upcoming patches
to fix the types section (all types, not just global types), and testcases. The code to do the final emission is disabled by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfCompileUnit.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index efab32e..b994ce3 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -64,6 +64,13 @@ class CompileUnit {
///
StringMap<DIE*> GlobalTypes;
+ /// AccelNames - A map of names for the name accelerator table.
+ ///
+ StringMap<DIE*> AccelNames;
+ StringMap<std::vector<DIE*> > AccelObjC;
+ StringMap<DIE*> AccelNamespace;
+ StringMap<DIE*> AccelTypes;
+
/// DIEBlocks - A list of all the DIEBlocks in use.
std::vector<DIEBlock *> DIEBlocks;
@@ -82,6 +89,13 @@ public:
const StringMap<DIE*> &getGlobals() const { return Globals; }
const StringMap<DIE*> &getGlobalTypes() const { return GlobalTypes; }
+ const StringMap<DIE*> &getAccelNames() const { return AccelNames; }
+ const StringMap<std::vector<DIE*> > &getAccelObjC() const {
+ return AccelObjC;
+ }
+ const StringMap<DIE*> &getAccelNamespace() const { return AccelNamespace; }
+ const StringMap<DIE*> &getAccelTypes() const { return AccelTypes; }
+
/// hasContent - Return true if this compile unit has something to write out.
///
bool hasContent() const { return !CUDie->getChildren().empty(); }
@@ -94,6 +108,20 @@ public:
///
void addGlobalType(DIType Ty);
+
+ /// addAccelName - Add a new name to the name accelerator table.
+ void addAccelName(StringRef Name, DIE *Die) { AccelNames[Name] = Die; }
+ void addAccelObjC(StringRef Name, DIE *Die) {
+ std::vector<DIE*> &DIEs = AccelObjC[Name];
+ DIEs.push_back(Die);
+ }
+ void addAccelNamespace(StringRef Name, DIE *Die) {
+ AccelNamespace[Name] = Die;
+ }
+ void addAccelType(StringRef Name, DIE *Die) {
+ AccelTypes[Name] = Die;
+ }
+
/// getDIE - Returns the debug information entry map slot for the
/// specified debug variable.
DIE *getDIE(const MDNode *N) { return MDNodeToDieMap.lookup(N); }