Skip to content

Commit 814e656

Browse files
authored
Merge pull request #19388 from eeckstein/mangling-prefix
change mangling prefix from $S to $s
2 parents 7d78b09 + 39bb14b commit 814e656

File tree

895 files changed

+10841
-10841
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

895 files changed

+10841
-10841
lines changed

include/swift/Demangling/ManglingMacros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define MANGLE_AS_STRING(M) STRINGIFY_MANGLING(M)
1818

1919
/// The mangling prefix for the new mangling.
20-
#define MANGLING_PREFIX $S
20+
#define MANGLING_PREFIX $s
2121

2222
#define MANGLING_PREFIX_STR MANGLE_AS_STRING(MANGLING_PREFIX)
2323

test/APINotes/versioned-test-mangling.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %empty-directory(%t)
22

3-
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 4 -find-mangled '$SSo11SomeCStructV' | %FileCheck -check-prefix=CHECK-TOP-ALIAS-4 %s
4-
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 5 -find-mangled '$SSo11SomeCStructV' | %FileCheck -check-prefix=CHECK-TOP-ALIAS-5 %s
3+
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 4 -find-mangled '$sSo11SomeCStructV' | %FileCheck -check-prefix=CHECK-TOP-ALIAS-4 %s
4+
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 5 -find-mangled '$sSo11SomeCStructV' | %FileCheck -check-prefix=CHECK-TOP-ALIAS-5 %s
55

6-
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 4 -find-mangled '$SSo13InnerInSwift5V' | %FileCheck -check-prefix=CHECK-NESTED-ALIAS-4 %s
7-
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 5 -find-mangled '$SSo13InnerInSwift5V' | %FileCheck -check-prefix=CHECK-NESTED-ALIAS-5 %s
6+
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 4 -find-mangled '$sSo13InnerInSwift5V' | %FileCheck -check-prefix=CHECK-NESTED-ALIAS-4 %s
7+
// RUN: %target-swift-ide-test -F %S/Inputs/custom-frameworks -print-ast-typechecked -source-filename %s -swift-version 5 -find-mangled '$sSo13InnerInSwift5V' | %FileCheck -check-prefix=CHECK-NESTED-ALIAS-5 %s
88

99
import APINotesFrameworkTest
1010

test/APINotes/versioned.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,14 @@ func testRenamedOptionyEnum() {
251251
#if !swift(>=5)
252252

253253
func useSwift4Name(_: ImportantCStruct) {}
254-
// CHECK-SILGEN-4: sil hidden @$S9versioned13useSwift4NameyySo11SomeCStructVF
254+
// CHECK-SILGEN-4: sil hidden @$s9versioned13useSwift4NameyySo11SomeCStructVF
255255

256256
func useNewlyNested(_: InnerInSwift5) {}
257-
// CHECK-SILGEN-4: sil hidden @$S9versioned14useNewlyNestedyySo13InnerInSwift5VF
257+
// CHECK-SILGEN-4: sil hidden @$s9versioned14useNewlyNestedyySo13InnerInSwift5VF
258258
#endif
259259

260260
func useSwift5Name(_: VeryImportantCStruct) {}
261-
// CHECK-SILGEN: sil hidden @$S9versioned13useSwift5NameyySo11SomeCStructVF
261+
// CHECK-SILGEN: sil hidden @$s9versioned13useSwift5NameyySo11SomeCStructVF
262262

263263

264264

test/ClangImporter/MixedSource/forward-declarations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/forward-declarations-other.swift -import-objc-header %S/Inputs/forward-declarations.h -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name main | %FileCheck %s
22

33
class Sub: Base {
4-
// CHECK-LABEL: define{{.*}} void @"$S4main3SubC4testyyF"
4+
// CHECK-LABEL: define{{.*}} void @"$s4main3SubC4testyyF"
55
func test() {
66
// CHECK: [[BASE_SELF:%.+]] = bitcast %T4main3SubC* %0 to %TSo4BaseC*
77
// CHECK: [[SELECTOR:%.+]] = load i8*, i8** @"\01L_selector(getClassInstanceWithoutMentioningItsName)"

test/ClangImporter/attr-swift_private.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,17 @@ public func testTopLevel() {
9191
#endif
9292
}
9393

94-
// CHECK-LABEL: define linkonce_odr hidden swiftcc %swift.metadata_response @"$SSo10PrivFooSubCMa{{.*}} {
94+
// CHECK-LABEL: define linkonce_odr hidden swiftcc %swift.metadata_response @"$sSo10PrivFooSubCMa{{.*}} {
9595
// CHECK: %objc_class** @"\01l_OBJC_CLASS_REF_$_PrivFooSub"
9696
// CHECK: }
9797

98-
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @"$SSo3BarC8__noArgsABSgyt_tcfcTO"
98+
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @"$sSo3BarC8__noArgsABSgyt_tcfcTO"
9999
// CHECK: @"\01L_selector(initWithNoArgs)"
100-
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @"$SSo3BarC8__oneArgABSgs5Int32V_tcfcTO"
100+
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @"$sSo3BarC8__oneArgABSgs5Int32V_tcfcTO"
101101
// CHECK: @"\01L_selector(initWithOneArg:)"
102-
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @"$SSo3BarC9__twoArgs5otherABSgs5Int32V_AGtcfcTO"
102+
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @"$sSo3BarC9__twoArgs5otherABSgs5Int32V_AGtcfcTO"
103103
// CHECK: @"\01L_selector(initWithTwoArgs:other:)"
104-
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @"$SSo3BarC2__ABSgs5Int32V_tcfcTO"
104+
// CHECK-LABEL: define linkonce_odr hidden {{.+}} @"$sSo3BarC2__ABSgs5Int32V_tcfcTO"
105105
// CHECK: @"\01L_selector(init:)"
106106

107107
_ = __PrivAnonymousA

test/ClangImporter/ctypes_ir.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44

55
import ctypes
66

7-
// CHECK-LABEL: define hidden swiftcc void @"$S9ctypes_ir9testColoryyF"
7+
// CHECK-LABEL: define hidden swiftcc void @"$s9ctypes_ir9testColoryyF"
88
func testColor() {
99
// CHECK: store i32 1
1010
var c : Color = green
1111
}
1212

13-
// CHECK-LABEL: define hidden swiftcc void @"$S9ctypes_ir12testAnonEnumyyF"
13+
// CHECK-LABEL: define hidden swiftcc void @"$s9ctypes_ir12testAnonEnumyyF"
1414
func testAnonEnum() {
1515
// CHECK: store i64 30064771073
1616
var a = AnonConst2
1717
}
1818

19-
// CHECK-LABEL: define hidden swiftcc void @"$S9ctypes_ir17testAnonEnumSmallyyF"
19+
// CHECK-LABEL: define hidden swiftcc void @"$s9ctypes_ir17testAnonEnumSmallyyF"
2020
func testAnonEnumSmall() {
2121
// CHECK: store i64 17
2222
var a = AnonConstSmall2
@@ -27,7 +27,7 @@ func testStructWithFlexibleArray(_ s : StructWithFlexibleArray) {
2727
}
2828

2929
// Make sure flexible array struct member isn't represented in IR function signature as i0 (or at all). rdar://problem/18510461
30-
// CHECK-LABEL: define hidden swiftcc void @"$S9ctypes_ir27testStructWithFlexibleArrayyySo0defG0aF"(i32)
30+
// CHECK-LABEL: define hidden swiftcc void @"$s9ctypes_ir27testStructWithFlexibleArrayyySo0defG0aF"(i32)
3131

3232
typealias EightUp = (Int8, Int8, Int8, Int8, Int8, Int8, Int8, Int8)
3333

test/ClangImporter/enum-anon.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func testDiags() {
3030
#endif
3131

3232
// CHECK-LABEL: %TSo6SR2511V = type <{ %Ts5Int32V, %Ts6UInt32V, %Ts5Int32V }>
33-
// CHECK-LABEL: define{{.*}} i32 @"$S4main6testIR1xs5Int32VSPySo6SR2511VG_tF"(
33+
// CHECK-LABEL: define{{.*}} i32 @"$s4main6testIR1xs5Int32VSPySo6SR2511VG_tF"(
3434
public func testIR(x: UnsafePointer<SR2511>) -> CInt {
3535
// CHECK: store i32 1, i32* getelementptr inbounds (%Ts6UInt32V, %Ts6UInt32V* bitcast (i32* @global to %Ts6UInt32V*), i32 0, i32 0), align 4
3636
global = VarConstant2

test/ClangImporter/enum.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,5 @@ let _: UnknownOptionsThanksToAPINotes = .first // expected-error {{has no member
228228
let _ = UnknownEnumThanksToAPINotesFirst
229229
let _ = UnknownOptionsThanksToAPINotesFirst
230230

231-
// CHECK-IR: $S4enum12testMangling2e12e22e3ySo9EnumByTagV_So0gH7TypedefaSo0gH4BothVtF
231+
// CHECK-IR: $s4enum12testMangling2e12e22e3ySo9EnumByTagV_So0gH7TypedefaSo0gH4BothVtF
232232
func testMangling(e1: EnumByTag, e2: EnumByTypedef, e3: EnumByBoth) {}

test/ClangImporter/nullability_silgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import nullability
99
import Foundation
1010

1111
// null_resettable properties.
12-
// CHECK-LABEL: sil hidden @$S18nullability_silgen18testNullResettable{{[_0-9a-zA-Z]*}}F
12+
// CHECK-LABEL: sil hidden @$s18nullability_silgen18testNullResettable{{[_0-9a-zA-Z]*}}F
1313
func testNullResettable(_ sc: SomeClass) {
1414
sc.defaultedProperty = nil
1515
sc.defaultedProperty = "hello"

0 commit comments

Comments
 (0)