mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Before this patch every Swift function would contain a top-level DW_TAG_lexical_scope that didn't provide any useful information, used extra space in the debug info and prevented local variables from showing up in virtual async backtraces.
15 lines
535 B
Swift
15 lines
535 B
Swift
// REQUIRES: optimized_stdlib
|
|
|
|
// RUN: %target-swift-frontend -emit-sil -o /dev/null \
|
|
// RUN: %s -Xllvm -sil-print-debuginfo -Onone -sil-verify-all \
|
|
// RUN: -Xllvm -sil-print-after=diagnostic-constant-propagation \
|
|
// RUN: 2>&1 | %FileCheck %s
|
|
|
|
// CHECK: alloc_stack $R, loc {{.*}}, scope 1
|
|
// CHECK-NEXT: init_existential_addr {{.*}} : $*R, $Float, loc {{.*}}, scope 1
|
|
// CHECK-NEXT: copy_addr [take] %8 to [initialization] {{.*}} : $*Float, loc {{.*}}, scope 1
|
|
|
|
protocol R {}
|
|
extension Float: R {}
|
|
print(1.0 as Float? as! R)
|