Skip to content

Commit 1edf532

Browse files
committed
runtime: remove workaround for Clang 3.5
All supported OSes have Clang 3.6+.
1 parent 3e78bca commit 1edf532

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

stdlib/public/runtime/Casting.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@
3535
#include <cstring>
3636
#include <type_traits>
3737

38-
// FIXME: Clang defines max_align_t in stddef.h since 3.6.
39-
// Remove this hack when we don't care about older Clangs on all platforms.
40-
#ifdef __APPLE__
41-
typedef std::max_align_t swift_max_align_t;
42-
#else
43-
typedef long double swift_max_align_t;
44-
#endif
45-
4638
using namespace swift;
4739
using namespace metadataimpl;
4840

@@ -2483,7 +2475,7 @@ static bool _dynamicCastClassToValueViaObjCBridgeable(
24832475
// Allocate a buffer to store the T? returned by bridging.
24842476
// The extra byte is for the tag.
24852477
const std::size_t inlineValueSize = 3 * sizeof(void*);
2486-
alignas(swift_max_align_t) char inlineBuffer[inlineValueSize + 1];
2478+
alignas(std::max_align_t) char inlineBuffer[inlineValueSize + 1];
24872479
void *optDestBuffer;
24882480
if (targetType->getValueWitnesses()->getStride() <= inlineValueSize) {
24892481
// Use the inline buffer.

0 commit comments

Comments
 (0)