aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-11-15 22:12:58 +0100
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-11-15 22:12:58 +0100
commit1f2e42e242d07b9b23747529ae965c0779c4c81d (patch)
tree6fc01e1d5bf12025cb820e606548fc81a82432d9
parent99e8132d3daedcebd061aacb0b08d1e1a6dab14c (diff)
downloadllvm-linaro_android_4.2.1.tar.gz
llvm: Add workaround for STLport not being a full C++11 STLlinaro_android_4.2.2linaro_android_4.2.1linaro_android_4.2
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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h
index 1136ff70c370..5a896fe0a27a 100644
--- a/include/llvm/Support/Compiler.h
+++ b/include/llvm/Support/Compiler.h
@@ -22,7 +22,10 @@
/// LLVM_HAS_RVALUE_REFERENCES - Does the compiler provide 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_USE_RVALUE_REFERENCES 1