Skip to content

Commit c54689b

Browse files
committed
Test: Fix copy-pasta in spi_helper.swift by making SPIStruct type a struct instead of a class.
1 parent 699c0d3 commit c54689b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

test/SPI/Inputs/spi_helper.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public func genericFunc<T>(_ t: T) { print(t) }
1313

1414
@_spi(HelperSPI) public func spiFunc() { print("spiFunc") }
1515

16-
@_spi(HelperSPI) public class SPIStruct {
16+
@_spi(HelperSPI) public struct SPIStruct {
1717
@_spi(HelperSPI) public init() { print("SPIStruct.init") }
1818
@_spi(HelperSPI) public func spiMethod() { print("SPIStruct.spiMethod") }
1919
@_spi(HelperSPI) public var spiVar = "text"

test/SPI/spi_client.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ c.spiMethod()
2828
c.spiVar = "write"
2929
print(c.spiVar)
3030

31-
let s = SPIStruct()
31+
var s = SPIStruct()
3232
s.spiMethod()
3333
s.spiInherit()
3434
s.spiDontInherit() // expected-error {{'spiDontInherit' is inaccessible due to '@_spi' protection level}}

test/SPI/spi_symbols.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// Look for the SPI symbols in the IR
1010
// CHECK-IR: define swiftcc void @"$s10spi_helper0A4FuncyyF"
11-
// CHECK-IR: define swiftcc void @"$s10spi_helper9SPIStructC0A6MethodyyF"
11+
// CHECK-IR: define swiftcc void @"$s10spi_helper9SPIStructV0A6MethodyyF"
1212
// CHECK-IR: define swiftcc void @"$s10spi_helper8SPIClassC0A6MethodyyF"
1313
// CHECK-IR: define swiftcc void @"$s10spi_helper7SPIEnumO0A6MethodyyF"
1414
// CHECK-IR: define swiftcc void @"$s10spi_helper12PublicStructV0A6MethodyyF"
@@ -22,4 +22,4 @@
2222
// CHECK-TBD: _$s10spi_helper12otherApiFuncyyF
2323
// CHECK-TBD: _$s10spi_helper7SPIEnumO0A6MethodyyF
2424
// CHECK-TBD: _$s10spi_helper8SPIClassC0A6MethodyyF
25-
// CHECK-TBD: _$s10spi_helper9SPIStructC0A6MethodyyF
25+
// CHECK-TBD: _$s10spi_helper9SPIStructV0A6MethodyyF

0 commit comments

Comments
 (0)