aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h3
-rw-r--r--lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index 105d773..f3ca306 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 processDebugLock()
+ mutable DebugLocTuple PrevDLT;
protected:
explicit AsmPrinter(raw_ostream &o, TargetMachine &TM,
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index e1c48cd..bc3af9a 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -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)