mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[PlaygroundTransform] Replace "$builtin" with "__builtin".
Currently, the playground transform requires the use of dollar-identifiers as the functions are prefixed with "$builtin". This commit removes that requirement by replacing "$builtin" with "__builtin". This aligns with the PC macro. This addresses <rdar://problem/36031860>.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// RUN: %empty-directory(%t)
|
||||
// RUN: cp %s %t/main.swift
|
||||
// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift
|
||||
// RUN: %target-build-swift -Xfrontend -playground -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift
|
||||
// RUN: %target-run %t/main | %FileCheck %s
|
||||
// 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
|
||||
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PlaygroundsRuntime.swift %S/Inputs/SilentPCMacroRuntime.swift %t/main.swift
|
||||
// RUN: %target-run %t/main | %FileCheck %s
|
||||
// REQUIRES: executable_test
|
||||
|
||||
@@ -26,29 +26,29 @@ func returnSum() -> Int {
|
||||
|
||||
returnSum()
|
||||
|
||||
// CHECK-NOT: $builtin
|
||||
// CHECK: [9:{{.*}}] $builtin_log_scope_entry
|
||||
// CHECK-NEXT: [10:{{.*}}] $builtin_log[y='10']
|
||||
// CHECK-NEXT: [11:{{.*}}] $builtin_log_scope_entry
|
||||
// CHECK-NEXT: [12:{{.*}}] $builtin_log[y='15']
|
||||
// CHECK-NEXT: [11:{{.*}}] $builtin_log_scope_exit
|
||||
// CHECK-NEXT: [15:{{.*}}] $builtin_log[addAgain='{{.*}}']
|
||||
// CHECK-NEXT: [15:{{.*}}] $builtin_log_scope_entry
|
||||
// CHECK-NOT: __builtin
|
||||
// CHECK: [9:{{.*}}] __builtin_log_scope_entry
|
||||
// CHECK-NEXT: [10:{{.*}}] __builtin_log[y='10']
|
||||
// CHECK-NEXT: [11:{{.*}}] __builtin_log_scope_entry
|
||||
// CHECK-NEXT: [12:{{.*}}] __builtin_log[y='15']
|
||||
// CHECK-NEXT: [11:{{.*}}] __builtin_log_scope_exit
|
||||
// CHECK-NEXT: [15:{{.*}}] __builtin_log[addAgain='{{.*}}']
|
||||
// CHECK-NEXT: [15:{{.*}}] __builtin_log_scope_entry
|
||||
|
||||
// FIXME: We drop the log for the addition here.
|
||||
// CHECK-NEXT: [16:{{.*}}] $builtin_log[='()']
|
||||
// CHECK-NEXT: [16:{{.*}}] __builtin_log[='()']
|
||||
|
||||
// CHECK-NEXT: [15:{{.*}}] $builtin_log_scope_exit
|
||||
// CHECK-NEXT: [15:{{.*}}] __builtin_log_scope_exit
|
||||
|
||||
// FIXME: There's an extra, unbalanced scope exit here.
|
||||
// CHECK-NEXT: [9:{{.*}}] $builtin_log_scope_exit
|
||||
// CHECK-NEXT: [9:{{.*}}] __builtin_log_scope_exit
|
||||
|
||||
// CHECK-NEXT: [19:{{.*}}] $builtin_log[addMulti='{{.*}}']
|
||||
// CHECK-NEXT: [19:{{.*}}] $builtin_log_scope_entry
|
||||
// CHECK-NEXT: [20:{{.*}}] $builtin_log[y='25']
|
||||
// CHECK-NEXT: [21:{{.*}}] $builtin_log[='0']
|
||||
// CHECK-NEXT: [19:{{.*}}] $builtin_log_scope_exit
|
||||
// CHECK-NEXT: [24:{{.*}}] $builtin_log[='25']
|
||||
// CHECK-NEXT: [9:{{.*}}] $builtin_log_scope_exit
|
||||
// CHECK-NEXT: [27:{{.*}}] $builtin_log[='25']
|
||||
// CHECK-NOT: $builtin
|
||||
// CHECK-NEXT: [19:{{.*}}] __builtin_log[addMulti='{{.*}}']
|
||||
// CHECK-NEXT: [19:{{.*}}] __builtin_log_scope_entry
|
||||
// CHECK-NEXT: [20:{{.*}}] __builtin_log[y='25']
|
||||
// CHECK-NEXT: [21:{{.*}}] __builtin_log[='0']
|
||||
// CHECK-NEXT: [19:{{.*}}] __builtin_log_scope_exit
|
||||
// CHECK-NEXT: [24:{{.*}}] __builtin_log[='25']
|
||||
// CHECK-NEXT: [9:{{.*}}] __builtin_log_scope_exit
|
||||
// CHECK-NEXT: [27:{{.*}}] __builtin_log[='25']
|
||||
// CHECK-NOT: __builtin
|
||||
|
||||
Reference in New Issue
Block a user