forked from OSchip/llvm-project
Use presumed location to get line number info.
llvm-svn: 68630
This commit is contained in:
parent
5451c60f5a
commit
2ac33a08d5
|
@ -609,7 +609,7 @@ void CGDebugInfo::EmitFunctionStart(const char *Name, QualType ReturnType,
|
||||||
// FIXME: Why is this using CurLoc???
|
// FIXME: Why is this using CurLoc???
|
||||||
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
|
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
|
||||||
SourceManager &SM = M->getContext().getSourceManager();
|
SourceManager &SM = M->getContext().getSourceManager();
|
||||||
unsigned LineNo = SM.getInstantiationLineNumber(CurLoc);
|
unsigned LineNo = SM.getPresumedLoc(CurLoc).getLine();
|
||||||
|
|
||||||
llvm::DISubprogram SP =
|
llvm::DISubprogram SP =
|
||||||
DebugFactory.CreateSubprogram(Unit, Name, Name, "", Unit, LineNo,
|
DebugFactory.CreateSubprogram(Unit, Name, Name, "", Unit, LineNo,
|
||||||
|
@ -639,8 +639,8 @@ void CGDebugInfo::EmitStopPoint(llvm::Function *Fn, CGBuilderTy &Builder) {
|
||||||
|
|
||||||
// Get the appropriate compile unit.
|
// Get the appropriate compile unit.
|
||||||
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
|
llvm::DICompileUnit Unit = getOrCreateCompileUnit(CurLoc);
|
||||||
DebugFactory.InsertStopPoint(Unit, SM.getInstantiationLineNumber(CurLoc),
|
PresumedLoc PLoc = SM.getPresumedLoc(CurLoc);
|
||||||
SM.getInstantiationColumnNumber(CurLoc),
|
DebugFactory.InsertStopPoint(Unit, PLoc.getLine(), PLoc.getColumn(),
|
||||||
Builder.GetInsertBlock());
|
Builder.GetInsertBlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue