about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2017-10-02T16·45-0700
committervslashg <gfalcon@google.com>2017-10-02T18·43-0400
commit9c4178d13e84acf3f0d1b8aeee1f67862aeeadc9 (patch)
tree1aa4f76ba354cfc298e80bc4a55c26e8795c56ed
parent8d8dcb0ae550fbfdbd7392a3c9d2c5c596bdcde3 (diff)
Changes imported from Abseil "staging" branch:
  - 1a906f90b303c6fbac292f4883186a27e7c6476c Increase the mutex_test timeout (by removing the timeout ... by Derek Mauro <dmauro@google.com>
  - cfc1d3e56727e5b3a41b7d9dfc513f692ac0edd6 Require iOS 9.0 for ABSL_HAVE_THREAD_LOCAL. by Matt Armstrong <marmstrong@google.com>
  - 22dc24504ac6fbd2a22f5d45a4bd00fe14d500c3 Fix indentation by Jorg Brown <jorg@google.com>

GitOrigin-RevId: 1a906f90b303c6fbac292f4883186a27e7c6476c
Change-Id: Id6075001460bd6b9ce973897544269fa4103fee8
-rw-r--r--absl/base/config.h4
-rw-r--r--absl/strings/string_view.h22
-rw-r--r--absl/synchronization/BUILD.bazel1
3 files changed, 13 insertions, 14 deletions
diff --git a/absl/base/config.h b/absl/base/config.h
index c768e7223b93..875d8e4fbada 100644
--- a/absl/base/config.h
+++ b/absl/base/config.h
@@ -162,9 +162,9 @@
 #error ABSL_HAVE_THREAD_LOCAL cannot be directly set
 #elif !defined(__apple_build_version__) ||   \
     ((__apple_build_version__ >= 8000042) && \
-     !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0))
+     !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0))
 // Notes: Xcode's clang did not support `thread_local` until version
-// 8, and even then not for iOS < 8.0.
+// 8, and even then not for all iOS < 9.0.
 #define ABSL_HAVE_THREAD_LOCAL 1
 #endif
 
diff --git a/absl/strings/string_view.h b/absl/strings/string_view.h
index 5dd08b3a5627..033509ada239 100644
--- a/absl/strings/string_view.h
+++ b/absl/strings/string_view.h
@@ -482,21 +482,21 @@ class string_view {
   static constexpr size_type kMaxSize =
       std::numeric_limits<size_type>::max() / 2 + 1;
 
-  static constexpr size_type StrLenInternal(const char* str) {
-    return str ?
-// check whether __builtin_strlen is provided by the compiler.
-// GCC doesn't have __has_builtin()
-// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970),
-// but has __builtin_strlen according to
-// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Other-Builtins.html.
+  // check whether __builtin_strlen is provided by the compiler.
+  // GCC doesn't have __has_builtin()
+  // (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970),
+  // but has __builtin_strlen according to
+  // https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Other-Builtins.html.
 #if ABSL_HAVE_BUILTIN(__builtin_strlen) || \
     (defined(__GNUC__) && !defined(__clang__))
-               __builtin_strlen(str)
+  static constexpr size_type StrLenInternal(const char* str) {
+    return str ? __builtin_strlen(str) : 0;
+  }
 #else
-               strlen(str)
-#endif
-               : 0;
+  static constexpr size_type StrLenInternal(const char* str) {
+    return str ? strlen(str) : 0;
   }
+#endif
 
   static constexpr size_type CheckLengthInternal(size_type len) {
     return ABSL_ASSERT(len <= kMaxSize), len;
diff --git a/absl/synchronization/BUILD.bazel b/absl/synchronization/BUILD.bazel
index 7efc67e67638..cc8cecf97991 100644
--- a/absl/synchronization/BUILD.bazel
+++ b/absl/synchronization/BUILD.bazel
@@ -129,7 +129,6 @@ cc_library(
 cc_test(
     name = "mutex_test",
     size = "large",
-    timeout = "moderate",
     srcs = ["mutex_test.cc"],
     copts = ABSL_TEST_COPTS,
     tags = [