C++11 support for ART.
We can now use auto, ranged based loops, etc..
This compiles, the phone boots, and the tests pass.
Depends on:
https://googleplex-android-review.googlesource.com/#/c/342487/
Change-Id: I8ba8ed47d2118e4711668c9c8f973a67beb261b2
diff --git a/runtime/base/logging.h b/runtime/base/logging.h
index eafa050..ade8d34 100644
--- a/runtime/base/logging.h
+++ b/runtime/base/logging.h
@@ -32,7 +32,7 @@
<< "Check failed: " #x << " "
#define CHECK_OP(LHS, RHS, OP) \
- for (::art::EagerEvaluator<typeof(LHS), typeof(RHS)> _values(LHS, RHS); \
+ for (auto _values = ::art::MakeEagerEvaluator(LHS, RHS); \
UNLIKELY(!(_values.lhs OP _values.rhs)); /* empty */) \
::art::LogMessage(__FILE__, __LINE__, FATAL, -1).stream() \
<< "Check failed: " << #LHS << " " << #OP << " " << #RHS \
@@ -165,6 +165,11 @@
EAGER_PTR_EVALUATOR(signed char*, const signed char*);
EAGER_PTR_EVALUATOR(signed char*, signed char*);
+template <typename LHS, typename RHS>
+EagerEvaluator<LHS, RHS> MakeEagerEvaluator(LHS lhs, RHS rhs) {
+ return EagerEvaluator<LHS, RHS>(lhs, rhs);
+}
+
// This indirection greatly reduces the stack impact of having
// lots of checks/logging in a function.
struct LogMessageData {