aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-06-24 22:53:20 +0000
committerOwen Anderson <resistor@mac.com>2009-06-24 22:53:20 +0000
commit04c05f7630f33e092ae268a19de1b1a76d31785f (patch)
tree263994820afbe4cec0822626fce26f833a2601e5
parent70535451e0ea1c2fa356720436f98cc000ccf5ec (diff)
Down with statics!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74134 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h3
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
2 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index 105d773040..9f74452c59 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -114,6 +114,9 @@ namespace llvm {
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,
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 9d340e3aee..7f9894d39e 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -141,9 +141,12 @@ class VISIBILITY_HIDDEN DbgScope {
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 @@ public:
#ifndef NDEBUG
void DbgScope::dump() const {
- static unsigned IndentLevel = 0;
std::string Indent(IndentLevel, ' ');
cerr << Indent; Desc.dump();