Files
swift-mirror/test/SIL/Parser/sil_scope_inline_fn.sil
Erik Eckstein d4db9b8099 SILPrinter: make the printing of debug info optional.
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.
2017-04-20 09:18:08 -07:00

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
}