aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-04-08 19:47:04 +0000
committerDevang Patel <dpatel@apple.com>2009-04-08 19:47:04 +0000
commit0f78feaecf91143b498e22cbbf860fd0e40d9671 (patch)
tree9d9f2353d74ab59f171c7c39950cb78a59e6ce10 /lib/CodeGen
parentda9ae6088b9543134a6561a412b79530e290408d (diff)
Use presumed location to get line number info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CGDebugInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp
index 45ceb2b8e6..0d13299574 100644
--- a/lib/CodeGen/CGDebugInfo.cpp
+++ b/lib/CodeGen/CGDebugInfo.cpp
@@ -609,7 +609,7 @@ void CGDebugInfo::EmitFunctionStart(const char *Name, QualType ReturnType,
// 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 @@ void CGDebugInfo::EmitStopPoint(llvm::Function *Fn, CGBuilderTy &Builder) {
// 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());
}