diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-02-03 00:55:04 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-02-03 00:55:04 +0000 |
commit | e3c78361d33bf4986937eb4699169053495e38d2 (patch) | |
tree | e293a05ad5cc8168bcea88b18a7a87b901c33900 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | |
parent | f1163e9a4db9ea6c41b6795821eae69de706fd60 (diff) | |
download | bcm5719-llvm-e3c78361d33bf4986937eb4699169053495e38d2.tar.gz bcm5719-llvm-e3c78361d33bf4986937eb4699169053495e38d2.zip |
Create DebugLoc information in FastISel. Several temporary methods were
created. Specifically, those BuildMIs which use
"DebugLoc::getUnknownLoc()". I'll remove them soon.
llvm-svn: 63584
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp index 9057775a5cd..dd631af91fd 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp @@ -3884,14 +3884,16 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) { DICompileUnit CompileUnit = Subprogram.getCompileUnit(); unsigned SrcFile = DW->RecordSource(CompileUnit.getDirectory(), CompileUnit.getFilename()); + // Record the source line but does not create a label for the normal // function start. It will be emitted at asm emission time. However, // create a label if this is a beginning of inlined function. unsigned Line = Subprogram.getLineNumber(); - unsigned LabelID = - DW->RecordSourceLine(Line, 0, SrcFile); + unsigned LabelID = DW->RecordSourceLine(Line, 0, SrcFile); + if (DW->getRecordSourceLineCount() != 1) DAG.setRoot(DAG.getLabel(ISD::DBG_LABEL, getRoot(), LabelID)); + setCurDebugLoc(DebugLoc::get(DAG.getMachineFunction(). getOrCreateDebugLocID(SrcFile, Line, 0))); } |