File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,10 @@ void SILLinkerVisitor::linkInVTable(ClassDecl *D) {
189
189
maybeAddFunctionToWorklist (impl, Vtbl->isSerialized ());
190
190
}
191
191
}
192
+
193
+ if (auto *S = D->getSuperclassDecl ()) {
194
+ linkInVTable (S);
195
+ }
192
196
}
193
197
194
198
// ===----------------------------------------------------------------------===//
Original file line number Diff line number Diff line change
1
+ // RUN: %target-run-simple-swift(-enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo -Xfrontend -disable-objc-interop) | %FileCheck %s
2
+ // RUN: %target-run-simple-swift(-O -enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo -Xfrontend -disable-objc-interop) | %FileCheck %s
3
+ // RUN: %target-run-simple-swift(-Osize -enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo -Xfrontend -disable-objc-interop) | %FileCheck %s
4
+
5
+ // REQUIRES: executable_test
6
+ // REQUIRES: optimized_stdlib
7
+ // REQUIRES: VENDOR=apple
8
+ // REQUIRES: OS=macosx
9
+
10
+ @main
11
+ struct Main {
12
+ static func main( ) {
13
+ StaticString ( " Hello, World! " ) . asUTF8Array. print ( )
14
+ // CHECK: Hello, World!
15
+ }
16
+ }
17
+
18
+ extension StaticString {
19
+ var asUTF8Array : [ UInt8 ] {
20
+ Array ( UnsafeBufferPointer ( start: utf8Start, count: utf8CodeUnitCount) )
21
+ }
22
+ }
23
+
24
+ @_silgen_name ( " putchar " )
25
+ func putchar( _: UInt8 )
26
+
27
+ extension Array < UInt8 > {
28
+ func print( ) {
29
+ for byte in self {
30
+ putchar ( byte)
31
+ }
32
+ putchar ( 10 )
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments