diff options
author | Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> | 2012-11-15 22:12:58 +0100 |
---|---|---|
committer | Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> | 2013-11-01 04:45:27 +0100 |
commit | 90b48afbae1d70d7e5b6d3fdfbc7304e75e30695 (patch) | |
tree | cb918a1da1b7daac78eeb2dc8140885717e6884e | |
parent | 5d63c52424acc972d6370c50e1f3930d695790b7 (diff) | |
download | llvm-linaro_android_4.4.3.tar.gz |
llvm: Add workaround for STLport not being a full C++11 STLlinaro_android_4.4.4linaro_android_4.4.3linaro_android_4.4.2linaro_android_4.4
llvm checks for C++11 support in the compiler, and assumes the
STL has full C++11 support if the compiler does.
However, for the combination of gcc 4.7 and STLport, that assumption
is incorrect -- the compiler supports rvalue references just fine, but
the STL hasn't caught up yet.
Longer term, the better fix would be to fix STLport.
Change-Id: I20237a19a3835faee583f429749751ee3c4843f6
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r-- | include/llvm/Support/Compiler.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index feac9348dd45..7fd1d0648757 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -43,7 +43,10 @@ /// \brief Does the compiler support r-value references? /// This implies that <utility> provides the one-argument std::move; it /// does not imply the existence of any other C++ library features. -#if (__has_feature(cxx_rvalue_references) \ +/// On Android, the compiler can handle r-value references -- but STLport is +/// behind and doesn't implement std::move. So we have to ignore the +/// compiler's support. +#if !defined(ANDROID) && (__has_feature(cxx_rvalue_references) \ || defined(__GXX_EXPERIMENTAL_CXX0X__) \ || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define LLVM_HAS_RVALUE_REFERENCES 1 |