Skip to content

Commit 27c4f07

Browse files
authored
Merge pull request #17822 from cwakamo/remove-dollar-from-playgrounds-4.2
[4.2] [PlaygroundTransform] Replace "$builtin" with "__builtin".
2 parents 873416f + 63d5d3d commit 27c4f07

35 files changed

+223
-223
lines changed

lib/Sema/PlaygroundTransform.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ class Instrumenter : InstrumenterBase {
705705
PatternBindingDecl *&ArgPattern,
706706
VarDecl *&ArgVariable) {
707707
const char *LoggerName =
708-
isDebugPrint ? "$builtin_debugPrint" : "$builtin_print";
708+
isDebugPrint ? "__builtin_debugPrint" : "__builtin_print";
709709

710710
UnresolvedDeclRefExpr *LoggerRef = new (Context) UnresolvedDeclRefExpr(
711711
Context.getIdentifier(LoggerName), DeclRefKind::Ordinary,
@@ -724,7 +724,7 @@ class Instrumenter : InstrumenterBase {
724724
}
725725

726726
Added<Stmt *> logPostPrint(SourceRange SR) {
727-
return buildLoggerCallWithArgs("$builtin_postPrint",
727+
return buildLoggerCallWithArgs("__builtin_postPrint",
728728
MutableArrayRef<Expr *>(), SR);
729729
}
730730

@@ -780,7 +780,7 @@ class Instrumenter : InstrumenterBase {
780780

781781
Expr *LoggerArgExprs[] = {*E, NameExpr, IDExpr};
782782

783-
return buildLoggerCallWithArgs("$builtin_log_with_id",
783+
return buildLoggerCallWithArgs("__builtin_log_with_id",
784784
MutableArrayRef<Expr *>(LoggerArgExprs), SR);
785785
}
786786

@@ -794,7 +794,7 @@ class Instrumenter : InstrumenterBase {
794794

795795
Added<Stmt *> buildScopeCall(SourceRange SR, bool IsExit) {
796796
const char *LoggerName =
797-
IsExit ? "$builtin_log_scope_exit" : "$builtin_log_scope_entry";
797+
IsExit ? "__builtin_log_scope_exit" : "__builtin_log_scope_entry";
798798

799799
return buildLoggerCallWithArgs(LoggerName, MutableArrayRef<Expr *>(), SR);
800800
}
@@ -870,7 +870,7 @@ class Instrumenter : InstrumenterBase {
870870
AccessSemantics::Ordinary, Apply->getType());
871871

872872
UnresolvedDeclRefExpr *SendDataRef = new (Context)
873-
UnresolvedDeclRefExpr(Context.getIdentifier("$builtin_send_data"),
873+
UnresolvedDeclRefExpr(Context.getIdentifier("__builtin_send_data"),
874874
DeclRefKind::Ordinary, DeclNameLoc());
875875

876876
SendDataRef->setImplicit(true);

test/PCMacro/Inputs/SilentPlaygroundsRuntime.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,27 @@ class LogRecord {
3535
}
3636
}
3737

38-
func $builtin_log<T>(_ object : T, _ name : String, _ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
39-
return LogRecord(api:"$builtin_log", object:object, name:name, range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
38+
func __builtin_log<T>(_ object : T, _ name : String, _ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
39+
return LogRecord(api:"__builtin_log", object:object, name:name, range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
4040
}
4141

42-
func $builtin_log_with_id<T>(_ object : T, _ name : String, _ id : Int, _ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
43-
return LogRecord(api:"$builtin_log", object:object, name:name, id:id, range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
42+
func __builtin_log_with_id<T>(_ object : T, _ name : String, _ id : Int, _ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
43+
return LogRecord(api:"__builtin_log", object:object, name:name, id:id, range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
4444
}
4545

46-
func $builtin_log_scope_entry(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
47-
return LogRecord(api:"$builtin_log_scope_entry", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
46+
func __builtin_log_scope_entry(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
47+
return LogRecord(api:"__builtin_log_scope_entry", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
4848
}
4949

50-
func $builtin_log_scope_exit(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
51-
return LogRecord(api:"$builtin_log_scope_exit", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
50+
func __builtin_log_scope_exit(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
51+
return LogRecord(api:"__builtin_log_scope_exit", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
5252
}
5353

54-
func $builtin_postPrint(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
55-
return LogRecord(api:"$builtin_postPrint", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
54+
func __builtin_postPrint(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
55+
return LogRecord(api:"__builtin_postPrint", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
5656
}
5757

58-
func $builtin_send_data(_ object:AnyObject?) {
58+
func __builtin_send_data(_ object:AnyObject?) {
5959
let would_print = ((object as! LogRecord).text)
6060
}
6161

test/PCMacro/didset.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PCMacro/else.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PCMacro/elseif.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88
// XFAIL: *

test/PCMacro/for.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PCMacro/func_decls.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PCMacro/func_throw_notype.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88
// XFAIL: *

test/PCMacro/getset.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88
// XFAIL: *

test/PCMacro/if.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PCMacro/init.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88
// XFAIL: *

test/PCMacro/mutation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PCMacro/operators.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PCMacro/pc_and_log.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp %s %t/main.swift
3-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground-high-performance -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/../PlaygroundTransform/Inputs/PlaygroundsRuntime.swift
3+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground-high-performance -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/../PlaygroundTransform/Inputs/PlaygroundsRuntime.swift
44
// RUN: %target-run %t/main | %FileCheck %s
55
// REQUIRES: executable_test
66

@@ -20,9 +20,9 @@ foo(1)
2020
// CHECK-NEXT: [15:1-15:27] pc after
2121
// CHECK-NEXT: [16:3-16:16] pc before
2222
// CHECK-NEXT: [16:3-16:16] pc after
23-
// CHECK-NEXT: [16:10-16:11] $builtin_log[='true']
23+
// CHECK-NEXT: [16:10-16:11] __builtin_log[='true']
2424
// this next result is unexpected...
25-
// CHECK-NEXT: [19:1-19:7] $builtin_log[='true']
25+
// CHECK-NEXT: [19:1-19:7] __builtin_log[='true']
2626
// CHECK-NEXT: [19:1-19:7] pc after
2727
// now for the array
2828
// CHECK-NEXT: [20:1-20:17] pc before
@@ -31,18 +31,18 @@ foo(1)
3131
// CHECK-NEXT: [16:3-16:16] pc before
3232
// CHECK-NEXT: [16:3-16:16] pc after
3333
// this next result is unexpected...
34-
// CHECK-NEXT: [16:10-16:11] $builtin_log[='true']
34+
// CHECK-NEXT: [16:10-16:11] __builtin_log[='true']
3535
// CHECK-NEXT: [15:1-15:27] pc before
3636
// CHECK-NEXT: [15:1-15:27] pc after
3737
// CHECK-NEXT: [16:3-16:16] pc before
3838
// CHECK-NEXT: [16:3-16:16] pc after
3939
// this next result is unexpected...
40-
// CHECK-NEXT: [16:10-16:11] $builtin_log[='false']
40+
// CHECK-NEXT: [16:10-16:11] __builtin_log[='false']
4141
// CHECK-NEXT: [15:1-15:27] pc before
4242
// CHECK-NEXT: [15:1-15:27] pc after
4343
// CHECK-NEXT: [16:3-16:16] pc before
4444
// CHECK-NEXT: [16:3-16:16] pc after
4545
// this next result is unexpected...
46-
// CHECK-NEXT: [16:10-16:11] $builtin_log[='false']
47-
// CHECK-NEXT: [20:1-20:17] $builtin_log[='[true, false, false]']
46+
// CHECK-NEXT: [16:10-16:11] __builtin_log[='false']
47+
// CHECK-NEXT: [20:1-20:17] __builtin_log[='[true, false, false]']
4848
// CHECK-NEXT: [20:1-20:17] pc after

test/PCMacro/plus_equals.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PCMacro/switch.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: cp %s %t/main.swift
33
// RUN: %target-build-swift -Xfrontend -pc-macro -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PCMacroRuntime.swift %t/main.swift %S/Inputs/SilentPlaygroundsRuntime.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

test/PlaygroundTransform/Inputs/PlaygroundsRuntime.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,27 @@ class LogRecord {
3535
}
3636
}
3737

38-
func $builtin_log<T>(_ object : T, _ name : String, _ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
39-
return LogRecord(api:"$builtin_log", object:object, name:name, range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
38+
func __builtin_log<T>(_ object : T, _ name : String, _ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
39+
return LogRecord(api:"__builtin_log", object:object, name:name, range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
4040
}
4141

42-
func $builtin_log_with_id<T>(_ object : T, _ name : String, _ id : Int, _ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
43-
return LogRecord(api:"$builtin_log", object:object, name:name, id:id, range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
42+
func __builtin_log_with_id<T>(_ object : T, _ name : String, _ id : Int, _ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
43+
return LogRecord(api:"__builtin_log", object:object, name:name, id:id, range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
4444
}
4545

46-
func $builtin_log_scope_entry(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
47-
return LogRecord(api:"$builtin_log_scope_entry", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
46+
func __builtin_log_scope_entry(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
47+
return LogRecord(api:"__builtin_log_scope_entry", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
4848
}
4949

50-
func $builtin_log_scope_exit(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
51-
return LogRecord(api:"$builtin_log_scope_exit", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
50+
func __builtin_log_scope_exit(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
51+
return LogRecord(api:"__builtin_log_scope_exit", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
5252
}
5353

54-
func $builtin_postPrint(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
55-
return LogRecord(api:"$builtin_postPrint", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
54+
func __builtin_postPrint(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) -> AnyObject? {
55+
return LogRecord(api:"__builtin_postPrint", range : SourceRange(sl:sl, el:el, sc:sc, ec:ec))
5656
}
5757

58-
func $builtin_send_data(_ object:AnyObject?) {
58+
func __builtin_send_data(_ object:AnyObject?) {
5959
print((object as! LogRecord).text)
6060
}
6161

test/PlaygroundTransform/array.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp %s %t/main.swift
3-
// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift
3+
// RUN: %target-build-swift -Xfrontend -playground -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// 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
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PlaygroundsRuntime.swift %S/Inputs/SilentPCMacroRuntime.swift %t/main.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88

99
var foo = [true, false]
1010
foo.append(true)
11-
// CHECK: [{{.*}}] $builtin_log[foo='[true, false]']
12-
// CHECK-NEXT: [{{.*}}] $builtin_log[foo='[true, false, true]']
11+
// CHECK: [{{.*}}] __builtin_log[foo='[true, false]']
12+
// CHECK-NEXT: [{{.*}}] __builtin_log[foo='[true, false, true]']
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %empty-directory(%t)
22
// RUN: cp %s %t/main.swift
3-
// RUN: %target-build-swift -Xfrontend -playground -Xfrontend -debugger-support -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift
3+
// RUN: %target-build-swift -Xfrontend -playground -o %t/main %S/Inputs/PlaygroundsRuntime.swift %t/main.swift
44
// RUN: %target-run %t/main | %FileCheck %s
5-
// 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
5+
// RUN: %target-build-swift -Xfrontend -pc-macro -Xfrontend -playground -o %t/main %S/Inputs/PlaygroundsRuntime.swift %S/Inputs/SilentPCMacroRuntime.swift %t/main.swift
66
// RUN: %target-run %t/main | %FileCheck %s
77
// REQUIRES: executable_test
88
struct S {
@@ -17,14 +17,14 @@ var s = S()
1717
s.a = [3,2]
1818
s.a.append(300)
1919

20-
// CHECK: [{{.*}}] $builtin_log[s='S(a: [])']
21-
// CHECK-NEXT: [{{.*}}] $builtin_log_scope_entry
20+
// CHECK: [{{.*}}] __builtin_log[s='S(a: [])']
21+
// CHECK-NEXT: [{{.*}}] __builtin_log_scope_entry
2222
// CHECK-NEXT: Set
23-
// CHECK-NEXT: [{{.*}}] $builtin_postPrint
24-
// CHECK-NEXT: [{{.*}}] $builtin_log_scope_exit
25-
// CHECK-NEXT: [{{.*}}] $builtin_log[s='S(a: [3, 2])']
26-
// CHECK-NEXT: [{{.*}}] $builtin_log_scope_entry
23+
// CHECK-NEXT: [{{.*}}] __builtin_postPrint
24+
// CHECK-NEXT: [{{.*}}] __builtin_log_scope_exit
25+
// CHECK-NEXT: [{{.*}}] __builtin_log[s='S(a: [3, 2])']
26+
// CHECK-NEXT: [{{.*}}] __builtin_log_scope_entry
2727
// CHECK-NEXT: Set
28-
// CHECK-NEXT: [{{.*}}] $builtin_postPrint
29-
// CHECK-NEXT: [{{.*}}] $builtin_log_scope_exit
30-
// CHECK-NEXT: [{{.*}}] $builtin_log[a='[3, 2, 300]']
28+
// CHECK-NEXT: [{{.*}}] __builtin_postPrint
29+
// CHECK-NEXT: [{{.*}}] __builtin_log_scope_exit
30+
// CHECK-NEXT: [{{.*}}] __builtin_log[a='[3, 2, 300]']

0 commit comments

Comments
 (0)