mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Change the contract between Swift compiler and LLDB about how the function
prologue is handled in the line table. We now mark the first instruction after the stack setup as end_prologue and any further initilizations (which may include function calls to metadata accessors) with line 0 which lldb will skip. This allows swiftc to emit debug info for compiler-generated functions such as metadata accessors. Mixing debug and non-debug functions is not very well supported by LLVM and the resulting line table makes it impossible for LLDB to determine where a function with debug info ends and a nondebug function starts. rdar://problem/23042642 Swift SVN r32816
This commit is contained in:
@@ -6,10 +6,10 @@ class A {
|
||||
var a : A?
|
||||
// CHECK: define {{.*}}1AcfMS0_FT_S0_
|
||||
init() {
|
||||
// This store should be part of the function prologue.
|
||||
// CHECK: store {{.*}} %0, {{.*}}, align
|
||||
// CHECK-NOT: !dbg
|
||||
// CHECK: call {{.*}}llvm.dbg.declare
|
||||
// This store that sets up the stack slot should be on line 0 so
|
||||
// the debugger may skip ahead.
|
||||
// CHECK: store {{.*}} %0, {{.*}}, !dbg ![[DBG:[0-9]+]]
|
||||
// CHECK: ![[DBG]] = {{.*}}line: 0
|
||||
markUsed("Hi")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user