We have logic in there to emit a default debugging label at the beginning of a
[oota-llvm.git] / utils / TableGen / AsmWriterEmitter.cpp
index 4736cca77bd28810bf1f4541498e0cb1446a433b..06495d883414e0003f24fb80e723c59cbedbbc9d 100644 (file)
@@ -647,11 +647,10 @@ void AsmWriterEmitter::run(std::ostream &O) {
     << "    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";