File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -1406,11 +1406,20 @@ typedef swift::InlineRefCounts InlineRefCounts;
1406
1406
#endif
1407
1407
1408
1408
// These assertions apply to both the C and the C++ declarations.
1409
+ #if defined(_MSC_VER) && !defined(__clang__)
1410
+ static_assert (sizeof (InlineRefCounts) == sizeof(InlineRefCountsPlaceholder),
1411
+ "InlineRefCounts and InlineRefCountsPlaceholder must match");
1412
+ static_assert (sizeof (InlineRefCounts) == sizeof(__swift_uintptr_t ),
1413
+ "InlineRefCounts must be pointer-sized");
1414
+ static_assert (__alignof(InlineRefCounts) == __alignof(__swift_uintptr_t ),
1415
+ "InlineRefCounts must be pointer-aligned");
1416
+ #else
1409
1417
_Static_assert (sizeof (InlineRefCounts) == sizeof(InlineRefCountsPlaceholder),
1410
1418
"InlineRefCounts and InlineRefCountsPlaceholder must match");
1411
1419
_Static_assert (sizeof (InlineRefCounts) == sizeof(__swift_uintptr_t ),
1412
1420
"InlineRefCounts must be pointer-sized");
1413
1421
_Static_assert (_Alignof(InlineRefCounts) == _Alignof(__swift_uintptr_t ),
1414
1422
"InlineRefCounts must be pointer-aligned");
1423
+ #endif
1415
1424
1416
1425
#endif
Original file line number Diff line number Diff line change @@ -70,8 +70,20 @@ typedef unsigned __INT8_TYPE__ __swift_uint8_t;
70
70
#define __swift_intn_t (n ) __swift_join3(__swift_int, n, _t)
71
71
#define __swift_uintn_t (n ) __swift_join3(__swift_uint, n, _t)
72
72
73
+ #if defined(_MSC_VER) && !defined(__clang__)
74
+ #if defined(_WIN32)
75
+ typedef __swift_int32_t __swift_intptr_t ;
76
+ typedef __swift_uint32_t __swift_uintptr_t ;
77
+ #elif defined(_WIN64)
78
+ typedef __swift_int64_t __swift_intptr_t ;
79
+ typedef __swift_uint64_t __swift_uintptr_t ;
80
+ #else
81
+ #error unknown windows pointer width
82
+ #endif
83
+ #else
73
84
typedef __swift_intn_t (__INTPTR_WIDTH__) __swift_intptr_t;
74
85
typedef __swift_uintn_t (__INTPTR_WIDTH__) __swift_uintptr_t;
75
86
#endif
87
+ #endif
76
88
77
89
#endif // SWIFT_STDLIB_SHIMS_SWIFT_STDINT_H
You can’t perform that action at this time.
0 commit comments