diff options
author | Eric Christopher <echristo@apple.com> | 2011-11-10 19:25:34 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-11-10 19:25:34 +0000 |
commit | 0ffe2b4dd6f26fa19827f85bf9e4a766539a859c (patch) | |
tree | 33f93cc0c6793b0cad72e87e9485ac4b7844da63 /lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | |
parent | 39fe397421a23ea44e19b991e64b04f335f7bde6 (diff) |
Rework adding function names to the dwarf accelerator tables, allow
multiple dies per function and support C++ basenames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index 1cbe3a0102..453e898579 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/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); |