[llvm-commits] [llvm] r100768 - in /llvm/trunk/lib/CodeGen/AsmPrinter: DwarfDebug.cpp DwarfDebug.h

Devang Patel dpatel at apple.com
Thu Apr 8 08:37:10 PDT 2010


Author: dpatel
Date: Thu Apr  8 10:37:09 2010
New Revision: 100768

URL: http://llvm.org/viewvc/llvm-project?rev=100768&view=rev
Log:
Refactor.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=100768&r1=100767&r2=100768&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Apr  8 10:37:09 2010
@@ -2268,6 +2268,16 @@
 
   CurrentFnDbgScope->fixInstructionMarkers(MIIndexMap);
 
+  populateDbgScopeInverseMaps();
+
+  return !DbgScopeMap.empty();
+}
+
+/// populateDbgScopeInverseMaps() - Populate DbgScopeBeginMap and
+/// DbgScopeEndMap. This maps are used to indentify debug scope started
+/// and ended by an instruction.
+void DwarfDebug::populateDbgScopeInverseMaps() {
+
   // Each scope has first instruction and last instruction to mark beginning
   // and end of a scope respectively. Create an inverse map that list scopes
   // starts (and ends) with an instruction. One instruction may start (or end)
@@ -2302,8 +2312,6 @@
     else
       DbgScopeEndMap[MI].push_back(S);
   }
-
-  return !DbgScopeMap.empty();
 }
 
 /// beginFunction - Gather pre-function debug information.  Assumes being

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=100768&r1=100767&r2=100768&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Thu Apr  8 10:37:09 2010
@@ -527,6 +527,11 @@
     return Lines.size();
   }
   
+  /// populateDbgScopeInverseMaps() - Populate DbgScopeBeginMap and
+  /// DbgScopeEndMap. This maps are used to indentify debug scope started
+  /// and ended by an instruction.
+  void populateDbgScopeInverseMaps();
+
   /// extractScopeInformation - Scan machine instructions in this function
   /// and collect DbgScopes. Return true, if atleast one scope was found.
   bool extractScopeInformation();





More information about the llvm-commits mailing list