commit | 9cd02c5e750dea8637fe300b27a0bf14a53e22bd | [log] [tgz] |
---|---|---|
author | Devang Patel <dpatel@apple.com> | Mon Oct 12 23:10:55 2009 +0000 |
committer | Devang Patel <dpatel@apple.com> | Mon Oct 12 23:10:55 2009 +0000 |
tree | 26bc823939ead7bed00afe2e6cb99f07d18093e6 | |
parent | 7bbbc7d65719ff18592a21cb2246e7fa68e213d4 [diff] [blame] |
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
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index a232d82..ae98da5 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -385,6 +385,8 @@ DILocation DILoc(Dbg); DebugLoc Loc = ExtractDebugLocation(DILoc, MF->getDebugLocInfo()); SDL->setCurDebugLoc(Loc); + if (MF->getDefaultDebugLoc().isUnknown()) + MF->setDefaultDebugLoc(Loc); } } if (!isa<TerminatorInst>(I))