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

Owen Anderson resistor at mac.com
Wed Jun 24 15:53:43 PDT 2009


Author: resistor
Date: Wed Jun 24 17:53:20 2009
New Revision: 74134

URL: http://llvm.org/viewvc/llvm-project?rev=74134&view=rev
Log:
Down with statics!

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

Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=74134&r1=74133&r2=74134&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Wed Jun 24 17:53:20 2009
@@ -114,6 +114,9 @@
     mutable const MachineInstr *LastMI;
     mutable const Function *LastFn;
     mutable unsigned Counter;
+    
+    // Private state for dump()
+    static unsigned IndentLevel;
 
   protected:
     explicit AsmPrinter(raw_ostream &o, TargetMachine &TM,

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=74134&r1=74133&r2=74134&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Jun 24 17:53:20 2009
@@ -141,9 +141,12 @@
   SmallVector<DbgScope *, 4> Scopes;  // Scopes defined in scope.
   SmallVector<DbgVariable *, 8> Variables;// Variables declared in scope.
   SmallVector<DbgConcreteScope *, 8> ConcreteInsts;// Concrete insts of funcs.
+  
+  // Private state for dump()
+  mutable unsigned IndentLevel;
 public:
   DbgScope(DbgScope *P, DIDescriptor D)
-    : Parent(P), Desc(D), StartLabelID(0), EndLabelID(0) {}
+    : Parent(P), Desc(D), StartLabelID(0), EndLabelID(0), IndentLevel(0) {}
   virtual ~DbgScope();
 
   // Accessors.
@@ -176,7 +179,6 @@
 
 #ifndef NDEBUG
 void DbgScope::dump() const {
-  static unsigned IndentLevel = 0;
   std::string Indent(IndentLevel, ' ');
 
   cerr << Indent; Desc.dump();





More information about the llvm-commits mailing list