Privatize some more debug-related static data.
authorOwen Anderson <resistor@mac.com>
Thu, 25 Jun 2009 16:55:32 +0000 (16:55 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 25 Jun 2009 16:55:32 +0000 (16:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74179 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index 105d7730407f20f97005a6eee62bfa9751bfc278..f3ca30658773b1b2fa019a10f4d7c480a0eefaf4 100644 (file)
@@ -114,6 +114,9 @@ namespace llvm {
     mutable const MachineInstr *LastMI;
     mutable const Function *LastFn;
     mutable unsigned Counter;
+    
+    // Private state for processDebugLock()
+    mutable DebugLocTuple PrevDLT;
 
   protected:
     explicit AsmPrinter(raw_ostream &o, TargetMachine &TM,
index e1c48cdae4b44b16255d1485e17682c93f90cade..bc3af9a86c39e17ac3dc3f74512ffc7166969d4b 100644 (file)
@@ -45,7 +45,8 @@ AsmPrinter::AsmPrinter(raw_ostream &o, TargetMachine &tm,
                        const TargetAsmInfo *T, CodeGenOpt::Level OL, bool VDef)
   : MachineFunctionPass(&ID), FunctionNumber(0), OptLevel(OL), O(o),
     TM(tm), TAI(T), TRI(tm.getRegisterInfo()),
-    IsInTextSection(false), LastMI(0), LastFn(0), Counter(~0U) {
+    IsInTextSection(false), LastMI(0), LastFn(0), Counter(~0U),
+    PrevDLT(0, ~0U, ~0U) {
   DW = 0; MMI = 0;
   switch (AsmVerbose) {
   case cl::BOU_UNSET: VerboseAsm = VDef;  break;
@@ -1338,7 +1339,6 @@ void AsmPrinter::PrintSpecial(const MachineInstr *MI, const char *Code) const {
 void AsmPrinter::processDebugLoc(DebugLoc DL) {
   if (TAI->doesSupportDebugInformation() && DW->ShouldEmitDwarfDebug()) {
     if (!DL.isUnknown()) {
-      static DebugLocTuple PrevDLT(0, ~0U, ~0U);
       DebugLocTuple CurDLT = MF->getDebugLocTuple(DL);
 
       if (CurDLT.CompileUnit != 0 && PrevDLT != CurDLT)