[llvm-commits] [llvm] r65194 - /llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp

Bill Wendling isanbard at gmail.com
Fri Feb 20 14:36:01 PST 2009


Author: void
Date: Fri Feb 20 16:36:01 2009
New Revision: 65194

URL: http://llvm.org/viewvc/llvm-project?rev=65194&view=rev
Log:
Pull r65180 into Dib:

We have logic in there to emit a default debugging label at the beginning of a
function. Emitting another label after the prologue messes up the debugging. We
are doing that because the first DebugLoc object it sees is different from the
previous, which was nothing. Check for this situation, and don't emit one if
it's the first.

Modified:
    llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp

Modified: llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp?rev=65194&r1=65193&r2=65194&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/branches/Apple/Dib/utils/TableGen/AsmWriterEmitter.cpp Fri Feb 20 16:36:01 2009
@@ -647,11 +647,10 @@
     << "    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";
 





More information about the llvm-commits mailing list