Files
swift-mirror/test/DebugInfo/linetable-cleanups.swift
Adrian Prantl d40c6e15a8 Debug info: Assign the location of the terminator to cleanups.
Yay! Less hacky.
<rdar://problem/15510646> Current line seems incorrect after single stepping from breakpoint

Swift SVN r10664
2013-11-22 19:39:14 +00:00

18 lines
592 B
Swift

// RUN: %swift -triple x86_64-apple-darwin10 %s -emit-llvm -g -o - | FileCheck %s
func main() {
var b = [0,1,13]
for element in b {
println("element = \(element)")
}
println("Done with the for loop")
// CHECK: call void @_TSs7printlnFT3valSS_T_
// CHECK: call void @_TSs7printlnFT3valSS_T_
// The cleanups should share the line number with the ret stmt.
// CHECK-NEXT: call void @swift_release(%swift.refcounted* %{{.*}}) #1, !dbg ![[CLEANUPS:.*]]
// CHECK-NEXT: ret void, !dbg ![[CLEANUPS]]
// CHECK: ![[CLEANUPS]] = metadata !{i32 [[@LINE+1]], i32 1,
}
main()