]> granicus.if.org Git - clang/commitdiff
Check column number also.
authorDevang Patel <dpatel@apple.com>
Mon, 18 Jul 2011 22:18:04 +0000 (22:18 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 18 Jul 2011 22:18:04 +0000 (22:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135437 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp
test/CodeGen/debug-info-iv.c

index c1687b38fe5c0dfbd151865a7816c10deca878fe..0008919ccc29bf87bb242eb8ab2ffefb6c806113 100644 (file)
@@ -1740,9 +1740,11 @@ void CGDebugInfo::EmitStopPoint(CGBuilderTy &Builder) {
   // 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;
index 92654738cfc5416c919ce8ae3fe7d450dc256585..55ea659fd81a2f206c9462fb3d80097d004262e3 100644 (file)
@@ -26,7 +26,7 @@ int main() {
       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];