mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
With the option -sil-print-debuginfo the printing of debug locations and scopes can be enabled. I made the default for the option “false”, because in 99% of the time I don’t need the debug info in the printed SIL and I prefer better readability.
18 lines
780 B
Plaintext
18 lines
780 B
Plaintext
// RUN: %target-sil-opt -sil-print-debuginfo -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -O %s | %FileCheck %s
|
|
|
|
sil_scope 1 { loc "foo.sil":3:4 parent @foo : $@convention(thin) () -> () }
|
|
sil_scope 2 { loc "foo.sil":3:4 parent 1 }
|
|
sil_scope 3 { loc "bar.swift":1:2 parent @bar : $@convention(thin) () -> () }
|
|
sil_scope 4 { loc "bar.swift":1:2 parent 3 inlined_at 2 }
|
|
|
|
// CHECK: sil_scope 1 { loc "bar.swift":1:2 parent @bar : $@convention(thin) () -> () }
|
|
// CHECK: sil_scope 2 { loc "foo.sil":3:4 parent @foo : $@convention(thin) () -> () }
|
|
// CHECK: sil_scope 3 { loc "foo.sil":3:4 parent 2 }
|
|
// CHECK: sil_scope 4 { loc "bar.swift":1:2 parent 1 inlined_at 3 }
|
|
|
|
// foo
|
|
sil @foo : $@convention(thin) () -> () {
|
|
bb0:
|
|
return undef : $(), scope 4 // id: %1
|
|
}
|