From 90b48afbae1d70d7e5b6d3fdfbc7304e75e30695 Mon Sep 17 00:00:00 2001 From: Bernhard Rosenkraenzer Date: Thu, 15 Nov 2012 22:12:58 +0100 Subject: llvm: Add workaround for STLport not being a full C++11 STL 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 --- include/llvm/Support/Compiler.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 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 -- cgit v1.2.3