mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
- If any of the `-g<kind>` flag is given -- except `-gnone`, debug info will be printed into every generated SIL files. - The `-gsil` is deprecated in favor of `-sil-based-debuginfo`. The SILDebugInfoGenerator Pass now generates intermediate SIL file with name "<output file>.sil_dbg_<n>.sil". Other functionalities of that Pass remain the same.
14 lines
601 B
Swift
14 lines
601 B
Swift
// Just a simple test to see whether debug info is printed to SIL
|
|
// if any of the '-g<kind>' (except '-gnone') is given.
|
|
|
|
// RUN: %target-swift-frontend -emit-sil -gnone %s | %FileCheck --check-prefix=CHECK-GNONE %s
|
|
// RUN: %target-swift-frontend -emit-sil -gline-tables-only %s | %FileCheck %s
|
|
// RUN: %target-swift-frontend -emit-sil -g %s | %FileCheck %s
|
|
|
|
func foo(x: Int, y: Int) -> Int {
|
|
// CHECK: struct_extract
|
|
// CHECK-SAME: loc "{{.*}}.swift":{{[0-9]+}}:{{[0-9]+}}, scope {{[0-9]+}}
|
|
// CHECK-GNONE-NOT: loc "{{.*}}.swift":{{[0-9]+}}:{{[0-9]+}}, scope {{[0-9]+}}
|
|
x + y
|
|
}
|