lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 79abc34..bf1387a 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -455,7 +455,8 @@
// Don't bother if things are the same as last time.
SourceManager &SM = M->getContext().getSourceManager();
if (CurLoc == PrevLoc
- || (SM.getLineNumber(CurLoc) == SM.getLineNumber(PrevLoc)
+ || (SM.getInstantiationLineNumber(CurLoc) ==
+ SM.getInstantiationLineNumber(PrevLoc)
&& SM.isFromSameFile(CurLoc, PrevLoc)))
return;