On Jul 18, 2011, at 5:29 PM, Chris Lattner wrote: > > On Jul 18, 2011, at 3:18 PM, Devang Patel wrote: > >> 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; > > Hi Devang, > > This is a really inefficient way to do this. Please call > SM.getInstantiationLoc(CurLoc) and SM.getInstantiationLoc(PrevLoc) once and > then use equality comparison. > ok, I'll fix it soon. - Devang
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
