Debug info: Remove OdrMemberMap from DwarfDebug, it's not necessary.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.h
index 0123180ea468a032dfd08d544d6a62fb265d6515..b4a1cdde11b833dc0cc6f3a7dd6ecf7c9022e0e5 100644 (file)
@@ -22,7 +22,6 @@
 #include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/StringMap.h"
-#include "llvm/CodeGen/AsmPrinter.h"
 #include "llvm/CodeGen/LexicalScopes.h"
 #include "llvm/IR/DebugInfo.h"
 #include "llvm/IR/DebugLoc.h"
@@ -32,7 +31,9 @@
 
 namespace llvm {
 
+class AsmPrinter;
 class ByteStreamer;
+class DwarfDebug;
 class DwarfUnit;
 class DwarfCompileUnit;
 class ConstantInt;
@@ -198,10 +199,7 @@ public:
     assert(Var.isVariable() && "Invalid complex DbgVariable!");
     return Var.hasComplexAddress();
   }
-  bool isBlockByrefVariable() const {
-    assert(Var.isVariable() && "Invalid complex DbgVariable!");
-    return Var.isBlockByrefVariable();
-  }
+  bool isBlockByrefVariable() const;
   unsigned getNumAddrElements() const {
     assert(Var.isVariable() && "Invalid complex DbgVariable!");
     return Var.getNumAddrElements();
@@ -348,9 +346,6 @@ class DwarfDebug : public AsmPrinterHandler {
   /// of in DwarfCompileUnit.
   DenseMap<const MDNode *, DIE *> MDTypeNodeToDieMap;
 
-  // Used to unique C++ member function declarations.
-  StringMap<const MDNode *> OdrMemberMap;
-
   // List of all labels used in aranges generation.
   std::vector<SymbolCU> ArangeLabels;
 
@@ -702,11 +697,6 @@ 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();
@@ -776,6 +766,11 @@ public:
     return Ref.resolve(TypeIdentifierMap);
   }
 
+  /// \brief Return the TypeIdentifierMap.
+  const DITypeIdentifierMap& getTypeIdentifierMap() const {
+    return TypeIdentifierMap;
+  }
+
   /// Find the DwarfCompileUnit for the given CU Die.
   DwarfCompileUnit *lookupUnit(const DIE *CU) const {
     return CUDieMap.lookup(CU);