mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Runtime: add a static assertion that swift_max_align_t is correct for
Darwin Swift SVN r22538
This commit is contained in:
@@ -26,15 +26,21 @@
|
||||
#include "Private.h"
|
||||
#include "stddef.h"
|
||||
|
||||
// FIXME: Clang defines max_align_t in stddef.h since 3.6.
|
||||
// Replace this with max_align_t when we can use it.
|
||||
typedef long double swift_max_align_t;
|
||||
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <cstring>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <type_traits>
|
||||
|
||||
// FIXME: Clang defines max_align_t in stddef.h since 3.6.
|
||||
// Replace this with max_align_t when we can use it.
|
||||
typedef long double swift_max_align_t;
|
||||
|
||||
#ifdef __APPLE__
|
||||
static_assert(std::is_same<swift_max_align_t, std::max_align_t>::value,
|
||||
"types should match exactly on OS X and iOS");
|
||||
#endif
|
||||
|
||||
using namespace swift;
|
||||
using namespace metadataimpl;
|
||||
|
||||
Reference in New Issue
Block a user