[cfe-commits] r135437 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGen/debug-info-iv.c

Devang Patel dpatel at apple.com
Mon Jul 18 15:18:04 PDT 2011


Author: dpatel
Date: Mon Jul 18 17:18:04 2011
New Revision: 135437

URL: http://llvm.org/viewvc/llvm-project?rev=135437&view=rev
Log:
Check column number also.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/test/CodeGen/debug-info-iv.c

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=135437&r1=135436&r2=135437&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Jul 18 17:18:04 2011
@@ -1740,9 +1740,11 @@
   // Don't bother if things are the same as last time.
   SourceManager &SM = CGM.getContext().getSourceManager();
   if (CurLoc == PrevLoc
-       || (SM.getInstantiationLineNumber(CurLoc) ==
-           SM.getInstantiationLineNumber(PrevLoc)
-           && SM.isFromSameFile(CurLoc, PrevLoc)))
+      || ((SM.getInstantiationLineNumber(CurLoc)
+           == SM.getInstantiationLineNumber(PrevLoc))
+          && (SM.getInstantiationColumnNumber(CurLoc) 
+              == SM.getInstantiationColumnNumber(PrevLoc))
+          && SM.isFromSameFile(CurLoc, PrevLoc)))
     // New Builder may not be in sync with CGDebugInfo.
     if (!Builder.getCurrentDebugLocation().isUnknown())
       return;

Modified: cfe/trunk/test/CodeGen/debug-info-iv.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-iv.c?rev=135437&r1=135436&r2=135437&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-iv.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-iv.c Mon Jul 18 17:18:04 2011
@@ -26,7 +26,7 @@
       Array[i][j] = 0;
   test_indvars(Array[0], Array);
 
-//CHECK:	.loc	2 30 3
+//CHECK:	.loc	2 30 8
   for (i=0; i < 100; i+=2)
     for (j=0; j < 200; j++)
       sum += Array[i][j];





More information about the cfe-commits mailing list