}
O << "\";\n\n";
- O << " if (TAI->doesSupportDebugInformation()) {\n"
+ O << " if (TAI->doesSupportDebugInformation() &&\n"
+ << " DW->ShouldEmitDwarfDebug()) {\n"
<< " const MachineFunction *MF = MI->getParent()->getParent();\n"
<< " DebugLoc CurDL = MI->getDebugLoc();\n\n"
<< " if (!CurDL.isUnknown()) {\n"
<< " static DebugLocTuple PrevDLT(~0U, ~0U, ~0U);\n"
<< " DebugLocTuple CurDLT = MF->getDebugLocTuple(CurDL);\n\n"
- << " if (PrevDLT != CurDLT) {\n"
+ << " if (PrevDLT.Src != ~0U && PrevDLT != CurDLT)\n"
<< " printLabel(DW->RecordSourceLine(CurDLT.Line, CurDLT.Col,\n"
- << " CurDLT.Src));\n"
- << " PrevDLT = CurDLT;\n"
- << " }\n"
+ << " CurDLT.Src));\n\n"
+ << " PrevDLT = CurDLT;\n"
<< " }\n"
<< " }\n\n";