aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/third_party/abseil-cpp/absl/base
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/third_party/abseil-cpp/absl/base')
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/CMakeLists.txt2
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/attributes.h15
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/config.h41
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/internal/endian.h2
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.cc7
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.h2
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/internal/unaligned_access.h2
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/log_severity.h (renamed from Firestore/third_party/abseil-cpp/absl/base/internal/log_severity.h)11
-rw-r--r--Firestore/third_party/abseil-cpp/absl/base/macros.h2
9 files changed, 57 insertions, 27 deletions
diff --git a/Firestore/third_party/abseil-cpp/absl/base/CMakeLists.txt b/Firestore/third_party/abseil-cpp/absl/base/CMakeLists.txt
index 08659c4..cfa119a 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/CMakeLists.txt
+++ b/Firestore/third_party/abseil-cpp/absl/base/CMakeLists.txt
@@ -18,6 +18,7 @@ list(APPEND BASE_PUBLIC_HEADERS
"attributes.h"
"config.h"
"dynamic_annotations.h"
+ "log_severity.h"
"macros.h"
"optimization.h"
"policy_checks.h"
@@ -28,7 +29,6 @@ list(APPEND BASE_PUBLIC_HEADERS
list(APPEND BASE_INTERNAL_HEADERS
"internal/atomic_hook.h"
"internal/endian.h"
- "internal/log_severity.h"
"internal/raw_logging.h"
"internal/throw_delegate.h"
"internal/unaligned_access.h"
diff --git a/Firestore/third_party/abseil-cpp/absl/base/attributes.h b/Firestore/third_party/abseil-cpp/absl/base/attributes.h
index 6f3cfe4..4e1fc8b 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/attributes.h
+++ b/Firestore/third_party/abseil-cpp/absl/base/attributes.h
@@ -281,6 +281,18 @@
#define ABSL_ATTRIBUTE_NO_SANITIZE_CFI
#endif
+// ABSL_ATTRIBUTE_RETURNS_NONNULL
+//
+// Tells the compiler that a particular function never returns a null pointer.
+#if ABSL_HAVE_ATTRIBUTE(returns_nonnull) || \
+ (defined(__GNUC__) && \
+ (__GNUC__ > 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) && \
+ !defined(__clang__))
+#define ABSL_ATTRIBUTE_RETURNS_NONNULL __attribute__((returns_nonnull))
+#else
+#define ABSL_ATTRIBUTE_RETURNS_NONNULL
+#endif
+
// ABSL_HAVE_ATTRIBUTE_SECTION
//
// Indicates whether labeled sections are supported. Labeled sections are not
@@ -305,6 +317,7 @@
__attribute__((section(#name))) __attribute__((noinline))
#endif
+
// ABSL_ATTRIBUTE_SECTION_VARIABLE
//
// Tells the compiler/linker to put a given variable into a section and define
@@ -344,6 +357,7 @@
(reinterpret_cast<void *>(__start_##name))
#define ABSL_ATTRIBUTE_SECTION_STOP(name) \
(reinterpret_cast<void *>(__stop_##name))
+
#else // !ABSL_HAVE_ATTRIBUTE_SECTION
#define ABSL_HAVE_ATTRIBUTE_SECTION 0
@@ -356,6 +370,7 @@
#define ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name)
#define ABSL_ATTRIBUTE_SECTION_START(name) (reinterpret_cast<void *>(0))
#define ABSL_ATTRIBUTE_SECTION_STOP(name) (reinterpret_cast<void *>(0))
+
#endif // ABSL_ATTRIBUTE_SECTION
// ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC
diff --git a/Firestore/third_party/abseil-cpp/absl/base/config.h b/Firestore/third_party/abseil-cpp/absl/base/config.h
index 8a44c06..6703d0e 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/config.h
+++ b/Firestore/third_party/abseil-cpp/absl/base/config.h
@@ -138,9 +138,10 @@
// supported.
#ifdef ABSL_HAVE_THREAD_LOCAL
#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_9_0))
+#elif (!defined(__apple_build_version__) || \
+ (__apple_build_version__ >= 8000042)) && \
+ !(defined(__APPLE__) && 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 all iOS < 9.0.
#define ABSL_HAVE_THREAD_LOCAL 1
@@ -181,21 +182,21 @@
// __SIZEOF_INT128__ but not all versions actually support __int128.
#ifdef ABSL_HAVE_INTRINSIC_INT128
#error ABSL_HAVE_INTRINSIC_INT128 cannot be directly set
-#elif (defined(__clang__) && defined(__SIZEOF_INT128__) && \
- !defined(__aarch64__)) || \
- (defined(__CUDACC__) && defined(__SIZEOF_INT128__) && \
- __CUDACC_VER_MAJOR__ >= 9) || \
- (!defined(__clang__) && !defined(__CUDACC__) && defined(__GNUC__) && \
- defined(__SIZEOF_INT128__))
+#elif defined(__SIZEOF_INT128__)
+#if (defined(__clang__) && !defined(__aarch64__)) || \
+ (defined(__CUDACC__) && __CUDACC_VER_MAJOR__ >= 9) || \
+ (!defined(__clang__) && !defined(__CUDACC__) && defined(__GNUC__))
#define ABSL_HAVE_INTRINSIC_INT128 1
+#elif defined(__CUDACC__)
// __CUDACC_VER__ is a full version number before CUDA 9, and is defined to a
-// std::string explaining that it has been removed starting with CUDA 9. We can't
-// compare both variants in a single boolean expression because there is no
-// short-circuiting in the preprocessor.
-#elif defined(__CUDACC__) && defined(__SIZEOF_INT128__) && \
- __CUDACC_VER__ >= 7000
+// std::string explaining that it has been removed starting with CUDA 9. We use
+// nested #ifs because there is no short-circuiting in the preprocessor.
+// NOTE: `__CUDACC__` could be undefined while `__CUDACC_VER__` is defined.
+#if __CUDACC_VER__ >= 70000
#define ABSL_HAVE_INTRINSIC_INT128 1
-#endif
+#endif // __CUDACC_VER__ >= 70000
+#endif // defined(__CUDACC__)
+#endif // ABSL_HAVE_INTRINSIC_INT128
// ABSL_HAVE_EXCEPTIONS
//
@@ -243,7 +244,7 @@
// Windows _WIN32
// NaCL __native_client__
// AsmJS __asmjs__
-// Fuschia __Fuchsia__
+// Fuchsia __Fuchsia__
//
// Note that since Android defines both __ANDROID__ and __linux__, one
// may probe for either Linux or Android by simply testing for __linux__.
@@ -254,8 +255,9 @@
// POSIX.1-2001.
#ifdef ABSL_HAVE_MMAP
#error ABSL_HAVE_MMAP cannot be directly set
-#elif defined(__linux__) || defined(__APPLE__) || defined(__ros__) || \
- defined(__native_client__) || defined(__asmjs__) || defined(__Fuchsia__)
+#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
+ defined(__ros__) || defined(__native_client__) || defined(__asmjs__) || \
+ defined(__Fuchsia__)
#define ABSL_HAVE_MMAP 1
#endif
@@ -265,7 +267,8 @@
// functions as defined in POSIX.1-2001.
#ifdef ABSL_HAVE_PTHREAD_GETSCHEDPARAM
#error ABSL_HAVE_PTHREAD_GETSCHEDPARAM cannot be directly set
-#elif defined(__linux__) || defined(__APPLE__) || defined(__ros__)
+#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
+ defined(__ros__)
#define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1
#endif
diff --git a/Firestore/third_party/abseil-cpp/absl/base/internal/endian.h b/Firestore/third_party/abseil-cpp/absl/base/internal/endian.h
index 602129e..edc10f1 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/internal/endian.h
+++ b/Firestore/third_party/abseil-cpp/absl/base/internal/endian.h
@@ -22,6 +22,8 @@
#elif defined(__APPLE__)
// Mac OS X / Darwin features
#include <libkern/OSByteOrder.h>
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
#elif defined(__GLIBC__)
#include <byteswap.h> // IWYU pragma: export
#endif
diff --git a/Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.cc b/Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.cc
index 1b849ab..86e34d4 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.cc
+++ b/Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.cc
@@ -22,7 +22,7 @@
#include "absl/base/config.h"
#include "absl/base/internal/atomic_hook.h"
-#include "absl/base/internal/log_severity.h"
+#include "absl/base/log_severity.h"
// We know how to perform low-level writes to stderr in POSIX and Windows. For
// these platforms, we define the token ABSL_LOW_LEVEL_WRITE_SUPPORTED.
@@ -34,7 +34,8 @@
//
// This preprocessor token is also defined in raw_io.cc. If you need to copy
// this, consider moving both to config.h instead.
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__)
+#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
+ defined(__Fuchsia__)
#include <unistd.h>
@@ -47,7 +48,7 @@
// ABSL_HAVE_SYSCALL_WRITE is defined when the platform provides the syscall
// syscall(SYS_write, /*int*/ fd, /*char* */ buf, /*size_t*/ len);
// for low level operations that want to avoid libc.
-#if defined(__linux__) && !defined(__ANDROID__)
+#if (defined(__linux__) || defined(__FreeBSD__)) && !defined(__ANDROID__)
#include <sys/syscall.h>
#define ABSL_HAVE_SYSCALL_WRITE 1
#define ABSL_LOW_LEVEL_WRITE_SUPPORTED 1
diff --git a/Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.h b/Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.h
index 568d2af..1b2a44b 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.h
+++ b/Firestore/third_party/abseil-cpp/absl/base/internal/raw_logging.h
@@ -20,7 +20,7 @@
#define ABSL_BASE_INTERNAL_RAW_LOGGING_H_
#include "absl/base/attributes.h"
-#include "absl/base/internal/log_severity.h"
+#include "absl/base/log_severity.h"
#include "absl/base/macros.h"
#include "absl/base/port.h"
diff --git a/Firestore/third_party/abseil-cpp/absl/base/internal/unaligned_access.h b/Firestore/third_party/abseil-cpp/absl/base/internal/unaligned_access.h
index ea30829..c572436 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/internal/unaligned_access.h
+++ b/Firestore/third_party/abseil-cpp/absl/base/internal/unaligned_access.h
@@ -142,7 +142,7 @@ inline void UnalignedStore64(void *p, uint64_t v) {
// and 32-bit values (not 64-bit); older versions either raise a fatal signal,
// do an unaligned read and rotate the words around a bit, or do the reads very
// slowly (trip through kernel mode). There's no simple #define that says just
-// “ARMv7 or higher”, so we have to filter away all ARMv5 and ARMv6
+// "ARMv7 or higher", so we have to filter away all ARMv5 and ARMv6
// sub-architectures. Newer gcc (>= 4.6) set an __ARM_FEATURE_ALIGNED #define,
// so in time, maybe we can move on to that.
//
diff --git a/Firestore/third_party/abseil-cpp/absl/base/internal/log_severity.h b/Firestore/third_party/abseil-cpp/absl/base/log_severity.h
index deaf6a5..e146bcb 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/internal/log_severity.h
+++ b/Firestore/third_party/abseil-cpp/absl/base/log_severity.h
@@ -16,6 +16,8 @@
#ifndef ABSL_BASE_INTERNAL_LOG_SEVERITY_H_
#define ABSL_BASE_INTERNAL_LOG_SEVERITY_H_
+#include <array>
+
#include "absl/base/attributes.h"
namespace absl {
@@ -27,6 +29,13 @@ enum class LogSeverity : int {
kFatal = 3,
};
+// Returns an iterable of all standard `absl::LogSeverity` values, ordered from
+// least to most severe.
+constexpr std::array<absl::LogSeverity, 4> LogSeverities() {
+ return {{absl::LogSeverity::kInfo, absl::LogSeverity::kWarning,
+ absl::LogSeverity::kError, absl::LogSeverity::kFatal}};
+}
+
constexpr const char* LogSeverityName(absl::LogSeverity s) {
return s == absl::LogSeverity::kInfo
? "INFO"
@@ -37,7 +46,7 @@ constexpr const char* LogSeverityName(absl::LogSeverity s) {
: s == absl::LogSeverity::kFatal ? "FATAL" : "UNKNOWN";
}
-// Note that out-of-range large severities normalize to kError, not kFatal.
+// Note that out-of-range severities normalize to kInfo or kError, never kFatal.
constexpr absl::LogSeverity NormalizeLogSeverity(absl::LogSeverity s) {
return s < absl::LogSeverity::kInfo
? absl::LogSeverity::kInfo
diff --git a/Firestore/third_party/abseil-cpp/absl/base/macros.h b/Firestore/third_party/abseil-cpp/absl/base/macros.h
index 07c5cf7..c81f8c6 100644
--- a/Firestore/third_party/abseil-cpp/absl/base/macros.h
+++ b/Firestore/third_party/abseil-cpp/absl/base/macros.h
@@ -146,7 +146,7 @@ enum LinkerInitialized {
// Every usage of a deprecated entity will trigger a warning when compiled with
// clang's `-Wdeprecated-declarations` option. This option is turned off by
// default, but the warnings will be reported by clang-tidy.
-#if defined(__clang__) && __cplusplus >= 201103L && defined(__has_warning)
+#if defined(__clang__) && __cplusplus >= 201103L
#define ABSL_DEPRECATED(message) __attribute__((deprecated(message)))
#endif