Until now all debug info MDNodes referred to a root MDNode, a compile unit. This...
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.h
index 3c8c683bd045eb24cff29d12daff334e89867d9d..042d693a9b6c79116f30d6346f2b20e58c989700 100644 (file)
@@ -192,8 +192,13 @@ class DwarfDebug {
   //
 
   CompileUnit *FirstCU;
+
+  /// Maps MDNode with its corresponding CompileUnit.
   DenseMap <const MDNode *, CompileUnit *> CUMap;
 
+  /// Maps subprogram MDNode with its corresponding CompileUnit.
+  DenseMap <const MDNode *, CompileUnit *> SPMap;
+
   /// AbbreviationsSet - Used to uniquely define abbreviations.
   ///
   FoldingSet<DIEAbbrev> AbbreviationsSet;
@@ -410,10 +415,7 @@ private:
 
   /// constructCompileUnit - Create new CompileUnit for the given 
   /// metadata node with tag DW_TAG_compile_unit.
-  void constructCompileUnit(const MDNode *N);
-
-  /// getCompielUnit - Get CompileUnit DIE.
-  CompileUnit *getCompileUnit(const MDNode *N) const;
+  CompileUnit *constructCompileUnit(const MDNode *N);
 
   /// constructGlobalVariableDIE - Construct global variable DIE.
   void constructGlobalVariableDIE(CompileUnit *TheCU, const MDNode *N);