File tree Expand file tree Collapse file tree 4 files changed +37
-8
lines changed
validation-test/stdlib/MicroStdlib Expand file tree Collapse file tree 4 files changed +37
-8
lines changed Original file line number Diff line number Diff line change
1
+ int _TMBi32_ ;
2
+ int _TMBi64_ ;
3
+ int _TMBi8_ ;
4
+ void _swift_getEnumCaseSinglePayload (void ) {}
5
+ void _swift_getGenericMetadata (void ) {}
6
+ void _swift_slowAlloc (void ) {}
7
+ void _swift_slowDealloc (void ) {}
8
+ void _swift_storeEnumTagSinglePayload (void ) {}
9
+ void swift_allocateGenericValueMetadata (void ) {}
10
+ void swift_initEnumValueWitnessTableSinglePayload (void ) {}
11
+
Original file line number Diff line number Diff line change 1
- // RUN: rm -rf %t
2
- // RUN: mkdir %t
3
- // RUN: %target-build-swift -c -force-single-frontend-invocation -parse-as-library -parse-stdlib -module-name Swift -emit-module -emit-module-path %t/Swift.swiftmodule -o %t/Swift.o %s
4
- // RUN: ls %t/Swift.swiftmodule
5
- // RUN: ls %t/Swift.swiftdoc
6
- // RUN: ls %t/Swift.o
7
- // REQUIRES: executable_test
8
-
9
1
//
10
2
// A bare-bones Swift standard library
11
3
//
@@ -90,6 +82,18 @@ public struct UnsafeMutablePointer<T> {
90
82
public typealias CInt = Int32
91
83
public typealias CChar = Int8
92
84
85
+ @_silgen_name ( " putchar " )
86
+ public func putchar( _: CChar )
87
+
88
+ public func printHello( ) {
89
+ putchar ( 0x48 )
90
+ putchar ( 0x65 )
91
+ putchar ( 0x6c )
92
+ putchar ( 0x6c )
93
+ putchar ( 0x6f )
94
+ putchar ( 0x0a )
95
+ }
96
+
93
97
//public var C_ARGC: CInt = CInt()
94
98
95
99
//public var C_ARGV: UnsafeMutablePointer<UnsafeMutablePointer<Int8>> = UnsafeMutablePointer()
Original file line number Diff line number Diff line change
1
+ printHello ( )
2
+
Original file line number Diff line number Diff line change
1
+ // RUN: rm -rf %t
2
+ // RUN: mkdir %t
3
+ // RUN: %target-build-swift -c -force-single-frontend-invocation -parse-as-library -parse-stdlib -module-name Swift -emit-module -emit-module-path %t/Swift.swiftmodule -o %t/Swift.o %S/Inputs/Swift.swift
4
+ // RUN: ls %t/Swift.swiftmodule
5
+ // RUN: ls %t/Swift.swiftdoc
6
+ // RUN: ls %t/Swift.o
7
+ // RUN: %target-clang -x c -c %S/Inputs/RuntimeStubs.c -o %t/RuntimeStubs.o
8
+ // RUN: %target-build-swift -I %t -module-name main -o %t/hello %S/Inputs/main.swift %t/Swift.o %t/RuntimeStubs.o
9
+ // RUN: %target-run %t/hello | FileCheck %s
10
+ // REQUIRES: executable_test
11
+ // CHECK: Hello
12
+
You can’t perform that action at this time.
0 commit comments