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;
14061406#endif
14071407
14081408// 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
14091417_Static_assert (sizeof (InlineRefCounts) == sizeof (InlineRefCountsPlaceholder),
14101418 " InlineRefCounts and InlineRefCountsPlaceholder must match" );
14111419_Static_assert (sizeof (InlineRefCounts) == sizeof (__swift_uintptr_t ),
14121420 " InlineRefCounts must be pointer-sized" );
14131421_Static_assert (_Alignof (InlineRefCounts) == _Alignof (__swift_uintptr_t ),
14141422 " InlineRefCounts must be pointer-aligned" );
1423+ #endif
14151424
14161425#endif
Original file line number Diff line number Diff line change @@ -70,8 +70,20 @@ typedef unsigned __INT8_TYPE__ __swift_uint8_t;
7070#define __swift_intn_t (n ) __swift_join3(__swift_int, n, _t)
7171#define __swift_uintn_t (n ) __swift_join3(__swift_uint, n, _t)
7272
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
7384typedef __swift_intn_t (__INTPTR_WIDTH__) __swift_intptr_t;
7485typedef __swift_uintn_t (__INTPTR_WIDTH__) __swift_uintptr_t;
7586#endif
87+ #endif
7688
7789#endif // SWIFT_STDLIB_SHIMS_SWIFT_STDINT_H
You can’t perform that action at this time.
0 commit comments