diff options
author | Devang Patel <dpatel@apple.com> | 2009-10-12 23:10:55 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-10-12 23:10:55 +0000 |
commit | 1f03471a2dfb02fa39f7168244bb8c0891a56ab9 (patch) | |
tree | 26bc823939ead7bed00afe2e6cb99f07d18093e6 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 6bd266e56799703cd2773cadc4da8bc3c5107fdf (diff) |
Set default location for a function if it is not set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index a232d82acd..ae98da5ef8 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -385,6 +385,8 @@ void SelectionDAGISel::SelectBasicBlock(BasicBlock *LLVMBB, DILocation DILoc(Dbg); DebugLoc Loc = ExtractDebugLocation(DILoc, MF->getDebugLocInfo()); SDL->setCurDebugLoc(Loc); + if (MF->getDefaultDebugLoc().isUnknown()) + MF->setDefaultDebugLoc(Loc); } } if (!isa<TerminatorInst>(I)) |