From d9843b34e687b7dccddebe1cf3730e009d626922 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 10 Nov 2011 19:25:34 +0000 Subject: Rework adding function names to the dwarf accelerator tables, allow multiple dies per function and support C++ basenames. llvm-svn: 144304 --- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h') 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 AccelNames; + StringMap > AccelNames; StringMap > AccelObjC; StringMap AccelNamespace; StringMap AccelTypes; @@ -84,7 +84,9 @@ public: DIE* getCUDie() const { return CUDie.get(); } const StringMap &getGlobalTypes() const { return GlobalTypes; } - const StringMap &getAccelNames() const { return AccelNames; } + const StringMap > &getAccelNames() const { + return AccelNames; + } const StringMap > &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 &DIEs = AccelNames[Name]; + DIEs.push_back(Die); + } void addAccelObjC(StringRef Name, DIE *Die) { std::vector &DIEs = AccelObjC[Name]; DIEs.push_back(Die); -- cgit v1.2.3