summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index bd1d304b71d..baf87323178 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -353,6 +353,9 @@ class DwarfDebug : public AsmPrinterHandler {
/// of in DwarfCompileUnit.
DenseMap<const MDNode *, DIE *> MDTypeNodeToDieMap;
+ // Used to unique C++ member function declarations.
+ StringMap<const MDNode *> OdrMemberMap;
+
// Stores the current file ID for a given compile unit.
DenseMap<unsigned, unsigned> FileIDCUMap;
// Source id map, i.e. CUID, source filename and directory,
@@ -702,6 +705,11 @@ public:
return MDTypeNodeToDieMap.lookup(TypeMD);
}
+ /// \brief Look up or create an entry in the OdrMemberMap.
+ const MDNode *&getOrCreateOdrMember(StringRef Key) {
+ return OdrMemberMap.GetOrCreateValue(Key).getValue();
+ }
+
/// \brief Emit all Dwarf sections that should come prior to the
/// content.
void beginModule();
OpenPOWER on IntegriCloud