summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-11-10 19:25:34 +0000
committerEric Christopher <echristo@apple.com>2011-11-10 19:25:34 +0000
commitd9843b34e687b7dccddebe1cf3730e009d626922 (patch)
treec7b27e5c839a48761b8fd87ac565c65d36a7dd09 /llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
parentc5c49466a167f6d03eda8e3c3b2d16a1511a7a35 (diff)
downloadbcm5719-llvm-d9843b34e687b7dccddebe1cf3730e009d626922.tar.gz
bcm5719-llvm-d9843b34e687b7dccddebe1cf3730e009d626922.zip
Rework adding function names to the dwarf accelerator tables, allow
multiple dies per function and support C++ basenames. llvm-svn: 144304
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 1cbe3a01020..453e8985792 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -62,7 +62,7 @@ class CompileUnit {
/// AccelNames - A map of names for the name accelerator table.
///
- StringMap<DIE*> AccelNames;
+ StringMap<std::vector<DIE*> > AccelNames;
StringMap<std::vector<DIE*> > AccelObjC;
StringMap<DIE*> AccelNamespace;
StringMap<DIE*> AccelTypes;
@@ -84,7 +84,9 @@ public:
DIE* getCUDie() const { return CUDie.get(); }
const StringMap<DIE*> &getGlobalTypes() const { return GlobalTypes; }
- const StringMap<DIE*> &getAccelNames() const { return AccelNames; }
+ const StringMap<std::vector<DIE*> > &getAccelNames() const {
+ return AccelNames;
+ }
const StringMap<std::vector<DIE*> > &getAccelObjC() const {
return AccelObjC;
}
@@ -101,7 +103,10 @@ public:
/// addAccelName - Add a new name to the name accelerator table.
- void addAccelName(StringRef Name, DIE *Die) { AccelNames[Name] = Die; }
+ void addAccelName(StringRef Name, DIE *Die) {
+ std::vector<DIE*> &DIEs = AccelNames[Name];
+ DIEs.push_back(Die);
+ }
void addAccelObjC(StringRef Name, DIE *Die) {
std::vector<DIE*> &DIEs = AccelObjC[Name];
DIEs.push_back(Die);
OpenPOWER on IntegriCloud