File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Inputs/clang-importer-sdk/usr/include Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,12 @@ func test_cfunc1(_ i: Int) {
9
9
}
10
10
11
11
func test_cfunc2( _ i: Int ) {
12
+ #if os(Windows) && (arch(arm64) || arch(x86_64))
13
+ // LLP64 targets will import `long` as `Int32`
14
+ let f = cfunc2 ( Int32 ( i) , 17 )
15
+ #else
12
16
let f = cfunc2 ( i, 17 )
17
+ #endif
13
18
_ = f as Float
14
19
cfunc2 ( b: 17 , a: i) // expected-error{{extraneous argument labels 'b:a:' in call}}
15
20
cfunc2 ( 17 , i) // expected-error{{cannot convert value of type 'Int' to expected argument type 'Int32'}}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ func testTribool() {
31
31
func testAnonEnum( ) {
32
32
var a = AnonConst1
33
33
a = AnonConst2
34
- #if arch(i386) || arch(arm)
34
+ #if arch(i386) || arch(arm) || os(Windows)
35
35
_ = a as CUnsignedLongLong
36
36
#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
37
37
_ = a as CUnsignedLong
Original file line number Diff line number Diff line change @@ -7,10 +7,18 @@ enum Tribool {
7
7
True , False , Indeterminate
8
8
};
9
9
10
- enum {
10
+ // This is explicitly sized on Windows since we do not use the type to infer the
11
+ // type that we are importing it as as this is known to be explicitly different
12
+ // in that environment.
13
+ enum
14
+ #if defined(_WIN32 )
15
+ : unsigned long long
16
+ #endif
17
+ {
11
18
AnonConst1 = 0x700000000 ,
12
19
AnonConst2
13
20
};
21
+ _Static_assert (sizeof (AnonConst1 ) == 8 );
14
22
15
23
enum {
16
24
AnonConstSmall1 = 16 ,
You can’t perform that action at this time.
0 commit comments