summaryrefslogtreecommitdiffstats
path: root/libcxx/include/stddef.h
diff options
context:
space:
mode:
authorDavid L. Jones <dlj@google.com>2017-02-10 01:27:42 +0000
committerDavid L. Jones <dlj@google.com>2017-02-10 01:27:42 +0000
commit4b2273622298d4dfd70a736de39d52581aee1b1b (patch)
treeeee34508f7b37ef988de9405cdfcbb78763d3213 /libcxx/include/stddef.h
parent788b10ecbc0eb118fea8f022b0f044359629ccfa (diff)
downloadbcm5719-llvm-4b2273622298d4dfd70a736de39d52581aee1b1b.tar.gz
bcm5719-llvm-4b2273622298d4dfd70a736de39d52581aee1b1b.zip
Check for musl-libc's max_align_t in addition to other variants.
Summary: Libcxx will define its own max_align_t when it is not available. However, the availability checks today only check for Clang's definition and GCC's definition. In particular, it does not check for musl's definition, which is the same as GCC's but guarded with a different macro. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: chandlerc, cfe-commits Differential Revision: https://reviews.llvm.org/D28478 llvm-svn: 294683
Diffstat (limited to 'libcxx/include/stddef.h')
-rw-r--r--libcxx/include/stddef.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxx/include/stddef.h b/libcxx/include/stddef.h
index 8841bbea297..faf8552d8ce 100644
--- a/libcxx/include/stddef.h
+++ b/libcxx/include/stddef.h
@@ -53,7 +53,8 @@ using std::nullptr_t;
}
// Re-use the compiler's <stddef.h> max_align_t where possible.
-#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T)
+#if !defined(__CLANG_MAX_ALIGN_T_DEFINED) && !defined(_GCC_MAX_ALIGN_T) && \
+ !defined(__DEFINED_max_align_t)
typedef long double max_align_t;
#endif
OpenPOWER on IntegriCloud