Debug Info: Fix a backend crash by removing obsolete linetable heuristics.

Recent versions of LLDB can deal with line 0 locations much better and
due to a subtle bug in the heuristic instructions immediately following
the prologue could end up without debug locations which can cause serious
problems for the LLVM inliner when constructing inline debug scope info.

<rdar://problem/24394944>
This commit is contained in:
Adrian Prantl
2016-02-01 13:05:40 -08:00
parent f73626eb28
commit 59226f383d
5 changed files with 31 additions and 35 deletions

View File

@@ -4,8 +4,8 @@ func markUsed<T>(t: T) {}
func main() {
// CHECK: call void @llvm.dbg.declare(metadata %"protocol<>"* {{.*}}, metadata ![[S:.*]], metadata !{{[0-9]+}}), !dbg ![[DBG:.*]]
// CHECK: ![[S]] = !DILocalVariable(name: "s", {{.*}}line: [[@LINE+3]]
// CHECK: ![[SCOPE:.*]] = distinct !DILexicalBlock({{.*}}line: 5, column: 13)
// CHECK: ![[S]] = !DILocalVariable(name: "s", {{.*}}line: [[@LINE+2]]
// CHECK: ![[DBG]] = !DILocation(line: [[@LINE+1]], column: 7, scope: ![[SCOPE]])
var s: Any = "hello world"
var n: Any = 12