summaryrefslogtreecommitdiff
path: root/absl
Commit message (Collapse)AuthorAge
* Correct nullability annotations on MakeNanGravatar Abseil Team2024-01-04
| | | | | | | Neither GCC nor Clang's __builtin_nan(), nor glibc's nan(), accept null pointers. PiperOrigin-RevId: 595767225 Change-Id: I4cddd1cafd0c9e83a823ec68386f10ce077c6b4c
* Avoid a empty library build failure on Apple platformsGravatar Derek Mauro2024-01-03
| | | | | | | | | | | | | | | | | | | | | https://github.com/abseil/abseil-cpp/issues/1465 reports that some CMake builds on Apply platforms issue ``` warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: archive library: libabsl_bad_any_cast_impl.a the table of contents is empty (no object file members in the library define global symbols) ``` Our CMake build handles this problem for header-only libraries by not building a library at all. For some libraries, for example our polyfills, the library is only conditionally empty. In these libraries, I added a single char variable on Apple platforms as a workaround. I have been able to reproduce the warnings reported in https://github.com/abseil/abseil-cpp/issues/1465, but they don't fail the build for me. I don't see them any more after this change. PiperOrigin-RevId: 595480705 Change-Id: Ie48637e84ebae2f2aea4e2de83b146f30f6a76b9
* Speed up `raw_hash_set::contains()` when ABSL hardening is enabled by ↵Gravatar Abseil Team2024-01-03
| | | | | | | removing the iterator invalidation check from the comparison that contains performs. PiperOrigin-RevId: 595460301 Change-Id: I9a5d6c81385e38184f4848c58209adc5d32bb7be
* Remove workaround for older versions MSVC that did not supportGravatar Derek Mauro2024-01-02
| | | | | | | | constexpr Flag construction. These versions of MSVC are no longer supported. PiperOrigin-RevId: 595195773 Change-Id: Iaf2f01a2255fb24f3aadc26f09600543fffa9da5
* PR #1589: Use compare_exchange_weak in the loop in Mutex::ReaderLockGravatar AtariDreams2024-01-02
| | | | | | | | | | | | | Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1589 It makes sense because even if it fails spuriously, we can just try again since we have to check for other readers anyway. Merge 0b1780299b9e43205202d6b25f6e57759722d063 into 6a19ff47352a2112e953f4ab813d820e0ecfe1e3 Merging this change closes #1589 COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1589 from AtariDreams:atomics 0b1780299b9e43205202d6b25f6e57759722d063 PiperOrigin-RevId: 595149382 Change-Id: I24f678f6bf95c6a37b2ed541a2b6668a58a67702
* Add an IWYU pragma to vlog_is_on.hGravatar Derek Mauro2024-01-02
| | | | | PiperOrigin-RevId: 595114487 Change-Id: Ia8fc94e4feaf8da1185e7e93ba4250e61e690cfd
* [absl] Rename `absl::internal::identity` to `absl::internal::type_identity`Gravatar Lawrence Wolf-Sonkin2023-12-28
| | | | | | | | * Also does this for `absl::internal::identity_t` which is now `absl::internal::type_identity_t` * This is clearer naming as this is a backfill of `std::type_identity` (the identity type), and not `std::identity` (the identity function) PiperOrigin-RevId: 594316002 Change-Id: I5fb8cf7e3d07c1bc736cbecd202e7d556b6ea33e
* Add compile-checks to ensure the parameter to ↵Gravatar Abseil Team2023-12-28
| | | | | | | | | absl::numbers_internal::FastIntToBuffer isn't provably insufficient This performance-sensitive API is internal, and should not be used directly. Nevertheless, some do use it, so it's worth trying to block incorrect uses where we can. PiperOrigin-RevId: 594289730 Change-Id: Ib5df39b450ef2ceda795082cde10ec2ba2642172
* Migrate static objects to NoDestructor in tests, testing libraries and ↵Gravatar Abseil Team2023-12-26
| | | | | | | benchmarks. PiperOrigin-RevId: 593918110 Change-Id: Ide100c69b10e28011af17c7f82bb10eea072cad4
* Import of CCTZ from GitHub.Gravatar Abseil Team2023-12-26
| | | | | PiperOrigin-RevId: 593889663 Change-Id: I589cd18922172d8aca99ddcc0d6f08a013bed9b4
* Import of CCTZ from GitHub.Gravatar Abseil Team2023-12-26
| | | | | PiperOrigin-RevId: 593814844 Change-Id: If1967814b2b9273061b928bfee102faae1fad263
* Include `cstdint` where necessary.Gravatar Dmitri Gribenko2023-12-26
| | | | | PiperOrigin-RevId: 593780380 Change-Id: Id80217c63dd76bafbcfb79a7ee10807f1b771cb2
* Release a few bits and pieces of DFATAL that were left behind: flag parsing ↵Gravatar Andy Getzendanner2023-12-21
| | | | | | | & some tests. PiperOrigin-RevId: 592918704 Change-Id: Iacef0e069c012a04960211c032454244822f9634
* Add a container-based version of `std::sample()`Gravatar Eric Astor2023-12-21
| | | | | PiperOrigin-RevId: 592864147 Change-Id: I83179b0225aa446ae0b57b46b604af14f1fa14df
* Performance improvement for absl::AsciiStrToUpper() and absl::AsciiStrToLower()Gravatar Abseil Team2023-12-20
| | | | | PiperOrigin-RevId: 592664369 Change-Id: I7aa7b045c2b3c0f25cff7b82eb9d9cc13e9fc49f
* Added ByAsciiWhitespace to str_split library.Gravatar Abseil Team2023-12-20
| | | | | PiperOrigin-RevId: 592653487 Change-Id: Iddd2f484807cb02dd2ee8bba26c22d196be02c88
* AddressIsReadable: improve commentsGravatar Fangrui Song2023-12-20
| | | | | | | | | | | | | | | | | | | Linux kernel's rt_sigprocmask correctly handles an unaligned user address[1]. The original issue was for qemu-user, which seems long irrelevant. Tested locally on an AArch64 CPU and qemu-aarch64-static. The alignment operation actually serves another purpose: when addr resides in the last 7 bytes of a page (unaligned), check only the current page and not the next. Update the comment. [1]: kernel/signal.c `SYSCALL_DEFINE4(rt_sigprocmask` arch/arm64/include/asm/uaccess.h:raw_copy_from_user arch/arm64/lib/copy_template.S "alignment handled by the hardware" PiperOrigin-RevId: 592618320 Change-Id: Ifbd05aba42f46e36e710cca940570213036b3ce0
* Unify btree EmptyNode allocation code across compilers.Gravatar Abseil Team2023-12-20
| | | | | | | | | We currently have a workaround for MSVC, which has constexpr pointer arithmetic bugs. The bug seems to still exist and the existing code for non-MSVC compilers doesn't build. This alternative constexpr constructor avoids pointer arithmetic and seems to be working for all, including MSVC. PiperOrigin-RevId: 592586957 Change-Id: Ic585693c3a7abaab5fbbc0954b8ee924994f8dbf
* Create and destroy tables outside of the timer and in batch in Reserve ↵Gravatar Abseil Team2023-12-20
| | | | | | | benchmarks. PiperOrigin-RevId: 592483250 Change-Id: I55fa9982c4dbc723b30957cb31da95251e368707
* Fix typo: begnning -> beginningGravatar Abseil Team2023-12-19
| | | | | PiperOrigin-RevId: 592337948 Change-Id: I373943b8daf28781e063b302fc916ca5644e8fe1
* Add a pragma to disable a maybe-uninitialized warning for GCC12+Gravatar Abseil Team2023-12-19
| | | | | PiperOrigin-RevId: 592301543 Change-Id: I97e4df805c7313896228430a50a7f991127f3e30
* Refactor `EraseMetaOnly` to speed up single group tables.Gravatar Abseil Team2023-12-19
| | | | | PiperOrigin-RevId: 592272653 Change-Id: I895c5786555227bdc88ab0a4cce8cf5ba65222a1
* Mutex: Prevent false race in EnableInvariantDebugging.Gravatar Dmitry Vyukov2023-12-19
| | | | | | | | | | | | | | The added test exposes a false TSan race report in EnableInvariantDebugging/EnableDebugLog related to SynchEvent reuse. We ignore most of the stuff that happens inside of the Mutex code, but not for the code inside of EnableInvariantDebugging/EnableDebugLog. So these can cause occasional false reports on SynchEvent bankruptcy. Also ignore accesses in EnableInvariantDebugging/EnableDebugLog. PiperOrigin-RevId: 592226791 Change-Id: I066edb1ef5661ba6cf86a195f91a9d5328b93d10
* Add the `BM_EraseEmplace` benchmark that constantly adds and removes the ↵Gravatar Abseil Team2023-12-18
| | | | | | | same element. PiperOrigin-RevId: 591987002 Change-Id: Ic1ed2063aeb95a6e814eefcbed024e1a5a1d8d2f
* Mutex: Fix Condition pointer-to-member cast to respect const qualifierGravatar Abseil Team2023-12-18
| | | | | | | | | | | | | | | | Previously, `absl::Condition` incorrectly used the same (non-`const`) pointer-to-method type when wrapping both `const` and non-`const` methods. Unfortunately, this is undefined behavior according to `[expr.reinterpret.cast]` in the C++ standard: > The effect of calling a function through a pointer to a function type that is > not the same as the type used in the definition of the function is undefined. This fixes the UB. PiperOrigin-RevId: 591981682 Change-Id: Iaca955346699417232383d3a1800ea9b82ea5761
* Cleanup build file by removing an empty srcs listGravatar Derek Mauro2023-12-18
| | | | | PiperOrigin-RevId: 591928115 Change-Id: I55de0886d3ce2d58cc1c94a15ce0f3eefc5eeaaf
* Add a pragma to disable a stringop-overflow warning for GCC12+Gravatar Abseil Team2023-12-18
| | | | | PiperOrigin-RevId: 591894838 Change-Id: Ib3fe72d255f49320e2728c210ba1faabc81e0ef8
* Remove nullability from Span::{pointer,iterator}Gravatar Sam McCall2023-12-15
| | | | | | | | | | | | These are in some sense correct (begin()/end() can be null for empty spans), but don't capture the critical contract that begin() is only null when end() is. This leads to foreach loops over spans being considered unsafe. Long-term we may want to express such constraints somehow, but for now giving these pointers unknown nullability is the best we can do. PiperOrigin-RevId: 591191038 Change-Id: I1f02e068a445c0ca5996a9212477b64393ef4161
* Roll back changes to AsciiStrToUpper() and AsciiStrToLower() due to bug report.Gravatar Abseil Team2023-12-14
| | | | | PiperOrigin-RevId: 591161019 Change-Id: Iae2477a24819e20288fbb83b4a343031af71f1bb
* Performance improvement for absl::AsciiStrToUpper() and absl::AsciiStrToLower()Gravatar Abseil Team2023-12-14
| | | | | PiperOrigin-RevId: 591015112 Change-Id: I3e654433f0b0a4ea02ee10e0894e70738e730782
* Redirect `GetPageSize()` to C library `getpagesize()` on Hexagon DSP.Gravatar Abseil Team2023-12-13
| | | | | PiperOrigin-RevId: 590669848 Change-Id: Ibc703b0fbedede86ddaa9682049b7dcc2250fbfb
* Add `ostream<<` and `AbslStringify` to `absl::StatusOr`.Gravatar Zie Weaver2023-12-13
| | | | | | | | These methods will only be defined if they're defined for `T`. Additionally, we add jitter to the output to discourage people relying on the output format. PiperOrigin-RevId: 590598988 Change-Id: I4e7173b5f0c66fd3a1cdd3392944e20b8a26641f
* Unit-tests to verify ABSL raw_hash_set does not double-hash in prodGravatar Abseil Team2023-12-12
| | | | | PiperOrigin-RevId: 590337123 Change-Id: Ib98bbb5a5dadbce5e891567038e016f4da2efc0b
* Add `MaskFull` to `Group`.Gravatar Abseil Team2023-12-12
| | | | | | | | | It is not used at the moment. Usage is planned to be submitted separately. Useful for faster iterating over all slots in the internal functions. PiperOrigin-RevId: 590300049 Change-Id: I081f33113268761db868771d29796d94c24e4e7a
* `absl/utility`: Delete tests for C++11-compatible `integer_sequence` and friendsGravatar Dino Radakovic2023-12-11
| | | | | | | These used to be independent implementations. Now that they are aliases, maintaining tests doesn't make sense anymore. PiperOrigin-RevId: 589947915 Change-Id: I555496e3467d56a75468b180383482eee2e8f198
* `absl/utility`: Delete C++11-compatible `integer_sequence` and friendsGravatar Dino Radakovic2023-12-11
| | | | | | | | | | | Abseil does not support C++11 anymore: https://github.com/google/oss-policies-info/blob/b842c39db88e6569dfe2cf98be434b03507cb503/foundational-cxx-support-matrix.md NOTE: This is a breaking change because `std::integer_sequence<T>` requires `std::is_integral_v<T>`, but `absl::integer_sequence<T>` does not. Unit tests will be deleted in a follow-up. PiperOrigin-RevId: 589908215 Change-Id: I57a81e4451840304d5fba60bef286e81e024af9c
* Add nullability annotationsGravatar Dmitri Gribenko2023-12-11
| | | | | PiperOrigin-RevId: 589842893 Change-Id: I9657761d1f71c665582406f278c6605f6d382f6d
* Enable ABSL_HAVE_POSIX_WRITE for Hexagon DSP build.Gravatar Abseil Team2023-12-07
| | | | | PiperOrigin-RevId: 588893303 Change-Id: I3f9278f2f7f0bc4b8903a87cb4a740daf7349755
* Small table growth optimization.Gravatar Abseil Team2023-12-07
| | | | | | | | | Details: - In case the table entirely fits into a single group size (`capacity <= Group::kWidth`), the order of elements is not important. - For growing upto Group::kWidth we rotate control bytes and slots deterministically (using memcpy). - We also avoid second find_first_non_full right after resize for small growing. PiperOrigin-RevId: 588825966 Change-Id: I09bd7fd489e3868dcf56c36b436805d08dae7ab5
* Elide calls to MakeCheckOpString when ABSL_MIN_LOG_LEVEL makes them unnecessaryGravatar Abseil Team2023-12-07
| | | | | | | | Reduces final binary size by avoiding stream I/O and all its associated overhead. PiperOrigin-RevId: 588789394 Change-Id: Ib8653db77aee0dae45e44f4ac72fe7dd87aa2eba
* Fixing a comment to be correct with the current code.Gravatar Abseil Team2023-12-06
| | | | | PiperOrigin-RevId: 588530709 Change-Id: Iee28c7693a4802f11e13728e1c28febee8c8576f
* absl qualify HasAbslStringify in log_message.h.Gravatar Abseil Team2023-12-06
| | | | | | | This works around a Clang bug, https://github.com/llvm/llvm-project/issues/25168 PiperOrigin-RevId: 588491254 Change-Id: Ia59afae4df45474d6025a2ab1ca487b381c9ee66
* Remove a global destructor in vlog_config.ccGravatar Derek Mauro2023-12-06
| | | | | | | Chromium requires no global destructors. PiperOrigin-RevId: 588466793 Change-Id: Icd255d9fb37667b4f5ce4b2552b70fa53cbf6ecf
* Avoid leaking an unprefixed VLOG_IS_ON transitively though absl_log.hGravatar Derek Mauro2023-12-06
| | | | | | | | | | absl_log.h is supposed to be a mirror of log.h that only uses ABSL_ prefixed macros. This change adds ABSL_VLOG_IS_ON to absl_vlog_is_on.h and uses it in the implementation of VLOG. VLOG_IS_ON is then only exported though vlog_is_on.h. PiperOrigin-RevId: 588435577 Change-Id: Ifa9193afa0b782194b64447f4fedfaf24b72c95a
* Move vlog_config to the internal directory and change the namespace of VLogSiteGravatar Derek Mauro2023-12-06
| | | | | PiperOrigin-RevId: 588403935 Change-Id: I6a3af3c044b887ec65b19390d316cfb3ccdcc853
* Adds support for wchar_t/wchar_t*/std::wstring{_view} arguments to StrFormat().Gravatar Abseil Team2023-12-05
| | | | | | | This converts to UTF-8 regardless of locale. PiperOrigin-RevId: 588186076 Change-Id: I2c9598279b413d460e13ad65da2ba421c0b40b83
* Roll-forward: Honor ABSL_MIN_LOG_LEVEL in CHECK_XX, CHECK_STRXX, CHECK_OK, ↵Gravatar Andy Getzendanner2023-12-05
| | | | | | | | | | | and the QCHECK flavors of these. In particular, if ABSL_MIN_LOG_LEVEL exceeds kFatal, these should, upon failure, terminate the program without logging anything. The lack of logging should be visible to the optimizer so that it can strip string literals and stringified variable names from the object file. Making some edge cases work under Clang required rewriting NormalizeLogSeverity to help make constraints on its return value more obvious to the optimizer. PiperOrigin-RevId: 588181755 Change-Id: I95db3bae39f8dadb52a307ca3b80775db23de766
* Fix codegen trunks in `absl/hash/hash_benchmark.cc`.Gravatar Shahriar Rouf2023-12-05
| | | | | PiperOrigin-RevId: 588121665 Change-Id: Id057772e426aefe2fe7b2f1e94fd405b97167fed
* Make `absl::{partial,weak,strong}_ordering` aliases for the `std::` orderingGravatar Marcin Kowalczyk2023-12-05
| | | | | | | | | | | | types when they are available. This makes them interchangeable in contexts known to be compiled as C++20. This also makes `absl::` ordering types compatible with `<=>`, allowing to unconditionally use `absl::` spelling for types but conditionally use `<=>` when available. PiperOrigin-RevId: 588085408 Change-Id: I1aa5247f0e31acbb838ee76829b7a13c74b0a94f
* Add VLOG and friendsGravatar Derek Mauro2023-12-05
| | | | | | | These are methods for configurable verbose logging PiperOrigin-RevId: 588059727 Change-Id: Ib3703edd2493050a5da8b30e88b21adc643b1f7f