From: Devang Patel Date: Mon, 18 Jul 2011 22:18:04 +0000 (+0000) Subject: Check column number also. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=478b94b9454361446a981851a00f2f92062d4b66;p=clang Check column number also. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135437 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index c1687b38fe..0008919ccc 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -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; diff --git a/test/CodeGen/debug-info-iv.c b/test/CodeGen/debug-info-iv.c index 92654738cf..55ea659fd8 100644 --- a/test/CodeGen/debug-info-iv.c +++ b/test/CodeGen/debug-info-iv.c @@ -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];