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.
16 lines
693 B
Plaintext
16 lines
693 B
Plaintext
// RUN: %target-sil-opt -sil-print-debuginfo -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
|
|
|
|
// CHECK: sil_scope 1 { loc "foo.sil":12:34 parent @foo : $@convention(thin) () -> () }
|
|
sil_scope 1 { loc "foo.sil":12:34 parent @foo : $@convention(thin) () -> () }
|
|
// CHECK: sil_scope 2 { loc "foo.sil":12:34 parent 1 }
|
|
sil_scope 2 { loc "foo.sil":12:34 parent 1 }
|
|
|
|
// foo
|
|
sil @foo : $@convention(thin) () -> () {
|
|
bb0:
|
|
// CHECK: mark_function_escape undef : $*(), loc "undef.sil":3:4, scope 1
|
|
mark_function_escape undef : $*(), loc "undef.sil":3:4, scope 1
|
|
// CHECK: return undef : $(), loc {{.*}}, scope 2 // id: %1
|
|
return undef : $(), scope 2 // id: %1
|
|
}
|