[cfe-commits] r68630 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Wed Apr 8 12:47:05 PDT 2009
Author: dpatel
Date: Wed Apr 8 14:47:04 2009
New Revision: 68630
URL: http://llvm.org/viewvc/llvm-project?rev=68630&view=rev
Log:
Use presumed location to get line number info.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=68630&r1=68629&r2=68630&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Apr 8 14:47:04 2009
@@ -609,7 +609,7 @@
// FIXME: Why is this using CurLoc???
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
SourceManager &SM = M->getContext().getSourceManager();
- unsigned LineNo = SM.getInstantiationLineNumber(CurLoc);
+ unsigned LineNo = SM.getPresumedLoc(CurLoc).getLine();
llvm::DISubprogram SP =
DebugFactory.CreateSubprogram(Unit, Name, Name, "", Unit, LineNo,
@@ -639,8 +639,8 @@
// Get the appropriate compile unit.
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
- DebugFactory.InsertStopPoint(Unit, SM.getInstantiationLineNumber(CurLoc),
- SM.getInstantiationColumnNumber(CurLoc),
+ PresumedLoc PLoc = SM.getPresumedLoc(CurLoc);
+ DebugFactory.InsertStopPoint(Unit, PLoc.getLine(), PLoc.getColumn(),
Builder.GetInsertBlock());
}
More information about the cfe-commits
mailing list