File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
validation-test/stdlib/MicroStdlib Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 4
4
// RUN: ls %t/Swift.swiftmodule
5
5
// RUN: ls %t/Swift.swiftdoc
6
6
// RUN: ls %t/Swift.o
7
+ // RUN: %target-clang -x c -c %S/RuntimeStubs.c -o %t/RuntimeStubs.o
8
+ // RUN: %target-build-swift -I %t -module-name main -o %t/hello %S/main.swift %t/Swift.o %t/RuntimeStubs.o
9
+ // RUN: %target-run %t/hello | FileCheck %s
7
10
// REQUIRES: executable_test
11
+ // CHECK: Hello
8
12
9
13
//
10
14
// A bare-bones Swift standard library
@@ -90,6 +94,18 @@ public struct UnsafeMutablePointer<T> {
90
94
public typealias CInt = Int32
91
95
public typealias CChar = Int8
92
96
97
+ @_silgen_name ( " putchar " )
98
+ public func putchar( _: CChar )
99
+
100
+ public func printHello( ) {
101
+ putchar ( 0x48 )
102
+ putchar ( 0x65 )
103
+ putchar ( 0x6c )
104
+ putchar ( 0x6c )
105
+ putchar ( 0x6f )
106
+ putchar ( 0x0a )
107
+ }
108
+
93
109
//public var C_ARGC: CInt = CInt()
94
110
95
111
//public var C_ARGV: UnsafeMutablePointer<UnsafeMutablePointer<Int8>> = UnsafeMutablePointer()
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
+ printHello ( )
2
+
You can’t perform that action at this time.
0 commit comments