|
| 1 | +// RUN: rm -rf %t |
| 2 | +// RUN: mkdir -p %t |
| 3 | +// RUN: cp %s %t/main.swift |
| 4 | +// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift |
| 5 | +// RUN: %target-run %t/main | %FileCheck %s |
| 6 | +// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %S/Inputs/SilentPCMacroRuntime.swift %t/main.swift |
| 7 | +// RUN: %target-run %t/main | %FileCheck %s |
| 8 | +// REQUIRES: executable_test |
| 9 | + |
| 10 | +func id<T>(_ t: T) -> T { |
| 11 | + return t |
| 12 | +} |
| 13 | + |
| 14 | +for i in 0..<3 { |
| 15 | + _ = id(i) |
| 16 | +} |
| 17 | + |
| 18 | +// CHECK: $builtin_log_scope_entry |
| 19 | +// CHECK-NEXT: $builtin_log_scope_entry |
| 20 | +// CHECK-NEXT: $builtin_log[='0'] |
| 21 | +// CHECK-NEXT: $builtin_log_scope_exit |
| 22 | +// CHECK-NEXT: $builtin_log[='0'] |
| 23 | +// CHECK-NEXT: $builtin_log_scope_exit |
| 24 | +// CHECK-NEXT: $builtin_log_scope_entry |
| 25 | +// CHECK-NEXT: $builtin_log_scope_entry |
| 26 | +// CHECK-NEXT: $builtin_log[='1'] |
| 27 | +// CHECK-NEXT: $builtin_log_scope_exit |
| 28 | +// CHECK-NEXT: $builtin_log[='1'] |
| 29 | +// CHECK-NEXT: $builtin_log_scope_exit |
| 30 | +// CHECK-NEXT: $builtin_log_scope_entry |
| 31 | +// CHECK-NEXT: $builtin_log_scope_entry |
| 32 | +// CHECK-NEXT: $builtin_log[='2'] |
| 33 | +// CHECK-NEXT: $builtin_log_scope_exit |
| 34 | +// CHECK-NEXT: $builtin_log[='2'] |
| 35 | +// CHECK-NEXT: $builtin_log_scope_exit |
0 commit comments