diff options
author | Reid Kleckner <reid@kleckner.net> | 2013-12-05 01:03:23 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2013-12-05 01:03:23 +0000 |
commit | 51a10fb6d0789b1e39e800b1d279cd4feccc3f6f (patch) | |
tree | a5e754042647d9ce9cd710c4a28c225039a3c9fd | |
parent | ff1264b51a2f10e54bed497d4a29c4eef28697e9 (diff) | |
download | bcm5719-llvm-51a10fb6d0789b1e39e800b1d279cd4feccc3f6f.tar.gz bcm5719-llvm-51a10fb6d0789b1e39e800b1d279cd4feccc3f6f.zip |
Compiler.h: Disable initializer list usage with clang-cl
Most people are using MSVC 2012, which lacks the <initializer_list>
header. MSVC 2013 shipped with that header, but it has not yet been
tested. If clang works with the 2013 header, then we can enable this by
checking the value of _MSC_VER.
llvm-svn: 196448
-rw-r--r-- | llvm/include/llvm/Support/Compiler.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h index 860f43e9423..ea394a40019 100644 --- a/llvm/include/llvm/Support/Compiler.h +++ b/llvm/include/llvm/Support/Compiler.h @@ -404,8 +404,10 @@ #endif /// \brief Does the compiler support generalized initializers (using braced -/// lists and std::initializer_list). -#if __has_feature(cxx_generalized_initializers) +/// lists and std::initializer_list). While clang may claim it supports general +/// initializers, if we're using MSVC's headers, we might not have a usable +/// std::initializer list type from the STL. Disable this for now. +#if __has_feature(cxx_generalized_initializers) && !defined(_MSC_VER) #define LLVM_HAS_INITIALIZER_LISTS 1 #else #define LLVM_HAS_INITIALIZER_LISTS 0 |