summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-11-19 22:51:04 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-11-19 22:51:04 +0000
commit2ea848b972d7d3dc5c0e525ba2795941d10e7748 (patch)
tree3cc70057dd6bd88309e937c2b974894f87ce9d76 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
parent404dfb46a9dde63548d59db3295681a1c3a684fc (diff)
downloadbcm5719-llvm-2ea848b972d7d3dc5c0e525ba2795941d10e7748.tar.gz
bcm5719-llvm-2ea848b972d7d3dc5c0e525ba2795941d10e7748.zip
DebugInfo: Constify accelerator table handling, and separate type accelarator insertion in preparation for a second use of this code from type units.
llvm-svn: 195164
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index e429921866f..02f4206e949 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -74,10 +74,10 @@ class CompileUnit {
/// AccelNames - A map of names for the name accelerator table.
///
- StringMap<std::vector<DIE *> > AccelNames;
- StringMap<std::vector<DIE *> > AccelObjC;
- StringMap<std::vector<DIE *> > AccelNamespace;
- StringMap<std::vector<std::pair<DIE *, unsigned> > > AccelTypes;
+ StringMap<std::vector<const DIE *> > AccelNames;
+ StringMap<std::vector<const DIE *> > AccelObjC;
+ StringMap<std::vector<const DIE *> > AccelNamespace;
+ StringMap<std::vector<std::pair<const DIE *, unsigned> > > AccelTypes;
/// DIEBlocks - A list of all the DIEBlocks in use.
std::vector<DIEBlock *> DIEBlocks;
@@ -106,16 +106,16 @@ public:
const StringMap<DIE *> &getGlobalNames() const { return GlobalNames; }
const StringMap<DIE *> &getGlobalTypes() const { return GlobalTypes; }
- const StringMap<std::vector<DIE *> > &getAccelNames() const {
+ const StringMap<std::vector<const DIE *> > &getAccelNames() const {
return AccelNames;
}
- const StringMap<std::vector<DIE *> > &getAccelObjC() const {
+ const StringMap<std::vector<const DIE *> > &getAccelObjC() const {
return AccelObjC;
}
- const StringMap<std::vector<DIE *> > &getAccelNamespace() const {
+ const StringMap<std::vector<const DIE *> > &getAccelNamespace() const {
return AccelNamespace;
}
- const StringMap<std::vector<std::pair<DIE *, unsigned> > > &
+ const StringMap<std::vector<std::pair<const DIE *, unsigned> > > &
getAccelTypes() const {
return AccelTypes;
}
@@ -143,16 +143,16 @@ public:
void addPubTypes(DISubprogram SP);
/// addAccelName - Add a new name to the name accelerator table.
- void addAccelName(StringRef Name, DIE *Die);
+ void addAccelName(StringRef Name, const DIE *Die);
/// addAccelObjC - Add a new name to the ObjC accelerator table.
- void addAccelObjC(StringRef Name, DIE *Die);
+ void addAccelObjC(StringRef Name, const DIE *Die);
/// addAccelNamespace - Add a new name to the namespace accelerator table.
- void addAccelNamespace(StringRef Name, DIE *Die);
+ void addAccelNamespace(StringRef Name, const DIE *Die);
/// addAccelType - Add a new type to the type accelerator table.
- void addAccelType(StringRef Name, std::pair<DIE *, unsigned> Die);
+ void addAccelType(StringRef Name, std::pair<const DIE *, unsigned> Die);
/// getDIE - Returns the debug information entry map slot for the
/// specified debug variable. We delegate the request to DwarfDebug
@@ -408,6 +408,10 @@ private:
template <typename T> T resolve(DIRef<T> Ref) const {
return DD->resolve(Ref);
}
+
+ /// If this is a named finished type then include it in the list of types for
+ /// the accelerator tables.
+ void updateAcceleratorTables(DIType Ty, const DIE *TyDIE);
};
} // end llvm namespace
OpenPOWER on IntegriCloud