Privatize some data.
authorOwen Anderson <resistor@mac.com>
Fri, 26 Jun 2009 21:45:04 +0000 (21:45 +0000)
committerOwen Anderson <resistor@mac.com>
Fri, 26 Jun 2009 21:45:04 +0000 (21:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74332 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp

index cb2ea02837f215a5493cebf4c994d89faa5bc113..cb23f6212ca4b36c85e803b437914ba5a69364f5 100644 (file)
@@ -47,11 +47,12 @@ namespace {
     ///
     typedef std::map<const Value *, unsigned> ValueMapTy;
     ValueMapTy NumberForBB;
+    unsigned BBNumber;
   public:
     explicit SparcAsmPrinter(raw_ostream &O, TargetMachine &TM,
                              const TargetAsmInfo *T, CodeGenOpt::Level OL,
                              bool V)
-      : AsmPrinter(O, TM, T, OL, V) {}
+      : AsmPrinter(O, TM, T, OL, V), BBNumber(0) {}
 
     virtual const char *getPassName() const {
       return "Sparc Assembly Printer";
@@ -102,7 +103,6 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
 
   // BBNumber is used here so that a given Printer will never give two
   // BBs the same name. (If you have a better way, please let me know!)
-  static unsigned BBNumber = 0;
 
   O << "\n\n";