Down with _even more_ statics!
authorOwen Anderson <resistor@mac.com>
Wed, 24 Jun 2009 23:13:56 +0000 (23:13 +0000)
committerOwen Anderson <resistor@mac.com>
Wed, 24 Jun 2009 23:13:56 +0000 (23:13 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74137 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DIE.cpp
lib/CodeGen/AsmPrinter/DIE.h

index dc149cf8bc5260c6f3efa51802c558a2e64bd85d..01c431c849a3c72a403883bbc52703fb274ae8fe 100644 (file)
@@ -126,7 +126,6 @@ void DIE::Profile(FoldingSetNodeID &ID) {
 
 #ifndef NDEBUG
 void DIE::print(std::ostream &O, unsigned IncIndent) {
-  static unsigned IndentCount = 0;
   IndentCount += IncIndent;
   const std::string Indent(IndentCount, ' ');
   bool isBlock = Abbrev.getTag() == 0;
index b14d91ca8b0914ba07dc7fecc8f25bd9777958d5..5b60327f9036c8e23c3344325953ffc4c4fef7e5 100644 (file)
@@ -141,9 +141,13 @@ namespace llvm {
 
     /// Abstract compile unit.
     CompileUnit *AbstractCU;
+    
+    // Private data for print()
+    mutable unsigned IndentCount;
   public:
     explicit DIE(unsigned Tag)
-      : Abbrev(Tag, dwarf::DW_CHILDREN_no), Offset(0), Size(0) {}
+      : Abbrev(Tag, dwarf::DW_CHILDREN_no), Offset(0),
+        Size(0), IndentCount(0) {}
     virtual ~DIE();
 
     // Accessors.