Skip to content

Commit dda1eb2

Browse files
committed
---
yaml --- r: 347371 b: refs/heads/master c: c37744d h: refs/heads/master i: 347369: 9e2e30f 347367: 06be74d
1 parent 080a249 commit dda1eb2

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 996dc153803c4ba0331868be2849512f094bb43f
2+
refs/heads/master: c37744dc42c1b4480be0d065a57d047458875444
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/test/ClangImporter/cfuncs_parse.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ func test_cfunc1(_ i: Int) {
99
}
1010

1111
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
1216
let f = cfunc2(i, 17)
17+
#endif
1318
_ = f as Float
1419
cfunc2(b:17, a:i) // expected-error{{extraneous argument labels 'b:a:' in call}}
1520
cfunc2(17, i) // expected-error{{cannot convert value of type 'Int' to expected argument type 'Int32'}}

trunk/test/ClangImporter/ctypes_parse.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func testTribool() {
3131
func testAnonEnum() {
3232
var a = AnonConst1
3333
a = AnonConst2
34-
#if arch(i386) || arch(arm)
34+
#if arch(i386) || arch(arm) || os(Windows)
3535
_ = a as CUnsignedLongLong
3636
#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
3737
_ = a as CUnsignedLong

trunk/test/Inputs/clang-importer-sdk/usr/include/ctypes.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,18 @@ enum Tribool {
77
True, False, Indeterminate
88
};
99

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+
{
1118
AnonConst1 = 0x700000000,
1219
AnonConst2
1320
};
21+
_Static_assert(sizeof(AnonConst1) == 8);
1422

1523
enum {
1624
AnonConstSmall1 = 16,

0 commit comments

Comments
 (0)