summaryrefslogtreecommitdiffstats
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
commit2ac33a08d5ee5052002eee10a8dede7221819414 (patch)
treefcbc2bcb4b8d2e905f78c1a9c14a611db775fc48
parent5451c60f5a0d663ada3f4e75564a5c5eec50cfd9 (diff)
downloadbcm5719-llvm-2ac33a08d5ee5052002eee10a8dede7221819414.tar.gz
bcm5719-llvm-2ac33a08d5ee5052002eee10a8dede7221819414.zip
Use presumed location to get line number info.
llvm-svn: 68630
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 45ceb2b8e68..0d13299574b 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/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());
}
OpenPOWER on IntegriCloud