File tree Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Expand file tree Collapse file tree 3 files changed +70
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: cp %s %t/main.swift
3
+ // RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
4
+ // RUN: %target-build-swift -Xfrontend -playground -o %t/main -I=%t %t/PlaygroundSupport.o %t/main.swift
5
+ // RUN: %target-codesign %t/main
6
+ // RUN: %target-run %t/main | %FileCheck %s
7
+ // RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main2 -I=%t %t/PlaygroundSupport.o %t/main.swift -module-name main
8
+ // RUN: %target-codesign %t/main2
9
+ // RUN: %target-run %t/main2 | %FileCheck %s
10
+ // REQUIRES: executable_test
11
+
12
+ import PlaygroundSupport
13
+
14
+ struct A: ~ Copyable { }
15
+
16
+ var a : A
17
+ a = A ( )
18
+
19
+ struct B { }
20
+
21
+ var b : B
22
+ b = B ( )
23
+ // note: a should not be logged (at least until move-only types can be passed to the generic logging functions)
24
+ // CHECK: [{{.*}}] __builtin_log[b='B()']
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: cp %s %t/main.swift
3
+ // RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
4
+ // RUN: %target-build-swift -Xfrontend -playground -o %t/main -I=%t %t/PlaygroundSupport.o %t/main.swift
5
+ // RUN: %target-codesign %t/main
6
+ // RUN: %target-run %t/main | %FileCheck %s
7
+ // RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main2 -I=%t %t/PlaygroundSupport.o %t/main.swift -module-name main
8
+ // RUN: %target-codesign %t/main2
9
+ // RUN: %target-run %t/main2 | %FileCheck %s
10
+ // REQUIRES: executable_test
11
+
12
+ import PlaygroundSupport
13
+
14
+ struct A: ~ Copyable { }
15
+
16
+ let a = A ( )
17
+
18
+ struct B { }
19
+
20
+ let b = B ( )
21
+ // note: a should not be logged (at least until move-only types can be passed to the generic logging functions)
22
+ // CHECK: [{{.*}}] __builtin_log[b='B()']
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: cp %s %t/main.swift
3
+ // RUN: %target-build-swift -whole-module-optimization -module-name PlaygroundSupport -emit-module-path %t/PlaygroundSupport.swiftmodule -parse-as-library -c -o %t/PlaygroundSupport.o %S/Inputs/SilentPCMacroRuntime.swift %S/Inputs/PlaygroundsRuntime.swift
4
+ // RUN: %target-build-swift -Xfrontend -playground -o %t/main -I=%t %t/PlaygroundSupport.o %t/main.swift
5
+ // RUN: %target-codesign %t/main
6
+ // RUN: %target-run %t/main | %FileCheck %s
7
+ // RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main2 -I=%t %t/PlaygroundSupport.o %t/main.swift -module-name main
8
+ // RUN: %target-codesign %t/main2
9
+ // RUN: %target-run %t/main2 | %FileCheck %s
10
+ // REQUIRES: executable_test
11
+
12
+ import PlaygroundSupport
13
+
14
+ struct A: ~ Copyable { }
15
+
16
+ func f( _ a: consuming A ) -> A {
17
+ return a
18
+ }
19
+
20
+ f ( A ( ) )
21
+ // note: a should not be logged (at least until move-only types can be passed to the generic logging functions)
22
+ // CHECK: [{{.*}}] __builtin_log_scope_entry
23
+ // CHECK-NEXT: [{{.*}}] __builtin_log_scope_exit
24
+ // CHECK-NOT: __builtin_log
You can’t perform that action at this time.
0 commit comments