diff --git a/README.md b/README.md index d914fbc..c4b42e7 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,14 @@ flutter pub get ``` Since our application is built using Flutter, the command above will download all the necessary dependencies to run the project. -3. Run the application locally +3. Install pod Files +Before running this app for the first time, you have to install pod files. To do this, ensure that you are in the '/ios' directory and execute the following command: +```bash +pod install +``` +If there are any issues with version mismatches, delete the 'podfile.lock' file and re-run the same commmand. + +4. Run the application locally ```bash flutter run ``` @@ -117,5 +124,3 @@ All automated testing files are in this directory - Do additional research if an admin side of the app is needed/necessary - Work on a new method of pulling events. Currently, events are pulled using a web scraper to fetch calendar data from the BU Arts calendar website. However, this likely wouldn't be the long-term solution. JSON or ICS files are avaliable, but additional research shows that these files may not be appropriate for the use case of this project (see JSON vs. ICS document on Google Drive). - Find a way to generate tags for events. At the moment, BU has not generated any tags for their events. This may change in the future, but for now, a work around would be to discover a reliable method to generate tags for events. These tags are essential for implementing the interest page, event filtering page, and the passport page. Some additional insights are added to the 'JSON vs. ICS' document, but not comprehensive enough to implement a solution yet. - - diff --git a/bu_passport/android/app/build.gradle b/bu_passport/android/app/build.gradle index 50b3699..ef3cfb2 100644 --- a/bu_passport/android/app/build.gradle +++ b/bu_passport/android/app/build.gradle @@ -50,6 +50,7 @@ android { versionCode flutterVersionCode.toInteger() versionName flutterVersionName multiDexEnabled true + minSdkVersion 20 } buildTypes { diff --git a/bu_passport/ios/.symlinks/plugins/cloud_firestore b/bu_passport/ios/.symlinks/plugins/cloud_firestore index 0b63a6c..4b548b9 120000 --- a/bu_passport/ios/.symlinks/plugins/cloud_firestore +++ b/bu_passport/ios/.symlinks/plugins/cloud_firestore @@ -1 +1 @@ -/Users/saisriram/.pub-cache/hosted/pub.dev/cloud_firestore-4.15.6/ \ No newline at end of file +/Users/saisriram/.pub-cache/hosted/pub.dev/cloud_firestore-4.17.2/ \ No newline at end of file diff --git a/bu_passport/ios/.symlinks/plugins/firebase_core b/bu_passport/ios/.symlinks/plugins/firebase_core index 12a45ce..23a8791 120000 --- a/bu_passport/ios/.symlinks/plugins/firebase_core +++ b/bu_passport/ios/.symlinks/plugins/firebase_core @@ -1 +1 @@ -/Users/saisriram/.pub-cache/hosted/pub.dev/firebase_core-2.27.1/ \ No newline at end of file +/Users/saisriram/.pub-cache/hosted/pub.dev/firebase_core-2.30.1/ \ No newline at end of file diff --git a/bu_passport/ios/Podfile b/bu_passport/ios/Podfile index f94fcc0..a760156 100644 --- a/bu_passport/ios/Podfile +++ b/bu_passport/ios/Podfile @@ -33,7 +33,7 @@ target 'Runner' do pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', - :tag => '10.22.0' + :tag => '10.24.0' flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) target 'RunnerTests' do diff --git a/bu_passport/ios/Podfile.lock b/bu_passport/ios/Podfile.lock index db66051..72546dc 100644 --- a/bu_passport/ios/Podfile.lock +++ b/bu_passport/ios/Podfile.lock @@ -1,71 +1,70 @@ PODS: - - cloud_firestore (4.15.6): - - Firebase/Firestore (= 10.22.0) + - cloud_firestore (4.17.2): + - Firebase/Firestore (= 10.24.0) - firebase_core - Flutter - - nanopb (< 2.30910.0, >= 2.30908.0) - - Firebase/Auth (10.22.0): + - Firebase/Auth (10.24.0): - Firebase/CoreOnly - - FirebaseAuth (~> 10.22.0) - - Firebase/CoreOnly (10.22.0): - - FirebaseCore (= 10.22.0) - - Firebase/Firestore (10.22.0): + - FirebaseAuth (~> 10.24.0) + - Firebase/CoreOnly (10.24.0): + - FirebaseCore (= 10.24.0) + - Firebase/Firestore (10.24.0): - Firebase/CoreOnly - - FirebaseFirestore (~> 10.22.0) - - Firebase/Storage (10.22.0): + - FirebaseFirestore (~> 10.24.0) + - Firebase/Storage (10.24.0): - Firebase/CoreOnly - - FirebaseStorage (~> 10.22.0) + - FirebaseStorage (~> 10.24.0) - firebase_auth (4.17.5): - - Firebase/Auth (= 10.22.0) + - Firebase/Auth (= 10.24.0) - firebase_core - Flutter - - firebase_core (2.27.1): - - Firebase/CoreOnly (= 10.22.0) + - firebase_core (2.30.1): + - Firebase/CoreOnly (= 10.24.0) - Flutter - firebase_storage (11.6.10): - - Firebase/Storage (= 10.22.0) + - Firebase/Storage (= 10.24.0) - firebase_core - Flutter - - FirebaseAppCheckInterop (10.23.0) - - FirebaseAuth (10.22.0): + - FirebaseAppCheckInterop (10.24.0) + - FirebaseAuth (10.24.0): - FirebaseAppCheckInterop (~> 10.17) - FirebaseCore (~> 10.0) - GoogleUtilities/AppDelegateSwizzler (~> 7.8) - GoogleUtilities/Environment (~> 7.8) - GTMSessionFetcher/Core (< 4.0, >= 2.1) - RecaptchaInterop (~> 100.0) - - FirebaseAuthInterop (10.23.0) - - FirebaseCore (10.22.0): + - FirebaseAuthInterop (10.24.0) + - FirebaseCore (10.24.0): - FirebaseCoreInternal (~> 10.0) - GoogleUtilities/Environment (~> 7.12) - GoogleUtilities/Logger (~> 7.12) - - FirebaseCoreExtension (10.22.0): + - FirebaseCoreExtension (10.24.0): - FirebaseCore (~> 10.0) - - FirebaseCoreInternal (10.23.0): + - FirebaseCoreInternal (10.24.0): - "GoogleUtilities/NSData+zlib (~> 7.8)" - - FirebaseFirestore (10.22.0): - - FirebaseFirestoreBinary (= 10.22.0) - - FirebaseFirestoreAbseilBinary (1.2022062300.0) - - FirebaseFirestoreBinary (10.22.0): - - FirebaseCore (= 10.22.0) - - FirebaseCoreExtension (= 10.22.0) - - FirebaseFirestoreInternalBinary (= 10.22.0) - - FirebaseSharedSwift (= 10.22.0) - - FirebaseFirestoreGRPCBoringSSLBinary (1.49.1) - - FirebaseFirestoreGRPCCoreBinary (1.49.1): - - FirebaseFirestoreAbseilBinary (= 1.2022062300.0) - - FirebaseFirestoreGRPCBoringSSLBinary (= 1.49.1) - - FirebaseFirestoreGRPCCPPBinary (1.49.1): - - FirebaseFirestoreAbseilBinary (= 1.2022062300.0) - - FirebaseFirestoreGRPCCoreBinary (= 1.49.1) - - FirebaseFirestoreInternalBinary (10.22.0): - - FirebaseCore (= 10.22.0) - - FirebaseFirestoreAbseilBinary (= 1.2022062300.0) - - FirebaseFirestoreGRPCCPPBinary (= 1.49.1) + - FirebaseFirestore (10.24.0): + - FirebaseFirestoreBinary (= 10.24.0) + - FirebaseFirestoreAbseilBinary (1.2024011601.0) + - FirebaseFirestoreBinary (10.24.0): + - FirebaseCore (= 10.24.0) + - FirebaseCoreExtension (= 10.24.0) + - FirebaseFirestoreInternalBinary (= 10.24.0) + - FirebaseSharedSwift (= 10.24.0) + - FirebaseFirestoreGRPCBoringSSLBinary (1.62.1) + - FirebaseFirestoreGRPCCoreBinary (1.62.1): + - FirebaseFirestoreAbseilBinary (= 1.2024011601.0) + - FirebaseFirestoreGRPCBoringSSLBinary (= 1.62.1) + - FirebaseFirestoreGRPCCPPBinary (1.62.1): + - FirebaseFirestoreAbseilBinary (= 1.2024011601.0) + - FirebaseFirestoreGRPCCoreBinary (= 1.62.1) + - FirebaseFirestoreInternalBinary (10.24.0): + - FirebaseCore (= 10.24.0) + - FirebaseFirestoreAbseilBinary (= 1.2024011601.0) + - FirebaseFirestoreGRPCCPPBinary (= 1.62.1) - leveldb-library (~> 1.22) - nanopb (< 2.30911.0, >= 2.30908.0) - - FirebaseSharedSwift (10.22.0) - - FirebaseStorage (10.22.0): + - FirebaseSharedSwift (10.24.0) + - FirebaseStorage (10.24.0): - FirebaseAppCheckInterop (~> 10.0) - FirebaseAuthInterop (~> 10.0) - FirebaseCore (~> 10.0) @@ -104,10 +103,10 @@ PODS: - GoogleUtilities/Reachability (7.13.0): - GoogleUtilities/Logger - GoogleUtilities/Privacy - - GTMSessionFetcher/Core (3.3.2) + - GTMSessionFetcher/Core (3.4.1) - image_picker_ios (0.0.1): - Flutter - - leveldb-library (1.22.4) + - leveldb-library (1.22.5) - nanopb (2.30909.1): - nanopb/decode (= 2.30909.1) - nanopb/encode (= 2.30909.1) @@ -125,7 +124,7 @@ DEPENDENCIES: - firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) - firebase_core (from `.symlinks/plugins/firebase_core/ios`) - firebase_storage (from `.symlinks/plugins/firebase_storage/ios`) - - FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.22.0`) + - FirebaseFirestore (from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `10.24.0`) - Flutter (from `Flutter`) - geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`) - google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) @@ -169,7 +168,7 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/firebase_storage/ios" FirebaseFirestore: :git: https://github.com/invertase/firestore-ios-sdk-frameworks.git - :tag: 10.22.0 + :tag: 10.24.0 Flutter: :path: Flutter geolocator_apple: @@ -186,43 +185,43 @@ EXTERNAL SOURCES: CHECKOUT OPTIONS: FirebaseFirestore: :git: https://github.com/invertase/firestore-ios-sdk-frameworks.git - :tag: 10.22.0 + :tag: 10.24.0 SPEC CHECKSUMS: - cloud_firestore: 800217bf456c0f55fcf3c5a2e5d44d4533aeb002 - Firebase: 797fd7297b7e1be954432743a0b3f90038e45a71 - firebase_auth: 50bead5d815328246c8111d8c8c0eea4b47be490 - firebase_core: d6dfb4cb86a9ebd92464bb8736075fe967211c97 - firebase_storage: 4d91299aefc706729b17bd17c3a1e874a53722df - FirebaseAppCheckInterop: a1955ce8c30f38f87e7d091630e871e91154d65d - FirebaseAuth: bbe4c68f958504ba9e54aee181adbdf5b664fbc6 - FirebaseAuthInterop: a458e398bb1e9b71b9b42d46e54acc666b021d0f - FirebaseCore: 0326ec9b05fbed8f8716cddbf0e36894a13837f7 - FirebaseCoreExtension: 6394c00b887d0bebadbc7049c464aa0cbddc5d41 - FirebaseCoreInternal: 6a292e6f0bece1243a737e81556e56e5e19282e3 - FirebaseFirestore: 6a8bd88aedb9def0411f53e03b564278685fed93 - FirebaseFirestoreAbseilBinary: fc2004a2da6b5978e974ca49c2e463f5e542a78f - FirebaseFirestoreBinary: c59e4adb329348a5a2479614f718c5b4f7429d5b - FirebaseFirestoreGRPCBoringSSLBinary: 85a615c0b7e97173d6af581c9879baac663d9743 - FirebaseFirestoreGRPCCoreBinary: bf6ed68cea8ad7b24ba091b53374e91a5211a91f - FirebaseFirestoreGRPCCPPBinary: cff111ba3ae5bea45a6562e8bd8750d4a7e2ebc6 - FirebaseFirestoreInternalBinary: 5f38434cc9b36a6897a616a14e85d00c890c5634 - FirebaseSharedSwift: 48076404e6e52372290d15a07d2ed1d2f1754023 - FirebaseStorage: bc7bddc743548a89cfb896843a77cf4bdde2c231 + cloud_firestore: a291c7ca0e498f9b08bbabd47a2499a5ae02c152 + Firebase: 91fefd38712feb9186ea8996af6cbdef41473442 + firebase_auth: 3e976534db970b18163dba2195a931836d4fae83 + firebase_core: 7f1e1156934d0da3be260174812842df9420e4ab + firebase_storage: 35c9b3b30a91e0b3fc54838a624022ec2d7cfef5 + FirebaseAppCheckInterop: fecc08c89936c8acb1428d8088313aabedb348e4 + FirebaseAuth: 711d01cccefaf10035b3090a92956d0dd4f99088 + FirebaseAuthInterop: 29336ab84df12fc0f340ba5fe58d3e5811a4192d + FirebaseCore: 11dc8a16dfb7c5e3c3f45ba0e191a33ac4f50894 + FirebaseCoreExtension: af5fd85e817ea9d19f9a2659a376cf9cf99f03c0 + FirebaseCoreInternal: bcb5acffd4ea05e12a783ecf835f2210ce3dc6af + FirebaseFirestore: 455ba4bf3f0e1da88f77aaa76dc506d920396346 + FirebaseFirestoreAbseilBinary: bd0451946879e0e01327c8efc35896bb273009c4 + FirebaseFirestoreBinary: 7eccf62d9204bd1b8915bf4f30406f6b13a5f01a + FirebaseFirestoreGRPCBoringSSLBinary: c3007e61593e4583ec3bb8b34ce654663663b690 + FirebaseFirestoreGRPCCoreBinary: 1243fc6604a52912694635f891916976924931ed + FirebaseFirestoreGRPCCPPBinary: e447b3a7c060c0abfc4e2c9f6fb53bf7635ded66 + FirebaseFirestoreInternalBinary: 264bc7678c6df6581477b139a216f6b3340efb64 + FirebaseSharedSwift: 76e1529c32101d80e4f1ca2fba7c39d59f0a390a + FirebaseStorage: 03710f9a0e3824d3069ed1128601a3d3a5e7d817 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 geolocator_apple: 6cbaf322953988e009e5ecb481f07efece75c450 google_maps_flutter_ios: f135b968a67c05679e0a53538e900b5c174b0d99 GoogleMaps: 20d7b12be49a14287f797e88e0e31bc4156aaeb4 GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152 - GTMSessionFetcher: 0e876eea9782ec6462e91ab872711c357322c94f + GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd image_picker_ios: b545a5f16c0fa88e3ecbbce3ed4de45567a8ec18 - leveldb-library: 06a69cc7582d64b29424a63e085e683cc188230a + leveldb-library: e8eadf9008a61f9e1dde3978c086d2b6d9b9dc28 nanopb: d4d75c12cd1316f4a64e3c6963f879ecd4b5e0d5 permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2 PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 RecaptchaInterop: 7d1a4a01a6b2cb1610a47ef3f85f0c411434cb21 url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586 -PODFILE CHECKSUM: f30163ccbb8c61c3b7bb0e5de496f3d54363e761 +PODFILE CHECKSUM: 01ec8a5990ede6bbc6720abefed12c5e28f5646e COCOAPODS: 1.15.2 diff --git a/bu_passport/ios/Pods/Firebase/README.md b/bu_passport/ios/Pods/Firebase/README.md index 7ab83d9..6e0742d 100644 --- a/bu_passport/ios/Pods/Firebase/README.md +++ b/bu_passport/ios/Pods/Firebase/README.md @@ -153,7 +153,7 @@ GitHub Actions will verify that any code changes are done in a style-compliant way. Install `clang-format` and `mint`: ```console -brew install clang-format@17 +brew install clang-format@18 brew install mint ``` diff --git a/bu_passport/ios/Pods/FirebaseAuth/README.md b/bu_passport/ios/Pods/FirebaseAuth/README.md index 7ab83d9..6e0742d 100644 --- a/bu_passport/ios/Pods/FirebaseAuth/README.md +++ b/bu_passport/ios/Pods/FirebaseAuth/README.md @@ -153,7 +153,7 @@ GitHub Actions will verify that any code changes are done in a style-compliant way. Install `clang-format` and `mint`: ```console -brew install clang-format@17 +brew install clang-format@18 brew install mint ``` diff --git a/bu_passport/ios/Pods/FirebaseCore/README.md b/bu_passport/ios/Pods/FirebaseCore/README.md index 7ab83d9..6e0742d 100644 --- a/bu_passport/ios/Pods/FirebaseCore/README.md +++ b/bu_passport/ios/Pods/FirebaseCore/README.md @@ -153,7 +153,7 @@ GitHub Actions will verify that any code changes are done in a style-compliant way. Install `clang-format` and `mint`: ```console -brew install clang-format@17 +brew install clang-format@18 brew install mint ``` diff --git a/bu_passport/ios/Pods/FirebaseCoreExtension/README.md b/bu_passport/ios/Pods/FirebaseCoreExtension/README.md index 7ab83d9..6e0742d 100644 --- a/bu_passport/ios/Pods/FirebaseCoreExtension/README.md +++ b/bu_passport/ios/Pods/FirebaseCoreExtension/README.md @@ -153,7 +153,7 @@ GitHub Actions will verify that any code changes are done in a style-compliant way. Install `clang-format` and `mint`: ```console -brew install clang-format@17 +brew install clang-format@18 brew install mint ``` diff --git a/bu_passport/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatsBundle.swift b/bu_passport/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatsBundle.swift index a7db6a5..776dfb8 100644 --- a/bu_passport/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatsBundle.swift +++ b/bu_passport/ios/Pods/FirebaseCoreInternal/FirebaseCore/Internal/Sources/HeartbeatLogging/HeartbeatsBundle.swift @@ -72,8 +72,8 @@ struct HeartbeatsBundle: Codable, HeartbeatsPayloadConvertible { } // Update cache with the new heartbeat's date. - heartbeat.timePeriods.forEach { - lastAddedHeartbeatDates[$0] = heartbeat.date + for timePeriod in heartbeat.timePeriods { + lastAddedHeartbeatDates[timePeriod] = heartbeat.date } } catch let error as RingBuffer.Error { @@ -98,8 +98,8 @@ struct HeartbeatsBundle: Codable, HeartbeatsPayloadConvertible { if case .success = secondPushAttempt { // Update cache with the new heartbeat's date. - diagnosticHeartbeat.timePeriods.forEach { - lastAddedHeartbeatDates[$0] = diagnosticHeartbeat.date + for timePeriod in diagnosticHeartbeat.timePeriods { + lastAddedHeartbeatDates[timePeriod] = diagnosticHeartbeat.date } } } catch { @@ -124,9 +124,9 @@ struct HeartbeatsBundle: Codable, HeartbeatsPayloadConvertible { poppedHeartbeats.append(poppedHeartbeat) } - poppedHeartbeats.reversed().forEach { + for poppedHeartbeat in poppedHeartbeats.reversed() { do { - try buffer.push($0) + try buffer.push(poppedHeartbeat) } catch { // Ignore error. } diff --git a/bu_passport/ios/Pods/FirebaseFirestore/README.md b/bu_passport/ios/Pods/FirebaseFirestore/README.md index 4d56403..4d2c7c1 100644 --- a/bu_passport/ios/Pods/FirebaseFirestore/README.md +++ b/bu_passport/ios/Pods/FirebaseFirestore/README.md @@ -56,6 +56,8 @@ The below are the currently supported Firebase iOS SDK versions of this reposito > **⚠️ Note:** if you are looking for a new version that is not listed in the supported versions list, examine the upstream release notes for firebase-ios-sdk carefully. This can happen if the firebase-ios-sdk team issues an interim release to solve some urgent problem, but do not run their full release process. If that happens, don't worry - just wait for the next supported version before moving forward, or temporarily de-integrate this pre-compiled framework if you must use the interim version. 6.31.1 is an example of this, with more details [here](https://github.com/firebase/firebase-ios-sdk/pull/6368#issuecomment-685030446) for why it might happen. + - [10.24.0](https://github.com/invertase/firestore-ios-sdk-frameworks/releases/tag/10.24.0) + - [10.23.0](https://github.com/invertase/firestore-ios-sdk-frameworks/releases/tag/10.23.0) - [10.22.0](https://github.com/invertase/firestore-ios-sdk-frameworks/releases/tag/10.22.0) - [10.21.0](https://github.com/invertase/firestore-ios-sdk-frameworks/releases/tag/10.21.0) - [10.20.0](https://github.com/invertase/firestore-ios-sdk-frameworks/releases/tag/10.20.0) diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/Info.plist b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/Info.plist deleted file mode 100644 index 69b018c..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/Info.plist +++ /dev/null @@ -1,95 +0,0 @@ - - - - - AvailableLibraries - - - LibraryIdentifier - macos-arm64_x86_64 - LibraryPath - abseil.framework - SupportedArchitectures - - arm64 - x86_64 - - SupportedPlatform - macos - - - LibraryIdentifier - tvos-arm64_x86_64-simulator - LibraryPath - abseil.framework - SupportedArchitectures - - arm64 - x86_64 - - SupportedPlatform - tvos - SupportedPlatformVariant - simulator - - - LibraryIdentifier - tvos-arm64 - LibraryPath - abseil.framework - SupportedArchitectures - - arm64 - - SupportedPlatform - tvos - - - LibraryIdentifier - ios-arm64_x86_64-simulator - LibraryPath - abseil.framework - SupportedArchitectures - - arm64 - x86_64 - - SupportedPlatform - ios - SupportedPlatformVariant - simulator - - - LibraryIdentifier - ios-arm64_x86_64-maccatalyst - LibraryPath - abseil.framework - SupportedArchitectures - - arm64 - x86_64 - - SupportedPlatform - ios - SupportedPlatformVariant - maccatalyst - - - LibraryIdentifier - ios-arm64 - LibraryPath - abseil.framework - SupportedArchitectures - - arm64 - - SupportedPlatform - ios - - - CFBundlePackageType - XFWK - XCFrameworkFormatVersion - 1.0 - - diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/abseil-umbrella.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/abseil-umbrella.h deleted file mode 100644 index 5eefda4..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/abseil-umbrella.h +++ /dev/null @@ -1,252 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "algorithm/algorithm.h" -#import "algorithm/container.h" -#import "base/internal/atomic_hook.h" -#import "base/call_once.h" -#import "base/casts.h" -#import "base/internal/cycleclock.h" -#import "base/internal/low_level_scheduling.h" -#import "base/internal/per_thread_tls.h" -#import "base/internal/spinlock.h" -#import "base/internal/sysinfo.h" -#import "base/internal/thread_identity.h" -#import "base/internal/tsan_mutex_interface.h" -#import "base/internal/unscaledcycleclock.h" -#import "base/internal/hide_ptr.h" -#import "base/internal/identity.h" -#import "base/internal/inline_variable.h" -#import "base/internal/invoke.h" -#import "base/internal/scheduling_mode.h" -#import "base/config.h" -#import "base/options.h" -#import "base/policy_checks.h" -#import "base/attributes.h" -#import "base/const_init.h" -#import "base/internal/thread_annotations.h" -#import "base/macros.h" -#import "base/optimization.h" -#import "base/port.h" -#import "base/thread_annotations.h" -#import "base/dynamic_annotations.h" -#import "base/internal/dynamic_annotations.h" -#import "base/internal/endian.h" -#import "base/internal/unaligned_access.h" -#import "base/internal/errno_saver.h" -#import "base/internal/fast_type_id.h" -#import "base/log_severity.h" -#import "base/internal/direct_mmap.h" -#import "base/internal/low_level_alloc.h" -#import "base/internal/prefetch.h" -#import "base/internal/pretty_function.h" -#import "base/internal/raw_logging.h" -#import "base/internal/spinlock_akaros.inc" -#import "base/internal/spinlock_linux.inc" -#import "base/internal/spinlock_posix.inc" -#import "base/internal/spinlock_wait.h" -#import "base/internal/spinlock_win32.inc" -#import "base/internal/strerror.h" -#import "base/internal/throw_delegate.h" -#import "cleanup/cleanup.h" -#import "cleanup/internal/cleanup.h" -#import "container/internal/common.h" -#import "container/internal/compressed_tuple.h" -#import "container/internal/container_memory.h" -#import "container/fixed_array.h" -#import "container/flat_hash_map.h" -#import "container/flat_hash_set.h" -#import "container/internal/hash_function_defaults.h" -#import "container/internal/hash_policy_traits.h" -#import "container/internal/hashtable_debug_hooks.h" -#import "container/internal/hashtablez_sampler.h" -#import "container/inlined_vector.h" -#import "container/internal/inlined_vector.h" -#import "container/internal/layout.h" -#import "container/internal/raw_hash_map.h" -#import "container/internal/raw_hash_set.h" -#import "debugging/internal/address_is_readable.h" -#import "debugging/internal/elf_mem_image.h" -#import "debugging/internal/vdso_support.h" -#import "debugging/internal/demangle.h" -#import "debugging/internal/stacktrace_aarch64-inl.inc" -#import "debugging/internal/stacktrace_arm-inl.inc" -#import "debugging/internal/stacktrace_config.h" -#import "debugging/internal/stacktrace_emscripten-inl.inc" -#import "debugging/internal/stacktrace_generic-inl.inc" -#import "debugging/internal/stacktrace_powerpc-inl.inc" -#import "debugging/internal/stacktrace_riscv-inl.inc" -#import "debugging/internal/stacktrace_unimplemented-inl.inc" -#import "debugging/internal/stacktrace_win32-inl.inc" -#import "debugging/internal/stacktrace_x86-inl.inc" -#import "debugging/stacktrace.h" -#import "debugging/internal/symbolize.h" -#import "debugging/symbolize.h" -#import "debugging/symbolize_darwin.inc" -#import "debugging/symbolize_elf.inc" -#import "debugging/symbolize_emscripten.inc" -#import "debugging/symbolize_unimplemented.inc" -#import "debugging/symbolize_win32.inc" -#import "functional/any_invocable.h" -#import "functional/internal/any_invocable.h" -#import "functional/bind_front.h" -#import "functional/internal/front_binder.h" -#import "functional/function_ref.h" -#import "functional/internal/function_ref.h" -#import "hash/internal/city.h" -#import "hash/hash.h" -#import "hash/internal/hash.h" -#import "hash/internal/low_level_hash.h" -#import "memory/memory.h" -#import "meta/type_traits.h" -#import "numeric/bits.h" -#import "numeric/internal/bits.h" -#import "numeric/int128.h" -#import "numeric/int128_have_intrinsic.inc" -#import "numeric/int128_no_intrinsic.inc" -#import "numeric/internal/representation.h" -#import "profiling/internal/exponential_biased.h" -#import "profiling/internal/sample_recorder.h" -#import "random/bernoulli_distribution.h" -#import "random/beta_distribution.h" -#import "random/discrete_distribution.h" -#import "random/distributions.h" -#import "random/exponential_distribution.h" -#import "random/gaussian_distribution.h" -#import "random/log_uniform_int_distribution.h" -#import "random/poisson_distribution.h" -#import "random/uniform_int_distribution.h" -#import "random/uniform_real_distribution.h" -#import "random/zipf_distribution.h" -#import "random/internal/distribution_caller.h" -#import "random/internal/fast_uniform_bits.h" -#import "random/internal/fastmath.h" -#import "random/internal/generate_real.h" -#import "random/internal/iostream_state_saver.h" -#import "random/internal/nonsecure_base.h" -#import "random/internal/pcg_engine.h" -#import "random/internal/platform.h" -#import "random/internal/randen_traits.h" -#import "random/internal/pool_urbg.h" -#import "random/internal/randen.h" -#import "random/internal/randen_engine.h" -#import "random/internal/randen_detect.h" -#import "random/internal/randen_hwaes.h" -#import "random/internal/randen_hwaes.h" -#import "random/internal/randen_slow.h" -#import "random/internal/salted_seed_seq.h" -#import "random/internal/seed_material.h" -#import "random/internal/traits.h" -#import "random/internal/uniform_helper.h" -#import "random/internal/wide_multiply.h" -#import "random/random.h" -#import "random/seed_gen_exception.h" -#import "random/seed_sequences.h" -#import "status/internal/status_internal.h" -#import "status/status.h" -#import "status/status_payload_printer.h" -#import "status/internal/statusor_internal.h" -#import "status/statusor.h" -#import "strings/cord.h" -#import "strings/cord_analysis.h" -#import "strings/cord_buffer.h" -#import "strings/internal/cord_data_edge.h" -#import "strings/internal/cord_internal.h" -#import "strings/internal/cord_rep_btree.h" -#import "strings/internal/cord_rep_btree_navigator.h" -#import "strings/internal/cord_rep_btree_reader.h" -#import "strings/internal/cord_rep_consume.h" -#import "strings/internal/cord_rep_crc.h" -#import "strings/internal/cord_rep_flat.h" -#import "strings/internal/cord_rep_ring.h" -#import "strings/internal/cord_rep_ring_reader.h" -#import "strings/internal/cordz_functions.h" -#import "strings/internal/cordz_handle.h" -#import "strings/internal/cordz_info.h" -#import "strings/internal/cordz_statistics.h" -#import "strings/internal/cordz_update_scope.h" -#import "strings/internal/cordz_update_tracker.h" -#import "strings/internal/char_map.h" -#import "strings/internal/escaping.h" -#import "strings/internal/ostringstream.h" -#import "strings/internal/resize_uninitialized.h" -#import "strings/internal/utf8.h" -#import "strings/str_format.h" -#import "strings/internal/str_format/arg.h" -#import "strings/internal/str_format/bind.h" -#import "strings/internal/str_format/checker.h" -#import "strings/internal/str_format/extension.h" -#import "strings/internal/str_format/float_conversion.h" -#import "strings/internal/str_format/output.h" -#import "strings/internal/str_format/parser.h" -#import "strings/ascii.h" -#import "strings/charconv.h" -#import "strings/escaping.h" -#import "strings/internal/charconv_bigint.h" -#import "strings/internal/charconv_parse.h" -#import "strings/internal/memutil.h" -#import "strings/internal/stl_type_traits.h" -#import "strings/internal/str_join_internal.h" -#import "strings/internal/str_split_internal.h" -#import "strings/internal/string_constant.h" -#import "strings/match.h" -#import "strings/numbers.h" -#import "strings/str_cat.h" -#import "strings/str_join.h" -#import "strings/str_replace.h" -#import "strings/str_split.h" -#import "strings/string_view.h" -#import "strings/strip.h" -#import "strings/substitute.h" -#import "synchronization/internal/graphcycles.h" -#import "synchronization/internal/kernel_timeout.h" -#import "synchronization/barrier.h" -#import "synchronization/blocking_counter.h" -#import "synchronization/internal/create_thread_identity.h" -#import "synchronization/internal/futex.h" -#import "synchronization/internal/per_thread_sem.h" -#import "synchronization/internal/waiter.h" -#import "synchronization/mutex.h" -#import "synchronization/notification.h" -#import "time/internal/cctz/include/cctz/civil_time.h" -#import "time/internal/cctz/include/cctz/civil_time_detail.h" -#import "time/internal/cctz/include/cctz/time_zone.h" -#import "time/internal/cctz/include/cctz/zone_info_source.h" -#import "time/internal/cctz/src/time_zone_fixed.h" -#import "time/internal/cctz/src/time_zone_if.h" -#import "time/internal/cctz/src/time_zone_impl.h" -#import "time/internal/cctz/src/time_zone_info.h" -#import "time/internal/cctz/src/time_zone_libc.h" -#import "time/internal/cctz/src/time_zone_posix.h" -#import "time/internal/cctz/src/tzfile.h" -#import "time/civil_time.h" -#import "time/clock.h" -#import "time/internal/get_current_time_chrono.inc" -#import "time/internal/get_current_time_posix.inc" -#import "time/time.h" -#import "types/any.h" -#import "types/bad_any_cast.h" -#import "types/bad_any_cast.h" -#import "types/bad_optional_access.h" -#import "types/bad_variant_access.h" -#import "types/compare.h" -#import "types/internal/optional.h" -#import "types/optional.h" -#import "types/internal/span.h" -#import "types/span.h" -#import "types/internal/variant.h" -#import "types/variant.h" -#import "utility/utility.h" - -FOUNDATION_EXPORT double abslVersionNumber; -FOUNDATION_EXPORT const unsigned char abslVersionString[]; - diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/algorithm/algorithm.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/algorithm/algorithm.h deleted file mode 100644 index e9b4733..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/algorithm/algorithm.h +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: algorithm.h -// ----------------------------------------------------------------------------- -// -// This header file contains Google extensions to the standard C++ -// header. - -#ifndef ABSL_ALGORITHM_ALGORITHM_H_ -#define ABSL_ALGORITHM_ALGORITHM_H_ - -#include -#include -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -namespace algorithm_internal { - -// Performs comparisons with operator==, similar to C++14's `std::equal_to<>`. -struct EqualTo { - template - bool operator()(const T& a, const U& b) const { - return a == b; - } -}; - -template -bool EqualImpl(InputIter1 first1, InputIter1 last1, InputIter2 first2, - InputIter2 last2, Pred pred, std::input_iterator_tag, - std::input_iterator_tag) { - while (true) { - if (first1 == last1) return first2 == last2; - if (first2 == last2) return false; - if (!pred(*first1, *first2)) return false; - ++first1; - ++first2; - } -} - -template -bool EqualImpl(InputIter1 first1, InputIter1 last1, InputIter2 first2, - InputIter2 last2, Pred&& pred, std::random_access_iterator_tag, - std::random_access_iterator_tag) { - return (last1 - first1 == last2 - first2) && - std::equal(first1, last1, first2, std::forward(pred)); -} - -// When we are using our own internal predicate that just applies operator==, we -// forward to the non-predicate form of std::equal. This enables an optimization -// in libstdc++ that can result in std::memcmp being used for integer types. -template -bool EqualImpl(InputIter1 first1, InputIter1 last1, InputIter2 first2, - InputIter2 last2, algorithm_internal::EqualTo /* unused */, - std::random_access_iterator_tag, - std::random_access_iterator_tag) { - return (last1 - first1 == last2 - first2) && - std::equal(first1, last1, first2); -} - -template -It RotateImpl(It first, It middle, It last, std::true_type) { - return std::rotate(first, middle, last); -} - -template -It RotateImpl(It first, It middle, It last, std::false_type) { - std::rotate(first, middle, last); - return std::next(first, std::distance(middle, last)); -} - -} // namespace algorithm_internal - -// equal() -// -// Compares the equality of two ranges specified by pairs of iterators, using -// the given predicate, returning true iff for each corresponding iterator i1 -// and i2 in the first and second range respectively, pred(*i1, *i2) == true -// -// This comparison takes at most min(`last1` - `first1`, `last2` - `first2`) -// invocations of the predicate. Additionally, if InputIter1 and InputIter2 are -// both random-access iterators, and `last1` - `first1` != `last2` - `first2`, -// then the predicate is never invoked and the function returns false. -// -// This is a C++11-compatible implementation of C++14 `std::equal`. See -// https://en.cppreference.com/w/cpp/algorithm/equal for more information. -template -bool equal(InputIter1 first1, InputIter1 last1, InputIter2 first2, - InputIter2 last2, Pred&& pred) { - return algorithm_internal::EqualImpl( - first1, last1, first2, last2, std::forward(pred), - typename std::iterator_traits::iterator_category{}, - typename std::iterator_traits::iterator_category{}); -} - -// Overload of equal() that performs comparison of two ranges specified by pairs -// of iterators using operator==. -template -bool equal(InputIter1 first1, InputIter1 last1, InputIter2 first2, - InputIter2 last2) { - return absl::equal(first1, last1, first2, last2, - algorithm_internal::EqualTo{}); -} - -// linear_search() -// -// Performs a linear search for `value` using the iterator `first` up to -// but not including `last`, returning true if [`first`, `last`) contains an -// element equal to `value`. -// -// A linear search is of O(n) complexity which is guaranteed to make at most -// n = (`last` - `first`) comparisons. A linear search over short containers -// may be faster than a binary search, even when the container is sorted. -template -bool linear_search(InputIterator first, InputIterator last, - const EqualityComparable& value) { - return std::find(first, last, value) != last; -} - -// rotate() -// -// Performs a left rotation on a range of elements (`first`, `last`) such that -// `middle` is now the first element. `rotate()` returns an iterator pointing to -// the first element before rotation. This function is exactly the same as -// `std::rotate`, but fixes a bug in gcc -// <= 4.9 where `std::rotate` returns `void` instead of an iterator. -// -// The complexity of this algorithm is the same as that of `std::rotate`, but if -// `ForwardIterator` is not a random-access iterator, then `absl::rotate` -// performs an additional pass over the range to construct the return value. -template -ForwardIterator rotate(ForwardIterator first, ForwardIterator middle, - ForwardIterator last) { - return algorithm_internal::RotateImpl( - first, middle, last, - std::is_same()); -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_ALGORITHM_ALGORITHM_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/algorithm/container.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/algorithm/container.h deleted file mode 100644 index 26b1952..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/algorithm/container.h +++ /dev/null @@ -1,1774 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: container.h -// ----------------------------------------------------------------------------- -// -// This header file provides Container-based versions of algorithmic functions -// within the C++ standard library. The following standard library sets of -// functions are covered within this file: -// -// * Algorithmic functions -// * Algorithmic functions -// * functions -// -// The standard library functions operate on iterator ranges; the functions -// within this API operate on containers, though many return iterator ranges. -// -// All functions within this API are named with a `c_` prefix. Calls such as -// `absl::c_xx(container, ...) are equivalent to std:: functions such as -// `std::xx(std::begin(cont), std::end(cont), ...)`. Functions that act on -// iterators but not conceptually on iterator ranges (e.g. `std::iter_swap`) -// have no equivalent here. -// -// For template parameter and variable naming, `C` indicates the container type -// to which the function is applied, `Pred` indicates the predicate object type -// to be used by the function and `T` indicates the applicable element type. - -#ifndef ABSL_ALGORITHM_CONTAINER_H_ -#define ABSL_ALGORITHM_CONTAINER_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/algorithm/algorithm.h" -#include "absl/base/macros.h" -#include "absl/meta/type_traits.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_algorithm_internal { - -// NOTE: it is important to defer to ADL lookup for building with C++ modules, -// especially for headers like which are not visible from this file -// but specialize std::begin and std::end. -using std::begin; -using std::end; - -// The type of the iterator given by begin(c) (possibly std::begin(c)). -// ContainerIter> gives vector::const_iterator, -// while ContainerIter> gives vector::iterator. -template -using ContainerIter = decltype(begin(std::declval())); - -// An MSVC bug involving template parameter substitution requires us to use -// decltype() here instead of just std::pair. -template -using ContainerIterPairType = - decltype(std::make_pair(ContainerIter(), ContainerIter())); - -template -using ContainerDifferenceType = - decltype(std::distance(std::declval>(), - std::declval>())); - -template -using ContainerPointerType = - typename std::iterator_traits>::pointer; - -// container_algorithm_internal::c_begin and -// container_algorithm_internal::c_end are abbreviations for proper ADL -// lookup of std::begin and std::end, i.e. -// using std::begin; -// using std::end; -// std::foo(begin(c), end(c)); -// becomes -// std::foo(container_algorithm_internal::begin(c), -// container_algorithm_internal::end(c)); -// These are meant for internal use only. - -template -ContainerIter c_begin(C& c) { return begin(c); } - -template -ContainerIter c_end(C& c) { return end(c); } - -template -struct IsUnorderedContainer : std::false_type {}; - -template -struct IsUnorderedContainer< - std::unordered_map> : std::true_type {}; - -template -struct IsUnorderedContainer> - : std::true_type {}; - -// container_algorithm_internal::c_size. It is meant for internal use only. - -template -auto c_size(C& c) -> decltype(c.size()) { - return c.size(); -} - -template -constexpr std::size_t c_size(T (&)[N]) { - return N; -} - -} // namespace container_algorithm_internal - -// PUBLIC API - -//------------------------------------------------------------------------------ -// Abseil algorithm.h functions -//------------------------------------------------------------------------------ - -// c_linear_search() -// -// Container-based version of absl::linear_search() for performing a linear -// search within a container. -template -bool c_linear_search(const C& c, EqualityComparable&& value) { - return linear_search(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(value)); -} - -//------------------------------------------------------------------------------ -// algorithms -//------------------------------------------------------------------------------ - -// c_distance() -// -// Container-based version of the `std::distance()` function to -// return the number of elements within a container. -template -container_algorithm_internal::ContainerDifferenceType c_distance( - const C& c) { - return std::distance(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -//------------------------------------------------------------------------------ -// Non-modifying sequence operations -//------------------------------------------------------------------------------ - -// c_all_of() -// -// Container-based version of the `std::all_of()` function to -// test if all elements within a container satisfy a condition. -template -bool c_all_of(const C& c, Pred&& pred) { - return std::all_of(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_any_of() -// -// Container-based version of the `std::any_of()` function to -// test if any element in a container fulfills a condition. -template -bool c_any_of(const C& c, Pred&& pred) { - return std::any_of(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_none_of() -// -// Container-based version of the `std::none_of()` function to -// test if no elements in a container fulfill a condition. -template -bool c_none_of(const C& c, Pred&& pred) { - return std::none_of(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_for_each() -// -// Container-based version of the `std::for_each()` function to -// apply a function to a container's elements. -template -decay_t c_for_each(C&& c, Function&& f) { - return std::for_each(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(f)); -} - -// c_find() -// -// Container-based version of the `std::find()` function to find -// the first element containing the passed value within a container value. -template -container_algorithm_internal::ContainerIter c_find(C& c, T&& value) { - return std::find(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(value)); -} - -// c_find_if() -// -// Container-based version of the `std::find_if()` function to find -// the first element in a container matching the given condition. -template -container_algorithm_internal::ContainerIter c_find_if(C& c, Pred&& pred) { - return std::find_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_find_if_not() -// -// Container-based version of the `std::find_if_not()` function to -// find the first element in a container not matching the given condition. -template -container_algorithm_internal::ContainerIter c_find_if_not(C& c, - Pred&& pred) { - return std::find_if_not(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_find_end() -// -// Container-based version of the `std::find_end()` function to -// find the last subsequence within a container. -template -container_algorithm_internal::ContainerIter c_find_end( - Sequence1& sequence, Sequence2& subsequence) { - return std::find_end(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(subsequence), - container_algorithm_internal::c_end(subsequence)); -} - -// Overload of c_find_end() for using a predicate evaluation other than `==` as -// the function's test condition. -template -container_algorithm_internal::ContainerIter c_find_end( - Sequence1& sequence, Sequence2& subsequence, BinaryPredicate&& pred) { - return std::find_end(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(subsequence), - container_algorithm_internal::c_end(subsequence), - std::forward(pred)); -} - -// c_find_first_of() -// -// Container-based version of the `std::find_first_of()` function to -// find the first element within the container that is also within the options -// container. -template -container_algorithm_internal::ContainerIter c_find_first_of(C1& container, - C2& options) { - return std::find_first_of(container_algorithm_internal::c_begin(container), - container_algorithm_internal::c_end(container), - container_algorithm_internal::c_begin(options), - container_algorithm_internal::c_end(options)); -} - -// Overload of c_find_first_of() for using a predicate evaluation other than -// `==` as the function's test condition. -template -container_algorithm_internal::ContainerIter c_find_first_of( - C1& container, C2& options, BinaryPredicate&& pred) { - return std::find_first_of(container_algorithm_internal::c_begin(container), - container_algorithm_internal::c_end(container), - container_algorithm_internal::c_begin(options), - container_algorithm_internal::c_end(options), - std::forward(pred)); -} - -// c_adjacent_find() -// -// Container-based version of the `std::adjacent_find()` function to -// find equal adjacent elements within a container. -template -container_algorithm_internal::ContainerIter c_adjacent_find( - Sequence& sequence) { - return std::adjacent_find(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_adjacent_find() for using a predicate evaluation other than -// `==` as the function's test condition. -template -container_algorithm_internal::ContainerIter c_adjacent_find( - Sequence& sequence, BinaryPredicate&& pred) { - return std::adjacent_find(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(pred)); -} - -// c_count() -// -// Container-based version of the `std::count()` function to count -// values that match within a container. -template -container_algorithm_internal::ContainerDifferenceType c_count( - const C& c, T&& value) { - return std::count(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(value)); -} - -// c_count_if() -// -// Container-based version of the `std::count_if()` function to -// count values matching a condition within a container. -template -container_algorithm_internal::ContainerDifferenceType c_count_if( - const C& c, Pred&& pred) { - return std::count_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_mismatch() -// -// Container-based version of the `std::mismatch()` function to -// return the first element where two ordered containers differ. Applies `==` to -// the first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)). -template -container_algorithm_internal::ContainerIterPairType -c_mismatch(C1& c1, C2& c2) { - auto first1 = container_algorithm_internal::c_begin(c1); - auto last1 = container_algorithm_internal::c_end(c1); - auto first2 = container_algorithm_internal::c_begin(c2); - auto last2 = container_algorithm_internal::c_end(c2); - - for (; first1 != last1 && first2 != last2; ++first1, (void)++first2) { - // Negates equality because Cpp17EqualityComparable doesn't require clients - // to overload both `operator==` and `operator!=`. - if (!(*first1 == *first2)) { - break; - } - } - - return std::make_pair(first1, first2); -} - -// Overload of c_mismatch() for using a predicate evaluation other than `==` as -// the function's test condition. Applies `pred`to the first N elements of `c1` -// and `c2`, where N = min(size(c1), size(c2)). -template -container_algorithm_internal::ContainerIterPairType -c_mismatch(C1& c1, C2& c2, BinaryPredicate pred) { - auto first1 = container_algorithm_internal::c_begin(c1); - auto last1 = container_algorithm_internal::c_end(c1); - auto first2 = container_algorithm_internal::c_begin(c2); - auto last2 = container_algorithm_internal::c_end(c2); - - for (; first1 != last1 && first2 != last2; ++first1, (void)++first2) { - if (!pred(*first1, *first2)) { - break; - } - } - - return std::make_pair(first1, first2); -} - -// c_equal() -// -// Container-based version of the `std::equal()` function to -// test whether two containers are equal. -// -// NOTE: the semantics of c_equal() are slightly different than those of -// equal(): while the latter iterates over the second container only up to the -// size of the first container, c_equal() also checks whether the container -// sizes are equal. This better matches expectations about c_equal() based on -// its signature. -// -// Example: -// vector v1 = <1, 2, 3>; -// vector v2 = <1, 2, 3, 4>; -// equal(std::begin(v1), std::end(v1), std::begin(v2)) returns true -// c_equal(v1, v2) returns false - -template -bool c_equal(const C1& c1, const C2& c2) { - return ((container_algorithm_internal::c_size(c1) == - container_algorithm_internal::c_size(c2)) && - std::equal(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2))); -} - -// Overload of c_equal() for using a predicate evaluation other than `==` as -// the function's test condition. -template -bool c_equal(const C1& c1, const C2& c2, BinaryPredicate&& pred) { - return ((container_algorithm_internal::c_size(c1) == - container_algorithm_internal::c_size(c2)) && - std::equal(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - std::forward(pred))); -} - -// c_is_permutation() -// -// Container-based version of the `std::is_permutation()` function -// to test whether a container is a permutation of another. -template -bool c_is_permutation(const C1& c1, const C2& c2) { - using std::begin; - using std::end; - return c1.size() == c2.size() && - std::is_permutation(begin(c1), end(c1), begin(c2)); -} - -// Overload of c_is_permutation() for using a predicate evaluation other than -// `==` as the function's test condition. -template -bool c_is_permutation(const C1& c1, const C2& c2, BinaryPredicate&& pred) { - using std::begin; - using std::end; - return c1.size() == c2.size() && - std::is_permutation(begin(c1), end(c1), begin(c2), - std::forward(pred)); -} - -// c_search() -// -// Container-based version of the `std::search()` function to search -// a container for a subsequence. -template -container_algorithm_internal::ContainerIter c_search( - Sequence1& sequence, Sequence2& subsequence) { - return std::search(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(subsequence), - container_algorithm_internal::c_end(subsequence)); -} - -// Overload of c_search() for using a predicate evaluation other than -// `==` as the function's test condition. -template -container_algorithm_internal::ContainerIter c_search( - Sequence1& sequence, Sequence2& subsequence, BinaryPredicate&& pred) { - return std::search(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(subsequence), - container_algorithm_internal::c_end(subsequence), - std::forward(pred)); -} - -// c_search_n() -// -// Container-based version of the `std::search_n()` function to -// search a container for the first sequence of N elements. -template -container_algorithm_internal::ContainerIter c_search_n( - Sequence& sequence, Size count, T&& value) { - return std::search_n(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), count, - std::forward(value)); -} - -// Overload of c_search_n() for using a predicate evaluation other than -// `==` as the function's test condition. -template -container_algorithm_internal::ContainerIter c_search_n( - Sequence& sequence, Size count, T&& value, BinaryPredicate&& pred) { - return std::search_n(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), count, - std::forward(value), - std::forward(pred)); -} - -//------------------------------------------------------------------------------ -// Modifying sequence operations -//------------------------------------------------------------------------------ - -// c_copy() -// -// Container-based version of the `std::copy()` function to copy a -// container's elements into an iterator. -template -OutputIterator c_copy(const InputSequence& input, OutputIterator output) { - return std::copy(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), output); -} - -// c_copy_n() -// -// Container-based version of the `std::copy_n()` function to copy a -// container's first N elements into an iterator. -template -OutputIterator c_copy_n(const C& input, Size n, OutputIterator output) { - return std::copy_n(container_algorithm_internal::c_begin(input), n, output); -} - -// c_copy_if() -// -// Container-based version of the `std::copy_if()` function to copy -// a container's elements satisfying some condition into an iterator. -template -OutputIterator c_copy_if(const InputSequence& input, OutputIterator output, - Pred&& pred) { - return std::copy_if(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), output, - std::forward(pred)); -} - -// c_copy_backward() -// -// Container-based version of the `std::copy_backward()` function to -// copy a container's elements in reverse order into an iterator. -template -BidirectionalIterator c_copy_backward(const C& src, - BidirectionalIterator dest) { - return std::copy_backward(container_algorithm_internal::c_begin(src), - container_algorithm_internal::c_end(src), dest); -} - -// c_move() -// -// Container-based version of the `std::move()` function to move -// a container's elements into an iterator. -template -OutputIterator c_move(C&& src, OutputIterator dest) { - return std::move(container_algorithm_internal::c_begin(src), - container_algorithm_internal::c_end(src), dest); -} - -// c_move_backward() -// -// Container-based version of the `std::move_backward()` function to -// move a container's elements into an iterator in reverse order. -template -BidirectionalIterator c_move_backward(C&& src, BidirectionalIterator dest) { - return std::move_backward(container_algorithm_internal::c_begin(src), - container_algorithm_internal::c_end(src), dest); -} - -// c_swap_ranges() -// -// Container-based version of the `std::swap_ranges()` function to -// swap a container's elements with another container's elements. Swaps the -// first N elements of `c1` and `c2`, where N = min(size(c1), size(c2)). -template -container_algorithm_internal::ContainerIter c_swap_ranges(C1& c1, C2& c2) { - auto first1 = container_algorithm_internal::c_begin(c1); - auto last1 = container_algorithm_internal::c_end(c1); - auto first2 = container_algorithm_internal::c_begin(c2); - auto last2 = container_algorithm_internal::c_end(c2); - - using std::swap; - for (; first1 != last1 && first2 != last2; ++first1, (void)++first2) { - swap(*first1, *first2); - } - return first2; -} - -// c_transform() -// -// Container-based version of the `std::transform()` function to -// transform a container's elements using the unary operation, storing the -// result in an iterator pointing to the last transformed element in the output -// range. -template -OutputIterator c_transform(const InputSequence& input, OutputIterator output, - UnaryOp&& unary_op) { - return std::transform(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), output, - std::forward(unary_op)); -} - -// Overload of c_transform() for performing a transformation using a binary -// predicate. Applies `binary_op` to the first N elements of `c1` and `c2`, -// where N = min(size(c1), size(c2)). -template -OutputIterator c_transform(const InputSequence1& input1, - const InputSequence2& input2, OutputIterator output, - BinaryOp&& binary_op) { - auto first1 = container_algorithm_internal::c_begin(input1); - auto last1 = container_algorithm_internal::c_end(input1); - auto first2 = container_algorithm_internal::c_begin(input2); - auto last2 = container_algorithm_internal::c_end(input2); - for (; first1 != last1 && first2 != last2; - ++first1, (void)++first2, ++output) { - *output = binary_op(*first1, *first2); - } - - return output; -} - -// c_replace() -// -// Container-based version of the `std::replace()` function to -// replace a container's elements of some value with a new value. The container -// is modified in place. -template -void c_replace(Sequence& sequence, const T& old_value, const T& new_value) { - std::replace(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), old_value, - new_value); -} - -// c_replace_if() -// -// Container-based version of the `std::replace_if()` function to -// replace a container's elements of some value with a new value based on some -// condition. The container is modified in place. -template -void c_replace_if(C& c, Pred&& pred, T&& new_value) { - std::replace_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred), std::forward(new_value)); -} - -// c_replace_copy() -// -// Container-based version of the `std::replace_copy()` function to -// replace a container's elements of some value with a new value and return the -// results within an iterator. -template -OutputIterator c_replace_copy(const C& c, OutputIterator result, T&& old_value, - T&& new_value) { - return std::replace_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(old_value), - std::forward(new_value)); -} - -// c_replace_copy_if() -// -// Container-based version of the `std::replace_copy_if()` function -// to replace a container's elements of some value with a new value based on -// some condition, and return the results within an iterator. -template -OutputIterator c_replace_copy_if(const C& c, OutputIterator result, Pred&& pred, - T&& new_value) { - return std::replace_copy_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(pred), - std::forward(new_value)); -} - -// c_fill() -// -// Container-based version of the `std::fill()` function to fill a -// container with some value. -template -void c_fill(C& c, T&& value) { - std::fill(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), std::forward(value)); -} - -// c_fill_n() -// -// Container-based version of the `std::fill_n()` function to fill -// the first N elements in a container with some value. -template -void c_fill_n(C& c, Size n, T&& value) { - std::fill_n(container_algorithm_internal::c_begin(c), n, - std::forward(value)); -} - -// c_generate() -// -// Container-based version of the `std::generate()` function to -// assign a container's elements to the values provided by the given generator. -template -void c_generate(C& c, Generator&& gen) { - std::generate(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(gen)); -} - -// c_generate_n() -// -// Container-based version of the `std::generate_n()` function to -// assign a container's first N elements to the values provided by the given -// generator. -template -container_algorithm_internal::ContainerIter c_generate_n(C& c, Size n, - Generator&& gen) { - return std::generate_n(container_algorithm_internal::c_begin(c), n, - std::forward(gen)); -} - -// Note: `c_xx()` container versions for `remove()`, `remove_if()`, -// and `unique()` are omitted, because it's not clear whether or not such -// functions should call erase on their supplied sequences afterwards. Either -// behavior would be surprising for a different set of users. - -// c_remove_copy() -// -// Container-based version of the `std::remove_copy()` function to -// copy a container's elements while removing any elements matching the given -// `value`. -template -OutputIterator c_remove_copy(const C& c, OutputIterator result, T&& value) { - return std::remove_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(value)); -} - -// c_remove_copy_if() -// -// Container-based version of the `std::remove_copy_if()` function -// to copy a container's elements while removing any elements matching the given -// condition. -template -OutputIterator c_remove_copy_if(const C& c, OutputIterator result, - Pred&& pred) { - return std::remove_copy_if(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(pred)); -} - -// c_unique_copy() -// -// Container-based version of the `std::unique_copy()` function to -// copy a container's elements while removing any elements containing duplicate -// values. -template -OutputIterator c_unique_copy(const C& c, OutputIterator result) { - return std::unique_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result); -} - -// Overload of c_unique_copy() for using a predicate evaluation other than -// `==` for comparing uniqueness of the element values. -template -OutputIterator c_unique_copy(const C& c, OutputIterator result, - BinaryPredicate&& pred) { - return std::unique_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), result, - std::forward(pred)); -} - -// c_reverse() -// -// Container-based version of the `std::reverse()` function to -// reverse a container's elements. -template -void c_reverse(Sequence& sequence) { - std::reverse(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// c_reverse_copy() -// -// Container-based version of the `std::reverse()` function to -// reverse a container's elements and write them to an iterator range. -template -OutputIterator c_reverse_copy(const C& sequence, OutputIterator result) { - return std::reverse_copy(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - result); -} - -// c_rotate() -// -// Container-based version of the `std::rotate()` function to -// shift a container's elements leftward such that the `middle` element becomes -// the first element in the container. -template > -Iterator c_rotate(C& sequence, Iterator middle) { - return absl::rotate(container_algorithm_internal::c_begin(sequence), middle, - container_algorithm_internal::c_end(sequence)); -} - -// c_rotate_copy() -// -// Container-based version of the `std::rotate_copy()` function to -// shift a container's elements leftward such that the `middle` element becomes -// the first element in a new iterator range. -template -OutputIterator c_rotate_copy( - const C& sequence, - container_algorithm_internal::ContainerIter middle, - OutputIterator result) { - return std::rotate_copy(container_algorithm_internal::c_begin(sequence), - middle, container_algorithm_internal::c_end(sequence), - result); -} - -// c_shuffle() -// -// Container-based version of the `std::shuffle()` function to -// randomly shuffle elements within the container using a `gen()` uniform random -// number generator. -template -void c_shuffle(RandomAccessContainer& c, UniformRandomBitGenerator&& gen) { - std::shuffle(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(gen)); -} - -//------------------------------------------------------------------------------ -// Partition functions -//------------------------------------------------------------------------------ - -// c_is_partitioned() -// -// Container-based version of the `std::is_partitioned()` function -// to test whether all elements in the container for which `pred` returns `true` -// precede those for which `pred` is `false`. -template -bool c_is_partitioned(const C& c, Pred&& pred) { - return std::is_partitioned(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_partition() -// -// Container-based version of the `std::partition()` function -// to rearrange all elements in a container in such a way that all elements for -// which `pred` returns `true` precede all those for which it returns `false`, -// returning an iterator to the first element of the second group. -template -container_algorithm_internal::ContainerIter c_partition(C& c, Pred&& pred) { - return std::partition(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_stable_partition() -// -// Container-based version of the `std::stable_partition()` function -// to rearrange all elements in a container in such a way that all elements for -// which `pred` returns `true` precede all those for which it returns `false`, -// preserving the relative ordering between the two groups. The function returns -// an iterator to the first element of the second group. -template -container_algorithm_internal::ContainerIter c_stable_partition(C& c, - Pred&& pred) { - return std::stable_partition(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -// c_partition_copy() -// -// Container-based version of the `std::partition_copy()` function -// to partition a container's elements and return them into two iterators: one -// for which `pred` returns `true`, and one for which `pred` returns `false.` - -template -std::pair c_partition_copy( - const C& c, OutputIterator1 out_true, OutputIterator2 out_false, - Pred&& pred) { - return std::partition_copy(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), out_true, - out_false, std::forward(pred)); -} - -// c_partition_point() -// -// Container-based version of the `std::partition_point()` function -// to return the first element of an already partitioned container for which -// the given `pred` is not `true`. -template -container_algorithm_internal::ContainerIter c_partition_point(C& c, - Pred&& pred) { - return std::partition_point(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(pred)); -} - -//------------------------------------------------------------------------------ -// Sorting functions -//------------------------------------------------------------------------------ - -// c_sort() -// -// Container-based version of the `std::sort()` function -// to sort elements in ascending order of their values. -template -void c_sort(C& c) { - std::sort(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_sort() for performing a `comp` comparison other than the -// default `operator<`. -template -void c_sort(C& c, LessThan&& comp) { - std::sort(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_stable_sort() -// -// Container-based version of the `std::stable_sort()` function -// to sort elements in ascending order of their values, preserving the order -// of equivalents. -template -void c_stable_sort(C& c) { - std::stable_sort(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_stable_sort() for performing a `comp` comparison other than the -// default `operator<`. -template -void c_stable_sort(C& c, LessThan&& comp) { - std::stable_sort(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_is_sorted() -// -// Container-based version of the `std::is_sorted()` function -// to evaluate whether the given container is sorted in ascending order. -template -bool c_is_sorted(const C& c) { - return std::is_sorted(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// c_is_sorted() overload for performing a `comp` comparison other than the -// default `operator<`. -template -bool c_is_sorted(const C& c, LessThan&& comp) { - return std::is_sorted(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_partial_sort() -// -// Container-based version of the `std::partial_sort()` function -// to rearrange elements within a container such that elements before `middle` -// are sorted in ascending order. -template -void c_partial_sort( - RandomAccessContainer& sequence, - container_algorithm_internal::ContainerIter middle) { - std::partial_sort(container_algorithm_internal::c_begin(sequence), middle, - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_partial_sort() for performing a `comp` comparison other than -// the default `operator<`. -template -void c_partial_sort( - RandomAccessContainer& sequence, - container_algorithm_internal::ContainerIter middle, - LessThan&& comp) { - std::partial_sort(container_algorithm_internal::c_begin(sequence), middle, - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_partial_sort_copy() -// -// Container-based version of the `std::partial_sort_copy()` -// function to sort the elements in the given range `result` within the larger -// `sequence` in ascending order (and using `result` as the output parameter). -// At most min(result.last - result.first, sequence.last - sequence.first) -// elements from the sequence will be stored in the result. -template -container_algorithm_internal::ContainerIter -c_partial_sort_copy(const C& sequence, RandomAccessContainer& result) { - return std::partial_sort_copy(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(result), - container_algorithm_internal::c_end(result)); -} - -// Overload of c_partial_sort_copy() for performing a `comp` comparison other -// than the default `operator<`. -template -container_algorithm_internal::ContainerIter -c_partial_sort_copy(const C& sequence, RandomAccessContainer& result, - LessThan&& comp) { - return std::partial_sort_copy(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - container_algorithm_internal::c_begin(result), - container_algorithm_internal::c_end(result), - std::forward(comp)); -} - -// c_is_sorted_until() -// -// Container-based version of the `std::is_sorted_until()` function -// to return the first element within a container that is not sorted in -// ascending order as an iterator. -template -container_algorithm_internal::ContainerIter c_is_sorted_until(C& c) { - return std::is_sorted_until(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_is_sorted_until() for performing a `comp` comparison other than -// the default `operator<`. -template -container_algorithm_internal::ContainerIter c_is_sorted_until( - C& c, LessThan&& comp) { - return std::is_sorted_until(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_nth_element() -// -// Container-based version of the `std::nth_element()` function -// to rearrange the elements within a container such that the `nth` element -// would be in that position in an ordered sequence; other elements may be in -// any order, except that all preceding `nth` will be less than that element, -// and all following `nth` will be greater than that element. -template -void c_nth_element( - RandomAccessContainer& sequence, - container_algorithm_internal::ContainerIter nth) { - std::nth_element(container_algorithm_internal::c_begin(sequence), nth, - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_nth_element() for performing a `comp` comparison other than -// the default `operator<`. -template -void c_nth_element( - RandomAccessContainer& sequence, - container_algorithm_internal::ContainerIter nth, - LessThan&& comp) { - std::nth_element(container_algorithm_internal::c_begin(sequence), nth, - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Binary Search -//------------------------------------------------------------------------------ - -// c_lower_bound() -// -// Container-based version of the `std::lower_bound()` function -// to return an iterator pointing to the first element in a sorted container -// which does not compare less than `value`. -template -container_algorithm_internal::ContainerIter c_lower_bound( - Sequence& sequence, T&& value) { - return std::lower_bound(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value)); -} - -// Overload of c_lower_bound() for performing a `comp` comparison other than -// the default `operator<`. -template -container_algorithm_internal::ContainerIter c_lower_bound( - Sequence& sequence, T&& value, LessThan&& comp) { - return std::lower_bound(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value), std::forward(comp)); -} - -// c_upper_bound() -// -// Container-based version of the `std::upper_bound()` function -// to return an iterator pointing to the first element in a sorted container -// which is greater than `value`. -template -container_algorithm_internal::ContainerIter c_upper_bound( - Sequence& sequence, T&& value) { - return std::upper_bound(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value)); -} - -// Overload of c_upper_bound() for performing a `comp` comparison other than -// the default `operator<`. -template -container_algorithm_internal::ContainerIter c_upper_bound( - Sequence& sequence, T&& value, LessThan&& comp) { - return std::upper_bound(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value), std::forward(comp)); -} - -// c_equal_range() -// -// Container-based version of the `std::equal_range()` function -// to return an iterator pair pointing to the first and last elements in a -// sorted container which compare equal to `value`. -template -container_algorithm_internal::ContainerIterPairType -c_equal_range(Sequence& sequence, T&& value) { - return std::equal_range(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value)); -} - -// Overload of c_equal_range() for performing a `comp` comparison other than -// the default `operator<`. -template -container_algorithm_internal::ContainerIterPairType -c_equal_range(Sequence& sequence, T&& value, LessThan&& comp) { - return std::equal_range(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value), std::forward(comp)); -} - -// c_binary_search() -// -// Container-based version of the `std::binary_search()` function -// to test if any element in the sorted container contains a value equivalent to -// 'value'. -template -bool c_binary_search(Sequence&& sequence, T&& value) { - return std::binary_search(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value)); -} - -// Overload of c_binary_search() for performing a `comp` comparison other than -// the default `operator<`. -template -bool c_binary_search(Sequence&& sequence, T&& value, LessThan&& comp) { - return std::binary_search(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Merge functions -//------------------------------------------------------------------------------ - -// c_merge() -// -// Container-based version of the `std::merge()` function -// to merge two sorted containers into a single sorted iterator. -template -OutputIterator c_merge(const C1& c1, const C2& c2, OutputIterator result) { - return std::merge(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), result); -} - -// Overload of c_merge() for performing a `comp` comparison other than -// the default `operator<`. -template -OutputIterator c_merge(const C1& c1, const C2& c2, OutputIterator result, - LessThan&& comp) { - return std::merge(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), result, - std::forward(comp)); -} - -// c_inplace_merge() -// -// Container-based version of the `std::inplace_merge()` function -// to merge a supplied iterator `middle` into a container. -template -void c_inplace_merge(C& c, - container_algorithm_internal::ContainerIter middle) { - std::inplace_merge(container_algorithm_internal::c_begin(c), middle, - container_algorithm_internal::c_end(c)); -} - -// Overload of c_inplace_merge() for performing a merge using a `comp` other -// than `operator<`. -template -void c_inplace_merge(C& c, - container_algorithm_internal::ContainerIter middle, - LessThan&& comp) { - std::inplace_merge(container_algorithm_internal::c_begin(c), middle, - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_includes() -// -// Container-based version of the `std::includes()` function -// to test whether a sorted container `c1` entirely contains another sorted -// container `c2`. -template -bool c_includes(const C1& c1, const C2& c2) { - return std::includes(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2)); -} - -// Overload of c_includes() for performing a merge using a `comp` other than -// `operator<`. -template -bool c_includes(const C1& c1, const C2& c2, LessThan&& comp) { - return std::includes(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), - std::forward(comp)); -} - -// c_set_union() -// -// Container-based version of the `std::set_union()` function -// to return an iterator containing the union of two containers; duplicate -// values are not copied into the output. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -OutputIterator c_set_union(const C1& c1, const C2& c2, OutputIterator output) { - return std::set_union(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output); -} - -// Overload of c_set_union() for performing a merge using a `comp` other than -// `operator<`. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -OutputIterator c_set_union(const C1& c1, const C2& c2, OutputIterator output, - LessThan&& comp) { - return std::set_union(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output, - std::forward(comp)); -} - -// c_set_intersection() -// -// Container-based version of the `std::set_intersection()` function -// to return an iterator containing the intersection of two sorted containers. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -OutputIterator c_set_intersection(const C1& c1, const C2& c2, - OutputIterator output) { - // In debug builds, ensure that both containers are sorted with respect to the - // default comparator. std::set_intersection requires the containers be sorted - // using operator<. - assert(absl::c_is_sorted(c1)); - assert(absl::c_is_sorted(c2)); - return std::set_intersection(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output); -} - -// Overload of c_set_intersection() for performing a merge using a `comp` other -// than `operator<`. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -OutputIterator c_set_intersection(const C1& c1, const C2& c2, - OutputIterator output, LessThan&& comp) { - // In debug builds, ensure that both containers are sorted with respect to the - // default comparator. std::set_intersection requires the containers be sorted - // using the same comparator. - assert(absl::c_is_sorted(c1, comp)); - assert(absl::c_is_sorted(c2, comp)); - return std::set_intersection(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output, - std::forward(comp)); -} - -// c_set_difference() -// -// Container-based version of the `std::set_difference()` function -// to return an iterator containing elements present in the first container but -// not in the second. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -OutputIterator c_set_difference(const C1& c1, const C2& c2, - OutputIterator output) { - return std::set_difference(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output); -} - -// Overload of c_set_difference() for performing a merge using a `comp` other -// than `operator<`. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -OutputIterator c_set_difference(const C1& c1, const C2& c2, - OutputIterator output, LessThan&& comp) { - return std::set_difference(container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output, - std::forward(comp)); -} - -// c_set_symmetric_difference() -// -// Container-based version of the `std::set_symmetric_difference()` -// function to return an iterator containing elements present in either one -// container or the other, but not both. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -OutputIterator c_set_symmetric_difference(const C1& c1, const C2& c2, - OutputIterator output) { - return std::set_symmetric_difference( - container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output); -} - -// Overload of c_set_symmetric_difference() for performing a merge using a -// `comp` other than `operator<`. -template ::value, - void>::type, - typename = typename std::enable_if< - !container_algorithm_internal::IsUnorderedContainer::value, - void>::type> -OutputIterator c_set_symmetric_difference(const C1& c1, const C2& c2, - OutputIterator output, - LessThan&& comp) { - return std::set_symmetric_difference( - container_algorithm_internal::c_begin(c1), - container_algorithm_internal::c_end(c1), - container_algorithm_internal::c_begin(c2), - container_algorithm_internal::c_end(c2), output, - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Heap functions -//------------------------------------------------------------------------------ - -// c_push_heap() -// -// Container-based version of the `std::push_heap()` function -// to push a value onto a container heap. -template -void c_push_heap(RandomAccessContainer& sequence) { - std::push_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_push_heap() for performing a push operation on a heap using a -// `comp` other than `operator<`. -template -void c_push_heap(RandomAccessContainer& sequence, LessThan&& comp) { - std::push_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_pop_heap() -// -// Container-based version of the `std::pop_heap()` function -// to pop a value from a heap container. -template -void c_pop_heap(RandomAccessContainer& sequence) { - std::pop_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_pop_heap() for performing a pop operation on a heap using a -// `comp` other than `operator<`. -template -void c_pop_heap(RandomAccessContainer& sequence, LessThan&& comp) { - std::pop_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_make_heap() -// -// Container-based version of the `std::make_heap()` function -// to make a container a heap. -template -void c_make_heap(RandomAccessContainer& sequence) { - std::make_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_make_heap() for performing heap comparisons using a -// `comp` other than `operator<` -template -void c_make_heap(RandomAccessContainer& sequence, LessThan&& comp) { - std::make_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_sort_heap() -// -// Container-based version of the `std::sort_heap()` function -// to sort a heap into ascending order (after which it is no longer a heap). -template -void c_sort_heap(RandomAccessContainer& sequence) { - std::sort_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_sort_heap() for performing heap comparisons using a -// `comp` other than `operator<` -template -void c_sort_heap(RandomAccessContainer& sequence, LessThan&& comp) { - std::sort_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_is_heap() -// -// Container-based version of the `std::is_heap()` function -// to check whether the given container is a heap. -template -bool c_is_heap(const RandomAccessContainer& sequence) { - return std::is_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_is_heap() for performing heap comparisons using a -// `comp` other than `operator<` -template -bool c_is_heap(const RandomAccessContainer& sequence, LessThan&& comp) { - return std::is_heap(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_is_heap_until() -// -// Container-based version of the `std::is_heap_until()` function -// to find the first element in a given container which is not in heap order. -template -container_algorithm_internal::ContainerIter -c_is_heap_until(RandomAccessContainer& sequence) { - return std::is_heap_until(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_is_heap_until() for performing heap comparisons using a -// `comp` other than `operator<` -template -container_algorithm_internal::ContainerIter -c_is_heap_until(RandomAccessContainer& sequence, LessThan&& comp) { - return std::is_heap_until(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Min/max -//------------------------------------------------------------------------------ - -// c_min_element() -// -// Container-based version of the `std::min_element()` function -// to return an iterator pointing to the element with the smallest value, using -// `operator<` to make the comparisons. -template -container_algorithm_internal::ContainerIter c_min_element( - Sequence& sequence) { - return std::min_element(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_min_element() for performing a `comp` comparison other than -// `operator<`. -template -container_algorithm_internal::ContainerIter c_min_element( - Sequence& sequence, LessThan&& comp) { - return std::min_element(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_max_element() -// -// Container-based version of the `std::max_element()` function -// to return an iterator pointing to the element with the largest value, using -// `operator<` to make the comparisons. -template -container_algorithm_internal::ContainerIter c_max_element( - Sequence& sequence) { - return std::max_element(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence)); -} - -// Overload of c_max_element() for performing a `comp` comparison other than -// `operator<`. -template -container_algorithm_internal::ContainerIter c_max_element( - Sequence& sequence, LessThan&& comp) { - return std::max_element(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(comp)); -} - -// c_minmax_element() -// -// Container-based version of the `std::minmax_element()` function -// to return a pair of iterators pointing to the elements containing the -// smallest and largest values, respectively, using `operator<` to make the -// comparisons. -template -container_algorithm_internal::ContainerIterPairType -c_minmax_element(C& c) { - return std::minmax_element(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_minmax_element() for performing `comp` comparisons other than -// `operator<`. -template -container_algorithm_internal::ContainerIterPairType -c_minmax_element(C& c, LessThan&& comp) { - return std::minmax_element(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// Lexicographical Comparisons -//------------------------------------------------------------------------------ - -// c_lexicographical_compare() -// -// Container-based version of the `std::lexicographical_compare()` -// function to lexicographically compare (e.g. sort words alphabetically) two -// container sequences. The comparison is performed using `operator<`. Note -// that capital letters ("A-Z") have ASCII values less than lowercase letters -// ("a-z"). -template -bool c_lexicographical_compare(Sequence1&& sequence1, Sequence2&& sequence2) { - return std::lexicographical_compare( - container_algorithm_internal::c_begin(sequence1), - container_algorithm_internal::c_end(sequence1), - container_algorithm_internal::c_begin(sequence2), - container_algorithm_internal::c_end(sequence2)); -} - -// Overload of c_lexicographical_compare() for performing a lexicographical -// comparison using a `comp` operator instead of `operator<`. -template -bool c_lexicographical_compare(Sequence1&& sequence1, Sequence2&& sequence2, - LessThan&& comp) { - return std::lexicographical_compare( - container_algorithm_internal::c_begin(sequence1), - container_algorithm_internal::c_end(sequence1), - container_algorithm_internal::c_begin(sequence2), - container_algorithm_internal::c_end(sequence2), - std::forward(comp)); -} - -// c_next_permutation() -// -// Container-based version of the `std::next_permutation()` function -// to rearrange a container's elements into the next lexicographically greater -// permutation. -template -bool c_next_permutation(C& c) { - return std::next_permutation(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_next_permutation() for performing a lexicographical -// comparison using a `comp` operator instead of `operator<`. -template -bool c_next_permutation(C& c, LessThan&& comp) { - return std::next_permutation(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -// c_prev_permutation() -// -// Container-based version of the `std::prev_permutation()` function -// to rearrange a container's elements into the next lexicographically lesser -// permutation. -template -bool c_prev_permutation(C& c) { - return std::prev_permutation(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c)); -} - -// Overload of c_prev_permutation() for performing a lexicographical -// comparison using a `comp` operator instead of `operator<`. -template -bool c_prev_permutation(C& c, LessThan&& comp) { - return std::prev_permutation(container_algorithm_internal::c_begin(c), - container_algorithm_internal::c_end(c), - std::forward(comp)); -} - -//------------------------------------------------------------------------------ -// algorithms -//------------------------------------------------------------------------------ - -// c_iota() -// -// Container-based version of the `std::iota()` function -// to compute successive values of `value`, as if incremented with `++value` -// after each element is written. and write them to the container. -template -void c_iota(Sequence& sequence, T&& value) { - std::iota(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(value)); -} -// c_accumulate() -// -// Container-based version of the `std::accumulate()` function -// to accumulate the element values of a container to `init` and return that -// accumulation by value. -// -// Note: Due to a language technicality this function has return type -// absl::decay_t. As a user of this function you can casually read -// this as "returns T by value" and assume it does the right thing. -template -decay_t c_accumulate(const Sequence& sequence, T&& init) { - return std::accumulate(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(init)); -} - -// Overload of c_accumulate() for using a binary operations other than -// addition for computing the accumulation. -template -decay_t c_accumulate(const Sequence& sequence, T&& init, - BinaryOp&& binary_op) { - return std::accumulate(container_algorithm_internal::c_begin(sequence), - container_algorithm_internal::c_end(sequence), - std::forward(init), - std::forward(binary_op)); -} - -// c_inner_product() -// -// Container-based version of the `std::inner_product()` function -// to compute the cumulative inner product of container element pairs. -// -// Note: Due to a language technicality this function has return type -// absl::decay_t. As a user of this function you can casually read -// this as "returns T by value" and assume it does the right thing. -template -decay_t c_inner_product(const Sequence1& factors1, const Sequence2& factors2, - T&& sum) { - return std::inner_product(container_algorithm_internal::c_begin(factors1), - container_algorithm_internal::c_end(factors1), - container_algorithm_internal::c_begin(factors2), - std::forward(sum)); -} - -// Overload of c_inner_product() for using binary operations other than -// `operator+` (for computing the accumulation) and `operator*` (for computing -// the product between the two container's element pair). -template -decay_t c_inner_product(const Sequence1& factors1, const Sequence2& factors2, - T&& sum, BinaryOp1&& op1, BinaryOp2&& op2) { - return std::inner_product(container_algorithm_internal::c_begin(factors1), - container_algorithm_internal::c_end(factors1), - container_algorithm_internal::c_begin(factors2), - std::forward(sum), std::forward(op1), - std::forward(op2)); -} - -// c_adjacent_difference() -// -// Container-based version of the `std::adjacent_difference()` -// function to compute the difference between each element and the one preceding -// it and write it to an iterator. -template -OutputIt c_adjacent_difference(const InputSequence& input, - OutputIt output_first) { - return std::adjacent_difference(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), - output_first); -} - -// Overload of c_adjacent_difference() for using a binary operation other than -// subtraction to compute the adjacent difference. -template -OutputIt c_adjacent_difference(const InputSequence& input, - OutputIt output_first, BinaryOp&& op) { - return std::adjacent_difference(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), - output_first, std::forward(op)); -} - -// c_partial_sum() -// -// Container-based version of the `std::partial_sum()` function -// to compute the partial sum of the elements in a sequence and write them -// to an iterator. The partial sum is the sum of all element values so far in -// the sequence. -template -OutputIt c_partial_sum(const InputSequence& input, OutputIt output_first) { - return std::partial_sum(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), - output_first); -} - -// Overload of c_partial_sum() for using a binary operation other than addition -// to compute the "partial sum". -template -OutputIt c_partial_sum(const InputSequence& input, OutputIt output_first, - BinaryOp&& op) { - return std::partial_sum(container_algorithm_internal::c_begin(input), - container_algorithm_internal::c_end(input), - output_first, std::forward(op)); -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_ALGORITHM_CONTAINER_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/attributes.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/attributes.h deleted file mode 100644 index e4e7a3d..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/attributes.h +++ /dev/null @@ -1,762 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This header file defines macros for declaring attributes for functions, -// types, and variables. -// -// These macros are used within Abseil and allow the compiler to optimize, where -// applicable, certain function calls. -// -// Most macros here are exposing GCC or Clang features, and are stubbed out for -// other compilers. -// -// GCC attributes documentation: -// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html -// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Variable-Attributes.html -// https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Type-Attributes.html -// -// Most attributes in this file are already supported by GCC 4.7. However, some -// of them are not supported in older version of Clang. Thus, we check -// `__has_attribute()` first. If the check fails, we check if we are on GCC and -// assume the attribute exists on GCC (which is verified on GCC 4.7). - -#ifndef ABSL_BASE_ATTRIBUTES_H_ -#define ABSL_BASE_ATTRIBUTES_H_ - -#include "absl/base/config.h" - -// ABSL_HAVE_ATTRIBUTE -// -// A function-like feature checking macro that is a wrapper around -// `__has_attribute`, which is defined by GCC 5+ and Clang and evaluates to a -// nonzero constant integer if the attribute is supported or 0 if not. -// -// It evaluates to zero if `__has_attribute` is not defined by the compiler. -// -// GCC: https://gcc.gnu.org/gcc-5/changes.html -// Clang: https://clang.llvm.org/docs/LanguageExtensions.html -#ifdef __has_attribute -#define ABSL_HAVE_ATTRIBUTE(x) __has_attribute(x) -#else -#define ABSL_HAVE_ATTRIBUTE(x) 0 -#endif - -// ABSL_HAVE_CPP_ATTRIBUTE -// -// A function-like feature checking macro that accepts C++11 style attributes. -// It's a wrapper around `__has_cpp_attribute`, defined by ISO C++ SD-6 -// (https://en.cppreference.com/w/cpp/experimental/feature_test). If we don't -// find `__has_cpp_attribute`, will evaluate to 0. -#if defined(__cplusplus) && defined(__has_cpp_attribute) -// NOTE: requiring __cplusplus above should not be necessary, but -// works around https://bugs.llvm.org/show_bug.cgi?id=23435. -#define ABSL_HAVE_CPP_ATTRIBUTE(x) __has_cpp_attribute(x) -#else -#define ABSL_HAVE_CPP_ATTRIBUTE(x) 0 -#endif - -// ----------------------------------------------------------------------------- -// Function Attributes -// ----------------------------------------------------------------------------- -// -// GCC: https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html -// Clang: https://clang.llvm.org/docs/AttributeReference.html - -// ABSL_PRINTF_ATTRIBUTE -// ABSL_SCANF_ATTRIBUTE -// -// Tells the compiler to perform `printf` format string checking if the -// compiler supports it; see the 'format' attribute in -// . -// -// Note: As the GCC manual states, "[s]ince non-static C++ methods -// have an implicit 'this' argument, the arguments of such methods -// should be counted from two, not one." -#if ABSL_HAVE_ATTRIBUTE(format) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_PRINTF_ATTRIBUTE(string_index, first_to_check) \ - __attribute__((__format__(__printf__, string_index, first_to_check))) -#define ABSL_SCANF_ATTRIBUTE(string_index, first_to_check) \ - __attribute__((__format__(__scanf__, string_index, first_to_check))) -#else -#define ABSL_PRINTF_ATTRIBUTE(string_index, first_to_check) -#define ABSL_SCANF_ATTRIBUTE(string_index, first_to_check) -#endif - -// ABSL_ATTRIBUTE_ALWAYS_INLINE -// ABSL_ATTRIBUTE_NOINLINE -// -// Forces functions to either inline or not inline. Introduced in gcc 3.1. -#if ABSL_HAVE_ATTRIBUTE(always_inline) || \ - (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_ALWAYS_INLINE __attribute__((always_inline)) -#define ABSL_HAVE_ATTRIBUTE_ALWAYS_INLINE 1 -#else -#define ABSL_ATTRIBUTE_ALWAYS_INLINE -#endif - -#if ABSL_HAVE_ATTRIBUTE(noinline) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_NOINLINE __attribute__((noinline)) -#define ABSL_HAVE_ATTRIBUTE_NOINLINE 1 -#else -#define ABSL_ATTRIBUTE_NOINLINE -#endif - -// ABSL_ATTRIBUTE_NO_TAIL_CALL -// -// Prevents the compiler from optimizing away stack frames for functions which -// end in a call to another function. -#if ABSL_HAVE_ATTRIBUTE(disable_tail_calls) -#define ABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 1 -#define ABSL_ATTRIBUTE_NO_TAIL_CALL __attribute__((disable_tail_calls)) -#elif defined(__GNUC__) && !defined(__clang__) && !defined(__e2k__) -#define ABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 1 -#define ABSL_ATTRIBUTE_NO_TAIL_CALL \ - __attribute__((optimize("no-optimize-sibling-calls"))) -#else -#define ABSL_ATTRIBUTE_NO_TAIL_CALL -#define ABSL_HAVE_ATTRIBUTE_NO_TAIL_CALL 0 -#endif - -// ABSL_ATTRIBUTE_WEAK -// -// Tags a function as weak for the purposes of compilation and linking. -// Weak attributes did not work properly in LLVM's Windows backend before -// 9.0.0, so disable them there. See https://bugs.llvm.org/show_bug.cgi?id=37598 -// for further information. -// The MinGW compiler doesn't complain about the weak attribute until the link -// step, presumably because Windows doesn't use ELF binaries. -#if (ABSL_HAVE_ATTRIBUTE(weak) || \ - (defined(__GNUC__) && !defined(__clang__))) && \ - (!defined(_WIN32) || (defined(__clang__) && __clang_major__ >= 9)) && \ - !defined(__MINGW32__) -#undef ABSL_ATTRIBUTE_WEAK -#define ABSL_ATTRIBUTE_WEAK __attribute__((weak)) -#define ABSL_HAVE_ATTRIBUTE_WEAK 1 -#else -#define ABSL_ATTRIBUTE_WEAK -#define ABSL_HAVE_ATTRIBUTE_WEAK 0 -#endif - -// ABSL_ATTRIBUTE_NONNULL -// -// Tells the compiler either (a) that a particular function parameter -// should be a non-null pointer, or (b) that all pointer arguments should -// be non-null. -// -// Note: As the GCC manual states, "[s]ince non-static C++ methods -// have an implicit 'this' argument, the arguments of such methods -// should be counted from two, not one." -// -// Args are indexed starting at 1. -// -// For non-static class member functions, the implicit `this` argument -// is arg 1, and the first explicit argument is arg 2. For static class member -// functions, there is no implicit `this`, and the first explicit argument is -// arg 1. -// -// Example: -// -// /* arg_a cannot be null, but arg_b can */ -// void Function(void* arg_a, void* arg_b) ABSL_ATTRIBUTE_NONNULL(1); -// -// class C { -// /* arg_a cannot be null, but arg_b can */ -// void Method(void* arg_a, void* arg_b) ABSL_ATTRIBUTE_NONNULL(2); -// -// /* arg_a cannot be null, but arg_b can */ -// static void StaticMethod(void* arg_a, void* arg_b) -// ABSL_ATTRIBUTE_NONNULL(1); -// }; -// -// If no arguments are provided, then all pointer arguments should be non-null. -// -// /* No pointer arguments may be null. */ -// void Function(void* arg_a, void* arg_b, int arg_c) ABSL_ATTRIBUTE_NONNULL(); -// -// NOTE: The GCC nonnull attribute actually accepts a list of arguments, but -// ABSL_ATTRIBUTE_NONNULL does not. -#if ABSL_HAVE_ATTRIBUTE(nonnull) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_NONNULL(arg_index) __attribute__((nonnull(arg_index))) -#else -#define ABSL_ATTRIBUTE_NONNULL(...) -#endif - -// ABSL_ATTRIBUTE_NORETURN -// -// Tells the compiler that a given function never returns. -#if ABSL_HAVE_ATTRIBUTE(noreturn) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_NORETURN __attribute__((noreturn)) -#elif defined(_MSC_VER) -#define ABSL_ATTRIBUTE_NORETURN __declspec(noreturn) -#else -#define ABSL_ATTRIBUTE_NORETURN -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS -// -// Tells the AddressSanitizer (or other memory testing tools) to ignore a given -// function. Useful for cases when a function reads random locations on stack, -// calls _exit from a cloned subprocess, deliberately accesses buffer -// out of bounds or does other scary things with memory. -// NOTE: GCC supports AddressSanitizer(asan) since 4.8. -// https://gcc.gnu.org/gcc-4.8/changes.html -#if ABSL_HAVE_ATTRIBUTE(no_sanitize_address) -#define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address)) -#elif defined(_MSC_VER) && _MSC_VER >= 1928 -// https://docs.microsoft.com/en-us/cpp/cpp/no-sanitize-address -#define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS __declspec(no_sanitize_address) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY -// -// Tells the MemorySanitizer to relax the handling of a given function. All "Use -// of uninitialized value" warnings from such functions will be suppressed, and -// all values loaded from memory will be considered fully initialized. This -// attribute is similar to the ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS attribute -// above, but deals with initialized-ness rather than addressability issues. -// NOTE: MemorySanitizer(msan) is supported by Clang but not GCC. -#if ABSL_HAVE_ATTRIBUTE(no_sanitize_memory) -#define ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY __attribute__((no_sanitize_memory)) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_THREAD -// -// Tells the ThreadSanitizer to not instrument a given function. -// NOTE: GCC supports ThreadSanitizer(tsan) since 4.8. -// https://gcc.gnu.org/gcc-4.8/changes.html -#if ABSL_HAVE_ATTRIBUTE(no_sanitize_thread) -#define ABSL_ATTRIBUTE_NO_SANITIZE_THREAD __attribute__((no_sanitize_thread)) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_THREAD -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED -// -// Tells the UndefinedSanitizer to ignore a given function. Useful for cases -// where certain behavior (eg. division by zero) is being used intentionally. -// NOTE: GCC supports UndefinedBehaviorSanitizer(ubsan) since 4.9. -// https://gcc.gnu.org/gcc-4.9/changes.html -#if ABSL_HAVE_ATTRIBUTE(no_sanitize_undefined) -#define ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED \ - __attribute__((no_sanitize_undefined)) -#elif ABSL_HAVE_ATTRIBUTE(no_sanitize) -#define ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED \ - __attribute__((no_sanitize("undefined"))) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_CFI -// -// Tells the ControlFlowIntegrity sanitizer to not instrument a given function. -// See https://clang.llvm.org/docs/ControlFlowIntegrity.html for details. -#if ABSL_HAVE_ATTRIBUTE(no_sanitize) -#define ABSL_ATTRIBUTE_NO_SANITIZE_CFI __attribute__((no_sanitize("cfi"))) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_CFI -#endif - -// ABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK -// -// Tells the SafeStack to not instrument a given function. -// See https://clang.llvm.org/docs/SafeStack.html for details. -#if ABSL_HAVE_ATTRIBUTE(no_sanitize) -#define ABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK \ - __attribute__((no_sanitize("safe-stack"))) -#else -#define ABSL_ATTRIBUTE_NO_SANITIZE_SAFESTACK -#endif - -// ABSL_ATTRIBUTE_RETURNS_NONNULL -// -// Tells the compiler that a particular function never returns a null pointer. -#if ABSL_HAVE_ATTRIBUTE(returns_nonnull) -#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. Weak symbol support is -// a prerequisite. Labeled sections are not supported on Darwin/iOS. -#ifdef ABSL_HAVE_ATTRIBUTE_SECTION -#error ABSL_HAVE_ATTRIBUTE_SECTION cannot be directly set -#elif (ABSL_HAVE_ATTRIBUTE(section) || \ - (defined(__GNUC__) && !defined(__clang__))) && \ - !defined(__APPLE__) && ABSL_HAVE_ATTRIBUTE_WEAK -#define ABSL_HAVE_ATTRIBUTE_SECTION 1 - -// ABSL_ATTRIBUTE_SECTION -// -// Tells the compiler/linker to put a given function into a section and define -// `__start_ ## name` and `__stop_ ## name` symbols to bracket the section. -// This functionality is supported by GNU linker. Any function annotated with -// `ABSL_ATTRIBUTE_SECTION` must not be inlined, or it will be placed into -// whatever section its caller is placed into. -// -#ifndef ABSL_ATTRIBUTE_SECTION -#define ABSL_ATTRIBUTE_SECTION(name) \ - __attribute__((section(#name))) __attribute__((noinline)) -#endif - -// ABSL_ATTRIBUTE_SECTION_VARIABLE -// -// Tells the compiler/linker to put a given variable into a section and define -// `__start_ ## name` and `__stop_ ## name` symbols to bracket the section. -// This functionality is supported by GNU linker. -#ifndef ABSL_ATTRIBUTE_SECTION_VARIABLE -#ifdef _AIX -// __attribute__((section(#name))) on AIX is achived by using the `.csect` psudo -// op which includes an additional integer as part of its syntax indcating -// alignment. If data fall under different alignments then you might get a -// compilation error indicating a `Section type conflict`. -#define ABSL_ATTRIBUTE_SECTION_VARIABLE(name) -#else -#define ABSL_ATTRIBUTE_SECTION_VARIABLE(name) __attribute__((section(#name))) -#endif -#endif - -// ABSL_DECLARE_ATTRIBUTE_SECTION_VARS -// -// A weak section declaration to be used as a global declaration -// for ABSL_ATTRIBUTE_SECTION_START|STOP(name) to compile and link -// even without functions with ABSL_ATTRIBUTE_SECTION(name). -// ABSL_DEFINE_ATTRIBUTE_SECTION should be in the exactly one file; it's -// a no-op on ELF but not on Mach-O. -// -#ifndef ABSL_DECLARE_ATTRIBUTE_SECTION_VARS -#define ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) \ - extern char __start_##name[] ABSL_ATTRIBUTE_WEAK; \ - extern char __stop_##name[] ABSL_ATTRIBUTE_WEAK -#endif -#ifndef ABSL_DEFINE_ATTRIBUTE_SECTION_VARS -#define ABSL_INIT_ATTRIBUTE_SECTION_VARS(name) -#define ABSL_DEFINE_ATTRIBUTE_SECTION_VARS(name) -#endif - -// ABSL_ATTRIBUTE_SECTION_START -// -// Returns `void*` pointers to start/end of a section of code with -// functions having ABSL_ATTRIBUTE_SECTION(name). -// Returns 0 if no such functions exist. -// One must ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) for this to compile and -// link. -// -#define ABSL_ATTRIBUTE_SECTION_START(name) \ - (reinterpret_cast(__start_##name)) -#define ABSL_ATTRIBUTE_SECTION_STOP(name) \ - (reinterpret_cast(__stop_##name)) - -#else // !ABSL_HAVE_ATTRIBUTE_SECTION - -#define ABSL_HAVE_ATTRIBUTE_SECTION 0 - -// provide dummy definitions -#define ABSL_ATTRIBUTE_SECTION(name) -#define ABSL_ATTRIBUTE_SECTION_VARIABLE(name) -#define ABSL_INIT_ATTRIBUTE_SECTION_VARS(name) -#define ABSL_DEFINE_ATTRIBUTE_SECTION_VARS(name) -#define ABSL_DECLARE_ATTRIBUTE_SECTION_VARS(name) -#define ABSL_ATTRIBUTE_SECTION_START(name) (reinterpret_cast(0)) -#define ABSL_ATTRIBUTE_SECTION_STOP(name) (reinterpret_cast(0)) - -#endif // ABSL_ATTRIBUTE_SECTION - -// ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC -// -// Support for aligning the stack on 32-bit x86. -#if ABSL_HAVE_ATTRIBUTE(force_align_arg_pointer) || \ - (defined(__GNUC__) && !defined(__clang__)) -#if defined(__i386__) -#define ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC \ - __attribute__((force_align_arg_pointer)) -#define ABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) -#elif defined(__x86_64__) -#define ABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (1) -#define ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC -#else // !__i386__ && !__x86_64 -#define ABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) -#define ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC -#endif // __i386__ -#else -#define ABSL_ATTRIBUTE_STACK_ALIGN_FOR_OLD_LIBC -#define ABSL_REQUIRE_STACK_ALIGN_TRAMPOLINE (0) -#endif - -// ABSL_MUST_USE_RESULT -// -// Tells the compiler to warn about unused results. -// -// For code or headers that are assured to only build with C++17 and up, prefer -// just using the standard `[[nodiscard]]` directly over this macro. -// -// When annotating a function, it must appear as the first part of the -// declaration or definition. The compiler will warn if the return value from -// such a function is unused: -// -// ABSL_MUST_USE_RESULT Sprocket* AllocateSprocket(); -// AllocateSprocket(); // Triggers a warning. -// -// When annotating a class, it is equivalent to annotating every function which -// returns an instance. -// -// class ABSL_MUST_USE_RESULT Sprocket {}; -// Sprocket(); // Triggers a warning. -// -// Sprocket MakeSprocket(); -// MakeSprocket(); // Triggers a warning. -// -// Note that references and pointers are not instances: -// -// Sprocket* SprocketPointer(); -// SprocketPointer(); // Does *not* trigger a warning. -// -// ABSL_MUST_USE_RESULT allows using cast-to-void to suppress the unused result -// warning. For that, warn_unused_result is used only for clang but not for gcc. -// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425 -// -// Note: past advice was to place the macro after the argument list. -// -// TODO(b/176172494): Use ABSL_HAVE_CPP_ATTRIBUTE(nodiscard) when all code is -// compliant with the stricter [[nodiscard]]. -#if defined(__clang__) && ABSL_HAVE_ATTRIBUTE(warn_unused_result) -#define ABSL_MUST_USE_RESULT __attribute__((warn_unused_result)) -#else -#define ABSL_MUST_USE_RESULT -#endif - -// ABSL_ATTRIBUTE_HOT, ABSL_ATTRIBUTE_COLD -// -// Tells GCC that a function is hot or cold. GCC can use this information to -// improve static analysis, i.e. a conditional branch to a cold function -// is likely to be not-taken. -// This annotation is used for function declarations. -// -// Example: -// -// int foo() ABSL_ATTRIBUTE_HOT; -#if ABSL_HAVE_ATTRIBUTE(hot) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_HOT __attribute__((hot)) -#else -#define ABSL_ATTRIBUTE_HOT -#endif - -#if ABSL_HAVE_ATTRIBUTE(cold) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_COLD __attribute__((cold)) -#else -#define ABSL_ATTRIBUTE_COLD -#endif - -// ABSL_XRAY_ALWAYS_INSTRUMENT, ABSL_XRAY_NEVER_INSTRUMENT, ABSL_XRAY_LOG_ARGS -// -// We define the ABSL_XRAY_ALWAYS_INSTRUMENT and ABSL_XRAY_NEVER_INSTRUMENT -// macro used as an attribute to mark functions that must always or never be -// instrumented by XRay. Currently, this is only supported in Clang/LLVM. -// -// For reference on the LLVM XRay instrumentation, see -// http://llvm.org/docs/XRay.html. -// -// A function with the XRAY_ALWAYS_INSTRUMENT macro attribute in its declaration -// will always get the XRay instrumentation sleds. These sleds may introduce -// some binary size and runtime overhead and must be used sparingly. -// -// These attributes only take effect when the following conditions are met: -// -// * The file/target is built in at least C++11 mode, with a Clang compiler -// that supports XRay attributes. -// * The file/target is built with the -fxray-instrument flag set for the -// Clang/LLVM compiler. -// * The function is defined in the translation unit (the compiler honors the -// attribute in either the definition or the declaration, and must match). -// -// There are cases when, even when building with XRay instrumentation, users -// might want to control specifically which functions are instrumented for a -// particular build using special-case lists provided to the compiler. These -// special case lists are provided to Clang via the -// -fxray-always-instrument=... and -fxray-never-instrument=... flags. The -// attributes in source take precedence over these special-case lists. -// -// To disable the XRay attributes at build-time, users may define -// ABSL_NO_XRAY_ATTRIBUTES. Do NOT define ABSL_NO_XRAY_ATTRIBUTES on specific -// packages/targets, as this may lead to conflicting definitions of functions at -// link-time. -// -// XRay isn't currently supported on Android: -// https://github.com/android/ndk/issues/368 -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::xray_always_instrument) && \ - !defined(ABSL_NO_XRAY_ATTRIBUTES) && !defined(__ANDROID__) -#define ABSL_XRAY_ALWAYS_INSTRUMENT [[clang::xray_always_instrument]] -#define ABSL_XRAY_NEVER_INSTRUMENT [[clang::xray_never_instrument]] -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::xray_log_args) -#define ABSL_XRAY_LOG_ARGS(N) \ - [[clang::xray_always_instrument, clang::xray_log_args(N)]] -#else -#define ABSL_XRAY_LOG_ARGS(N) [[clang::xray_always_instrument]] -#endif -#else -#define ABSL_XRAY_ALWAYS_INSTRUMENT -#define ABSL_XRAY_NEVER_INSTRUMENT -#define ABSL_XRAY_LOG_ARGS(N) -#endif - -// ABSL_ATTRIBUTE_REINITIALIZES -// -// Indicates that a member function reinitializes the entire object to a known -// state, independent of the previous state of the object. -// -// The clang-tidy check bugprone-use-after-move allows member functions marked -// with this attribute to be called on objects that have been moved from; -// without the attribute, this would result in a use-after-move warning. -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::reinitializes) -#define ABSL_ATTRIBUTE_REINITIALIZES [[clang::reinitializes]] -#else -#define ABSL_ATTRIBUTE_REINITIALIZES -#endif - -// ----------------------------------------------------------------------------- -// Variable Attributes -// ----------------------------------------------------------------------------- - -// ABSL_ATTRIBUTE_UNUSED -// -// Prevents the compiler from complaining about variables that appear unused. -// -// For code or headers that are assured to only build with C++17 and up, prefer -// just using the standard '[[maybe_unused]]' directly over this macro. -// -// Due to differences in positioning requirements between the old, compiler -// specific __attribute__ syntax and the now standard [[maybe_unused]], this -// macro does not attempt to take advantage of '[[maybe_unused]]'. -#if ABSL_HAVE_ATTRIBUTE(unused) || (defined(__GNUC__) && !defined(__clang__)) -#undef ABSL_ATTRIBUTE_UNUSED -#define ABSL_ATTRIBUTE_UNUSED __attribute__((__unused__)) -#else -#define ABSL_ATTRIBUTE_UNUSED -#endif - -// ABSL_ATTRIBUTE_INITIAL_EXEC -// -// Tells the compiler to use "initial-exec" mode for a thread-local variable. -// See http://people.redhat.com/drepper/tls.pdf for the gory details. -#if ABSL_HAVE_ATTRIBUTE(tls_model) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_INITIAL_EXEC __attribute__((tls_model("initial-exec"))) -#else -#define ABSL_ATTRIBUTE_INITIAL_EXEC -#endif - -// ABSL_ATTRIBUTE_PACKED -// -// Instructs the compiler not to use natural alignment for a tagged data -// structure, but instead to reduce its alignment to 1. -// -// Therefore, DO NOT APPLY THIS ATTRIBUTE TO STRUCTS CONTAINING ATOMICS. Doing -// so can cause atomic variables to be mis-aligned and silently violate -// atomicity on x86. -// -// This attribute can either be applied to members of a structure or to a -// structure in its entirety. Applying this attribute (judiciously) to a -// structure in its entirety to optimize the memory footprint of very -// commonly-used structs is fine. Do not apply this attribute to a structure in -// its entirety if the purpose is to control the offsets of the members in the -// structure. Instead, apply this attribute only to structure members that need -// it. -// -// When applying ABSL_ATTRIBUTE_PACKED only to specific structure members the -// natural alignment of structure members not annotated is preserved. Aligned -// member accesses are faster than non-aligned member accesses even if the -// targeted microprocessor supports non-aligned accesses. -#if ABSL_HAVE_ATTRIBUTE(packed) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_PACKED __attribute__((__packed__)) -#else -#define ABSL_ATTRIBUTE_PACKED -#endif - -// ABSL_ATTRIBUTE_FUNC_ALIGN -// -// Tells the compiler to align the function start at least to certain -// alignment boundary -#if ABSL_HAVE_ATTRIBUTE(aligned) || (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes) __attribute__((aligned(bytes))) -#else -#define ABSL_ATTRIBUTE_FUNC_ALIGN(bytes) -#endif - -// ABSL_FALLTHROUGH_INTENDED -// -// Annotates implicit fall-through between switch labels, allowing a case to -// indicate intentional fallthrough and turn off warnings about any lack of a -// `break` statement. The ABSL_FALLTHROUGH_INTENDED macro should be followed by -// a semicolon and can be used in most places where `break` can, provided that -// no statements exist between it and the next switch label. -// -// Example: -// -// switch (x) { -// case 40: -// case 41: -// if (truth_is_out_there) { -// ++x; -// ABSL_FALLTHROUGH_INTENDED; // Use instead of/along with annotations -// // in comments -// } else { -// return x; -// } -// case 42: -// ... -// -// Notes: When supported, GCC and Clang can issue a warning on switch labels -// with unannotated fallthrough using the warning `-Wimplicit-fallthrough`. See -// clang documentation on language extensions for details: -// https://clang.llvm.org/docs/AttributeReference.html#fallthrough-clang-fallthrough -// -// When used with unsupported compilers, the ABSL_FALLTHROUGH_INTENDED macro has -// no effect on diagnostics. In any case this macro has no effect on runtime -// behavior and performance of code. - -#ifdef ABSL_FALLTHROUGH_INTENDED -#error "ABSL_FALLTHROUGH_INTENDED should not be defined." -#elif ABSL_HAVE_CPP_ATTRIBUTE(fallthrough) -#define ABSL_FALLTHROUGH_INTENDED [[fallthrough]] -#elif ABSL_HAVE_CPP_ATTRIBUTE(clang::fallthrough) -#define ABSL_FALLTHROUGH_INTENDED [[clang::fallthrough]] -#elif ABSL_HAVE_CPP_ATTRIBUTE(gnu::fallthrough) -#define ABSL_FALLTHROUGH_INTENDED [[gnu::fallthrough]] -#else -#define ABSL_FALLTHROUGH_INTENDED \ - do { \ - } while (0) -#endif - -// ABSL_DEPRECATED() -// -// Marks a deprecated class, struct, enum, function, method and variable -// declarations. The macro argument is used as a custom diagnostic message (e.g. -// suggestion of a better alternative). -// -// For code or headers that are assured to only build with C++14 and up, prefer -// just using the standard `[[deprecated("message")]]` directly over this macro. -// -// Examples: -// -// class ABSL_DEPRECATED("Use Bar instead") Foo {...}; -// -// ABSL_DEPRECATED("Use Baz() instead") void Bar() {...} -// -// template -// ABSL_DEPRECATED("Use DoThat() instead") -// void DoThis(); -// -// enum FooEnum { -// kBar ABSL_DEPRECATED("Use kBaz instead"), -// }; -// -// Every usage of a deprecated entity will trigger a warning when compiled with -// GCC/Clang's `-Wdeprecated-declarations` option. Google's production toolchain -// turns this warning off by default, instead relying on clang-tidy to report -// new uses of deprecated code. -#if ABSL_HAVE_ATTRIBUTE(deprecated) -#define ABSL_DEPRECATED(message) __attribute__((deprecated(message))) -#else -#define ABSL_DEPRECATED(message) -#endif - -// ABSL_CONST_INIT -// -// A variable declaration annotated with the `ABSL_CONST_INIT` attribute will -// not compile (on supported platforms) unless the variable has a constant -// initializer. This is useful for variables with static and thread storage -// duration, because it guarantees that they will not suffer from the so-called -// "static init order fiasco". -// -// This attribute must be placed on the initializing declaration of the -// variable. Some compilers will give a -Wmissing-constinit warning when this -// attribute is placed on some other declaration but missing from the -// initializing declaration. -// -// In some cases (notably with thread_local variables), `ABSL_CONST_INIT` can -// also be used in a non-initializing declaration to tell the compiler that a -// variable is already initialized, reducing overhead that would otherwise be -// incurred by a hidden guard variable. Thus annotating all declarations with -// this attribute is recommended to potentially enhance optimization. -// -// Example: -// -// class MyClass { -// public: -// ABSL_CONST_INIT static MyType my_var; -// }; -// -// ABSL_CONST_INIT MyType MyClass::my_var = MakeMyType(...); -// -// For code or headers that are assured to only build with C++20 and up, prefer -// just using the standard `constinit` keyword directly over this macro. -// -// Note that this attribute is redundant if the variable is declared constexpr. -#if defined(__cpp_constinit) && __cpp_constinit >= 201907L -#define ABSL_CONST_INIT constinit -#elif ABSL_HAVE_CPP_ATTRIBUTE(clang::require_constant_initialization) -#define ABSL_CONST_INIT [[clang::require_constant_initialization]] -#else -#define ABSL_CONST_INIT -#endif - -// ABSL_ATTRIBUTE_PURE_FUNCTION -// -// ABSL_ATTRIBUTE_PURE_FUNCTION is used to annotate declarations of "pure" -// functions. A function is pure if its return value is only a function of its -// arguments. The pure attribute prohibits a function from modifying the state -// of the program that is observable by means other than inspecting the -// function's return value. Declaring such functions with the pure attribute -// allows the compiler to avoid emitting some calls in repeated invocations of -// the function with the same argument values. -// -// Example: -// -// ABSL_ATTRIBUTE_PURE_FUNCTION int64_t ToInt64Milliseconds(Duration d); -#if ABSL_HAVE_CPP_ATTRIBUTE(gnu::pure) -#define ABSL_ATTRIBUTE_PURE_FUNCTION [[gnu::pure]] -#elif ABSL_HAVE_ATTRIBUTE(pure) -#define ABSL_ATTRIBUTE_PURE_FUNCTION __attribute__((pure)) -#else -#define ABSL_ATTRIBUTE_PURE_FUNCTION -#endif - -// ABSL_ATTRIBUTE_LIFETIME_BOUND indicates that a resource owned by a function -// parameter or implicit object parameter is retained by the return value of the -// annotated function (or, for a parameter of a constructor, in the value of the -// constructed object). This attribute causes warnings to be produced if a -// temporary object does not live long enough. -// -// When applied to a reference parameter, the referenced object is assumed to be -// retained by the return value of the function. When applied to a non-reference -// parameter (for example, a pointer or a class type), all temporaries -// referenced by the parameter are assumed to be retained by the return value of -// the function. -// -// See also the upstream documentation: -// https://clang.llvm.org/docs/AttributeReference.html#lifetimebound -#if ABSL_HAVE_CPP_ATTRIBUTE(clang::lifetimebound) -#define ABSL_ATTRIBUTE_LIFETIME_BOUND [[clang::lifetimebound]] -#elif ABSL_HAVE_ATTRIBUTE(lifetimebound) -#define ABSL_ATTRIBUTE_LIFETIME_BOUND __attribute__((lifetimebound)) -#else -#define ABSL_ATTRIBUTE_LIFETIME_BOUND -#endif - -#endif // ABSL_BASE_ATTRIBUTES_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/call_once.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/call_once.h deleted file mode 100644 index 96109f5..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/call_once.h +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: call_once.h -// ----------------------------------------------------------------------------- -// -// This header file provides an Abseil version of `std::call_once` for invoking -// a given function at most once, across all threads. This Abseil version is -// faster than the C++11 version and incorporates the C++17 argument-passing -// fix, so that (for example) non-const references may be passed to the invoked -// function. - -#ifndef ABSL_BASE_CALL_ONCE_H_ -#define ABSL_BASE_CALL_ONCE_H_ - -#include -#include -#include -#include -#include - -#include "absl/base/internal/invoke.h" -#include "absl/base/internal/low_level_scheduling.h" -#include "absl/base/internal/raw_logging.h" -#include "absl/base/internal/scheduling_mode.h" -#include "absl/base/internal/spinlock_wait.h" -#include "absl/base/macros.h" -#include "absl/base/optimization.h" -#include "absl/base/port.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -class once_flag; - -namespace base_internal { -std::atomic* ControlWord(absl::once_flag* flag); -} // namespace base_internal - -// call_once() -// -// For all invocations using a given `once_flag`, invokes a given `fn` exactly -// once across all threads. The first call to `call_once()` with a particular -// `once_flag` argument (that does not throw an exception) will run the -// specified function with the provided `args`; other calls with the same -// `once_flag` argument will not run the function, but will wait -// for the provided function to finish running (if it is still running). -// -// This mechanism provides a safe, simple, and fast mechanism for one-time -// initialization in a multi-threaded process. -// -// Example: -// -// class MyInitClass { -// public: -// ... -// mutable absl::once_flag once_; -// -// MyInitClass* init() const { -// absl::call_once(once_, &MyInitClass::Init, this); -// return ptr_; -// } -// -template -void call_once(absl::once_flag& flag, Callable&& fn, Args&&... args); - -// once_flag -// -// Objects of this type are used to distinguish calls to `call_once()` and -// ensure the provided function is only invoked once across all threads. This -// type is not copyable or movable. However, it has a `constexpr` -// constructor, and is safe to use as a namespace-scoped global variable. -class once_flag { - public: - constexpr once_flag() : control_(0) {} - once_flag(const once_flag&) = delete; - once_flag& operator=(const once_flag&) = delete; - - private: - friend std::atomic* base_internal::ControlWord(once_flag* flag); - std::atomic control_; -}; - -//------------------------------------------------------------------------------ -// End of public interfaces. -// Implementation details follow. -//------------------------------------------------------------------------------ - -namespace base_internal { - -// Like call_once, but uses KERNEL_ONLY scheduling. Intended to be used to -// initialize entities used by the scheduler implementation. -template -void LowLevelCallOnce(absl::once_flag* flag, Callable&& fn, Args&&... args); - -// Disables scheduling while on stack when scheduling mode is non-cooperative. -// No effect for cooperative scheduling modes. -class SchedulingHelper { - public: - explicit SchedulingHelper(base_internal::SchedulingMode mode) : mode_(mode) { - if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) { - guard_result_ = base_internal::SchedulingGuard::DisableRescheduling(); - } - } - - ~SchedulingHelper() { - if (mode_ == base_internal::SCHEDULE_KERNEL_ONLY) { - base_internal::SchedulingGuard::EnableRescheduling(guard_result_); - } - } - - private: - base_internal::SchedulingMode mode_; - bool guard_result_; -}; - -// Bit patterns for call_once state machine values. Internal implementation -// detail, not for use by clients. -// -// The bit patterns are arbitrarily chosen from unlikely values, to aid in -// debugging. However, kOnceInit must be 0, so that a zero-initialized -// once_flag will be valid for immediate use. -enum { - kOnceInit = 0, - kOnceRunning = 0x65C2937B, - kOnceWaiter = 0x05A308D2, - // A very small constant is chosen for kOnceDone so that it fit in a single - // compare with immediate instruction for most common ISAs. This is verified - // for x86, POWER and ARM. - kOnceDone = 221, // Random Number -}; - -template -ABSL_ATTRIBUTE_NOINLINE -void CallOnceImpl(std::atomic* control, - base_internal::SchedulingMode scheduling_mode, Callable&& fn, - Args&&... args) { -#ifndef NDEBUG - { - uint32_t old_control = control->load(std::memory_order_relaxed); - if (old_control != kOnceInit && - old_control != kOnceRunning && - old_control != kOnceWaiter && - old_control != kOnceDone) { - ABSL_RAW_LOG(FATAL, "Unexpected value for control word: 0x%lx", - static_cast(old_control)); // NOLINT - } - } -#endif // NDEBUG - static const base_internal::SpinLockWaitTransition trans[] = { - {kOnceInit, kOnceRunning, true}, - {kOnceRunning, kOnceWaiter, false}, - {kOnceDone, kOnceDone, true}}; - - // Must do this before potentially modifying control word's state. - base_internal::SchedulingHelper maybe_disable_scheduling(scheduling_mode); - // Short circuit the simplest case to avoid procedure call overhead. - // The base_internal::SpinLockWait() call returns either kOnceInit or - // kOnceDone. If it returns kOnceDone, it must have loaded the control word - // with std::memory_order_acquire and seen a value of kOnceDone. - uint32_t old_control = kOnceInit; - if (control->compare_exchange_strong(old_control, kOnceRunning, - std::memory_order_relaxed) || - base_internal::SpinLockWait(control, ABSL_ARRAYSIZE(trans), trans, - scheduling_mode) == kOnceInit) { - base_internal::invoke(std::forward(fn), - std::forward(args)...); - old_control = - control->exchange(base_internal::kOnceDone, std::memory_order_release); - if (old_control == base_internal::kOnceWaiter) { - base_internal::SpinLockWake(control, true); - } - } // else *control is already kOnceDone -} - -inline std::atomic* ControlWord(once_flag* flag) { - return &flag->control_; -} - -template -void LowLevelCallOnce(absl::once_flag* flag, Callable&& fn, Args&&... args) { - std::atomic* once = base_internal::ControlWord(flag); - uint32_t s = once->load(std::memory_order_acquire); - if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) { - base_internal::CallOnceImpl(once, base_internal::SCHEDULE_KERNEL_ONLY, - std::forward(fn), - std::forward(args)...); - } -} - -} // namespace base_internal - -template -void call_once(absl::once_flag& flag, Callable&& fn, Args&&... args) { - std::atomic* once = base_internal::ControlWord(&flag); - uint32_t s = once->load(std::memory_order_acquire); - if (ABSL_PREDICT_FALSE(s != base_internal::kOnceDone)) { - base_internal::CallOnceImpl( - once, base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL, - std::forward(fn), std::forward(args)...); - } -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_CALL_ONCE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/casts.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/casts.h deleted file mode 100644 index b99adb0..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/casts.h +++ /dev/null @@ -1,180 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: casts.h -// ----------------------------------------------------------------------------- -// -// This header file defines casting templates to fit use cases not covered by -// the standard casts provided in the C++ standard. As with all cast operations, -// use these with caution and only if alternatives do not exist. - -#ifndef ABSL_BASE_CASTS_H_ -#define ABSL_BASE_CASTS_H_ - -#include -#include -#include -#include - -#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L -#include // For std::bit_cast. -#endif // defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L - -#include "absl/base/internal/identity.h" -#include "absl/base/macros.h" -#include "absl/meta/type_traits.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// implicit_cast() -// -// Performs an implicit conversion between types following the language -// rules for implicit conversion; if an implicit conversion is otherwise -// allowed by the language in the given context, this function performs such an -// implicit conversion. -// -// Example: -// -// // If the context allows implicit conversion: -// From from; -// To to = from; -// -// // Such code can be replaced by: -// implicit_cast(from); -// -// An `implicit_cast()` may also be used to annotate numeric type conversions -// that, although safe, may produce compiler warnings (such as `long` to `int`). -// Additionally, an `implicit_cast()` is also useful within return statements to -// indicate a specific implicit conversion is being undertaken. -// -// Example: -// -// return implicit_cast(size_in_bytes) / capacity_; -// -// Annotating code with `implicit_cast()` allows you to explicitly select -// particular overloads and template instantiations, while providing a safer -// cast than `reinterpret_cast()` or `static_cast()`. -// -// Additionally, an `implicit_cast()` can be used to allow upcasting within a -// type hierarchy where incorrect use of `static_cast()` could accidentally -// allow downcasting. -// -// Finally, an `implicit_cast()` can be used to perform implicit conversions -// from unrelated types that otherwise couldn't be implicitly cast directly; -// C++ will normally only implicitly cast "one step" in such conversions. -// -// That is, if C is a type which can be implicitly converted to B, with B being -// a type that can be implicitly converted to A, an `implicit_cast()` can be -// used to convert C to B (which the compiler can then implicitly convert to A -// using language rules). -// -// Example: -// -// // Assume an object C is convertible to B, which is implicitly convertible -// // to A -// A a = implicit_cast(C); -// -// Such implicit cast chaining may be useful within template logic. -template -constexpr To implicit_cast(typename absl::internal::identity_t to) { - return to; -} - -// bit_cast() -// -// Creates a value of the new type `Dest` whose representation is the same as -// that of the argument, which is of (deduced) type `Source` (a "bitwise cast"; -// every bit in the value representation of the result is equal to the -// corresponding bit in the object representation of the source). Source and -// destination types must be of the same size, and both types must be trivially -// copyable. -// -// As with most casts, use with caution. A `bit_cast()` might be needed when you -// need to treat a value as the value of some other type, for example, to access -// the individual bits of an object which are not normally accessible through -// the object's type, such as for working with the binary representation of a -// floating point value: -// -// float f = 3.14159265358979; -// int i = bit_cast(f); -// // i = 0x40490fdb -// -// Reinterpreting and accessing a value directly as a different type (as shown -// below) usually results in undefined behavior. -// -// Example: -// -// // WRONG -// float f = 3.14159265358979; -// int i = reinterpret_cast(f); // Wrong -// int j = *reinterpret_cast(&f); // Equally wrong -// int k = *bit_cast(&f); // Equally wrong -// -// Reinterpret-casting results in undefined behavior according to the ISO C++ -// specification, section [basic.lval]. Roughly, this section says: if an object -// in memory has one type, and a program accesses it with a different type, the -// result is undefined behavior for most "different type". -// -// Using bit_cast on a pointer and then dereferencing it is no better than using -// reinterpret_cast. You should only use bit_cast on the value itself. -// -// Such casting results in type punning: holding an object in memory of one type -// and reading its bits back using a different type. A `bit_cast()` avoids this -// issue by copying the object representation to a new value, which avoids -// introducing this undefined behavior (since the original value is never -// accessed in the wrong way). -// -// The requirements of `absl::bit_cast` are more strict than that of -// `std::bit_cast` unless compiler support is available. Specifically, without -// compiler support, this implementation also requires `Dest` to be -// default-constructible. In C++20, `absl::bit_cast` is replaced by -// `std::bit_cast`. -#if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L - -using std::bit_cast; - -#else // defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L - -template ::value && - type_traits_internal::is_trivially_copyable::value -#if !ABSL_HAVE_BUILTIN(__builtin_bit_cast) - && std::is_default_constructible::value -#endif // !ABSL_HAVE_BUILTIN(__builtin_bit_cast) - , - int>::type = 0> -#if ABSL_HAVE_BUILTIN(__builtin_bit_cast) -inline constexpr Dest bit_cast(const Source& source) { - return __builtin_bit_cast(Dest, source); -} -#else // ABSL_HAVE_BUILTIN(__builtin_bit_cast) -inline Dest bit_cast(const Source& source) { - Dest dest; - memcpy(static_cast(std::addressof(dest)), - static_cast(std::addressof(source)), sizeof(dest)); - return dest; -} -#endif // ABSL_HAVE_BUILTIN(__builtin_bit_cast) - -#endif // defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_CASTS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/config.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/config.h deleted file mode 100644 index 8533aea..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/config.h +++ /dev/null @@ -1,913 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: config.h -// ----------------------------------------------------------------------------- -// -// This header file defines a set of macros for checking the presence of -// important compiler and platform features. Such macros can be used to -// produce portable code by parameterizing compilation based on the presence or -// lack of a given feature. -// -// We define a "feature" as some interface we wish to program to: for example, -// a library function or system call. A value of `1` indicates support for -// that feature; any other value indicates the feature support is undefined. -// -// Example: -// -// Suppose a programmer wants to write a program that uses the 'mmap()' system -// call. The Abseil macro for that feature (`ABSL_HAVE_MMAP`) allows you to -// selectively include the `mmap.h` header and bracket code using that feature -// in the macro: -// -// #include "absl/base/config.h" -// -// #ifdef ABSL_HAVE_MMAP -// #include "sys/mman.h" -// #endif //ABSL_HAVE_MMAP -// -// ... -// #ifdef ABSL_HAVE_MMAP -// void *ptr = mmap(...); -// ... -// #endif // ABSL_HAVE_MMAP - -#ifndef ABSL_BASE_CONFIG_H_ -#define ABSL_BASE_CONFIG_H_ - -// Included for the __GLIBC__ macro (or similar macros on other systems). -#include - -#ifdef __cplusplus -// Included for __GLIBCXX__, _LIBCPP_VERSION -#include -#endif // __cplusplus - -// ABSL_INTERNAL_CPLUSPLUS_LANG -// -// MSVC does not set the value of __cplusplus correctly, but instead uses -// _MSVC_LANG as a stand-in. -// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros -// -// However, there are reports that MSVC even sets _MSVC_LANG incorrectly at -// times, for example: -// https://github.com/microsoft/vscode-cpptools/issues/1770 -// https://reviews.llvm.org/D70996 -// -// For this reason, this symbol is considered INTERNAL and code outside of -// Abseil must not use it. -#if defined(_MSVC_LANG) -#define ABSL_INTERNAL_CPLUSPLUS_LANG _MSVC_LANG -#elif defined(__cplusplus) -#define ABSL_INTERNAL_CPLUSPLUS_LANG __cplusplus -#endif - -#if defined(__APPLE__) -// Included for TARGET_OS_IPHONE, __IPHONE_OS_VERSION_MIN_REQUIRED, -// __IPHONE_8_0. -#include -#include -#endif - -#include "absl/base/options.h" -#include "absl/base/policy_checks.h" - -// Abseil long-term support (LTS) releases will define -// `ABSL_LTS_RELEASE_VERSION` to the integer representing the date string of the -// LTS release version, and will define `ABSL_LTS_RELEASE_PATCH_LEVEL` to the -// integer representing the patch-level for that release. -// -// For example, for LTS release version "20300401.2", this would give us -// ABSL_LTS_RELEASE_VERSION == 20300401 && ABSL_LTS_RELEASE_PATCH_LEVEL == 2 -// -// These symbols will not be defined in non-LTS code. -// -// Abseil recommends that clients live-at-head. Therefore, if you are using -// these symbols to assert a minimum version requirement, we recommend you do it -// as -// -// #if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20300401 -// #error Project foo requires Abseil LTS version >= 20300401 -// #endif -// -// The `defined(ABSL_LTS_RELEASE_VERSION)` part of the check excludes -// live-at-head clients from the minimum version assertion. -// -// See https://abseil.io/about/releases for more information on Abseil release -// management. -// -// LTS releases can be obtained from -// https://github.com/abseil/abseil-cpp/releases. -#define ABSL_LTS_RELEASE_VERSION 20220623 -#define ABSL_LTS_RELEASE_PATCH_LEVEL 0 - -// Helper macro to convert a CPP variable to a string literal. -#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x -#define ABSL_INTERNAL_TOKEN_STR(x) ABSL_INTERNAL_DO_TOKEN_STR(x) - -// ----------------------------------------------------------------------------- -// Abseil namespace annotations -// ----------------------------------------------------------------------------- - -// ABSL_NAMESPACE_BEGIN/ABSL_NAMESPACE_END -// -// An annotation placed at the beginning/end of each `namespace absl` scope. -// This is used to inject an inline namespace. -// -// The proper way to write Abseil code in the `absl` namespace is: -// -// namespace absl { -// ABSL_NAMESPACE_BEGIN -// -// void Foo(); // absl::Foo(). -// -// ABSL_NAMESPACE_END -// } // namespace absl -// -// Users of Abseil should not use these macros, because users of Abseil should -// not write `namespace absl {` in their own code for any reason. (Abseil does -// not support forward declarations of its own types, nor does it support -// user-provided specialization of Abseil templates. Code that violates these -// rules may be broken without warning.) -#if !defined(ABSL_OPTION_USE_INLINE_NAMESPACE) || \ - !defined(ABSL_OPTION_INLINE_NAMESPACE_NAME) -#error options.h is misconfigured. -#endif - -// Check that ABSL_OPTION_INLINE_NAMESPACE_NAME is neither "head" nor "" -#if defined(__cplusplus) && ABSL_OPTION_USE_INLINE_NAMESPACE == 1 - -#define ABSL_INTERNAL_INLINE_NAMESPACE_STR \ - ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME) - -static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != '\0', - "options.h misconfigured: ABSL_OPTION_INLINE_NAMESPACE_NAME must " - "not be empty."); -static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || - ABSL_INTERNAL_INLINE_NAMESPACE_STR[1] != 'e' || - ABSL_INTERNAL_INLINE_NAMESPACE_STR[2] != 'a' || - ABSL_INTERNAL_INLINE_NAMESPACE_STR[3] != 'd' || - ABSL_INTERNAL_INLINE_NAMESPACE_STR[4] != '\0', - "options.h misconfigured: ABSL_OPTION_INLINE_NAMESPACE_NAME must " - "be changed to a new, unique identifier name."); - -#endif - -#if ABSL_OPTION_USE_INLINE_NAMESPACE == 0 -#define ABSL_NAMESPACE_BEGIN -#define ABSL_NAMESPACE_END -#define ABSL_INTERNAL_C_SYMBOL(x) x -#elif ABSL_OPTION_USE_INLINE_NAMESPACE == 1 -#define ABSL_NAMESPACE_BEGIN \ - inline namespace ABSL_OPTION_INLINE_NAMESPACE_NAME { -#define ABSL_NAMESPACE_END } -#define ABSL_INTERNAL_C_SYMBOL_HELPER_2(x, v) x##_##v -#define ABSL_INTERNAL_C_SYMBOL_HELPER_1(x, v) \ - ABSL_INTERNAL_C_SYMBOL_HELPER_2(x, v) -#define ABSL_INTERNAL_C_SYMBOL(x) \ - ABSL_INTERNAL_C_SYMBOL_HELPER_1(x, ABSL_OPTION_INLINE_NAMESPACE_NAME) -#else -#error options.h is misconfigured. -#endif - -// ----------------------------------------------------------------------------- -// Compiler Feature Checks -// ----------------------------------------------------------------------------- - -// ABSL_HAVE_BUILTIN() -// -// Checks whether the compiler supports a Clang Feature Checking Macro, and if -// so, checks whether it supports the provided builtin function "x" where x -// is one of the functions noted in -// https://clang.llvm.org/docs/LanguageExtensions.html -// -// Note: Use this macro to avoid an extra level of #ifdef __has_builtin check. -// http://releases.llvm.org/3.3/tools/clang/docs/LanguageExtensions.html -#ifdef __has_builtin -#define ABSL_HAVE_BUILTIN(x) __has_builtin(x) -#else -#define ABSL_HAVE_BUILTIN(x) 0 -#endif - -#ifdef __has_feature -#define ABSL_HAVE_FEATURE(f) __has_feature(f) -#else -#define ABSL_HAVE_FEATURE(f) 0 -#endif - -// Portable check for GCC minimum version: -// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html -#if defined(__GNUC__) && defined(__GNUC_MINOR__) -#define ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(x, y) \ - (__GNUC__ > (x) || __GNUC__ == (x) && __GNUC_MINOR__ >= (y)) -#else -#define ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(x, y) 0 -#endif - -#if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__) -#define ABSL_INTERNAL_HAVE_MIN_CLANG_VERSION(x, y) \ - (__clang_major__ > (x) || __clang_major__ == (x) && __clang_minor__ >= (y)) -#else -#define ABSL_INTERNAL_HAVE_MIN_CLANG_VERSION(x, y) 0 -#endif - -// ABSL_HAVE_TLS is defined to 1 when __thread should be supported. -// We assume __thread is supported on Linux or Asylo when compiled with Clang or -// compiled against libstdc++ with _GLIBCXX_HAVE_TLS defined. -#ifdef ABSL_HAVE_TLS -#error ABSL_HAVE_TLS cannot be directly set -#elif (defined(__linux__) || defined(__ASYLO__)) && \ - (defined(__clang__) || defined(_GLIBCXX_HAVE_TLS)) -#define ABSL_HAVE_TLS 1 -#endif - -// ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE -// -// Checks whether `std::is_trivially_destructible` is supported. -// -// Notes: All supported compilers using libc++ support this feature, as does -// gcc >= 4.8.1 using libstdc++, and Visual Studio. -#ifdef ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE -#error ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE cannot be directly set -#elif defined(_LIBCPP_VERSION) || defined(_MSC_VER) || \ - (!defined(__clang__) && defined(__GLIBCXX__) && \ - ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(4, 8)) -#define ABSL_HAVE_STD_IS_TRIVIALLY_DESTRUCTIBLE 1 -#endif - -// ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE -// -// Checks whether `std::is_trivially_default_constructible` and -// `std::is_trivially_copy_constructible` are supported. - -// ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE -// -// Checks whether `std::is_trivially_copy_assignable` is supported. - -// Notes: Clang with libc++ supports these features, as does gcc >= 7.4 with -// libstdc++, or gcc >= 8.2 with libc++, and Visual Studio (but not NVCC). -#if defined(ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE) -#error ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE cannot be directly set -#elif defined(ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE) -#error ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE cannot directly set -#elif (defined(__clang__) && defined(_LIBCPP_VERSION)) || \ - (!defined(__clang__) && \ - ((ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(7, 4) && defined(__GLIBCXX__)) || \ - (ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(8, 2) && \ - defined(_LIBCPP_VERSION)))) || \ - (defined(_MSC_VER) && !defined(__NVCC__)) -#define ABSL_HAVE_STD_IS_TRIVIALLY_CONSTRUCTIBLE 1 -#define ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1 -#endif - -// ABSL_HAVE_THREAD_LOCAL -// -// Checks whether C++11's `thread_local` storage duration specifier is -// supported. -#ifdef ABSL_HAVE_THREAD_LOCAL -#error ABSL_HAVE_THREAD_LOCAL cannot be directly set -#elif defined(__APPLE__) -// Notes: -// * Xcode's clang did not support `thread_local` until version 8, and -// even then not for all iOS < 9.0. -// * Xcode 9.3 started disallowing `thread_local` for 32-bit iOS simulator -// targeting iOS 9.x. -// * Xcode 10 moves the deployment target check for iOS < 9.0 to link time -// making ABSL_HAVE_FEATURE unreliable there. -// -#if ABSL_HAVE_FEATURE(cxx_thread_local) && \ - !(TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0) -#define ABSL_HAVE_THREAD_LOCAL 1 -#endif -#else // !defined(__APPLE__) -#define ABSL_HAVE_THREAD_LOCAL 1 -#endif - -// There are platforms for which TLS should not be used even though the compiler -// makes it seem like it's supported (Android NDK < r12b for example). -// This is primarily because of linker problems and toolchain misconfiguration: -// Abseil does not intend to support this indefinitely. Currently, the newest -// toolchain that we intend to support that requires this behavior is the -// r11 NDK - allowing for a 5 year support window on that means this option -// is likely to be removed around June of 2021. -// TLS isn't supported until NDK r12b per -// https://developer.android.com/ndk/downloads/revision_history.html -// Since NDK r16, `__NDK_MAJOR__` and `__NDK_MINOR__` are defined in -// . For NDK < r16, users should define these macros, -// e.g. `-D__NDK_MAJOR__=11 -D__NKD_MINOR__=0` for NDK r11. -#if defined(__ANDROID__) && defined(__clang__) -#if __has_include() -#include -#endif // __has_include() -#if defined(__ANDROID__) && defined(__clang__) && defined(__NDK_MAJOR__) && \ - defined(__NDK_MINOR__) && \ - ((__NDK_MAJOR__ < 12) || ((__NDK_MAJOR__ == 12) && (__NDK_MINOR__ < 1))) -#undef ABSL_HAVE_TLS -#undef ABSL_HAVE_THREAD_LOCAL -#endif -#endif // defined(__ANDROID__) && defined(__clang__) - -// ABSL_HAVE_INTRINSIC_INT128 -// -// Checks whether the __int128 compiler extension for a 128-bit integral type is -// supported. -// -// Note: __SIZEOF_INT128__ is defined by Clang and GCC when __int128 is -// supported, but we avoid using it in certain cases: -// * On Clang: -// * Building using Clang for Windows, where the Clang runtime library has -// 128-bit support only on LP64 architectures, but Windows is LLP64. -// * On Nvidia's nvcc: -// * nvcc also defines __GNUC__ and __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(__SIZEOF_INT128__) -#if (defined(__clang__) && !defined(_WIN32)) || \ - (defined(__CUDACC__) && __CUDACC_VER_MAJOR__ >= 9) || \ - (defined(__GNUC__) && !defined(__clang__) && !defined(__CUDACC__)) -#define ABSL_HAVE_INTRINSIC_INT128 1 -#elif defined(__CUDACC__) -// __CUDACC_VER__ is a full version number before CUDA 9, and is defined to a -// 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 // __CUDACC_VER__ >= 70000 -#endif // defined(__CUDACC__) -#endif // ABSL_HAVE_INTRINSIC_INT128 - -// ABSL_HAVE_EXCEPTIONS -// -// Checks whether the compiler both supports and enables exceptions. Many -// compilers support a "no exceptions" mode that disables exceptions. -// -// Generally, when ABSL_HAVE_EXCEPTIONS is not defined: -// -// * Code using `throw` and `try` may not compile. -// * The `noexcept` specifier will still compile and behave as normal. -// * The `noexcept` operator may still return `false`. -// -// For further details, consult the compiler's documentation. -#ifdef ABSL_HAVE_EXCEPTIONS -#error ABSL_HAVE_EXCEPTIONS cannot be directly set. -#elif ABSL_INTERNAL_HAVE_MIN_CLANG_VERSION(3, 6) -// Clang >= 3.6 -#if ABSL_HAVE_FEATURE(cxx_exceptions) -#define ABSL_HAVE_EXCEPTIONS 1 -#endif // ABSL_HAVE_FEATURE(cxx_exceptions) -#elif defined(__clang__) -// Clang < 3.6 -// http://releases.llvm.org/3.6.0/tools/clang/docs/ReleaseNotes.html#the-exceptions-macro -#if defined(__EXCEPTIONS) && ABSL_HAVE_FEATURE(cxx_exceptions) -#define ABSL_HAVE_EXCEPTIONS 1 -#endif // defined(__EXCEPTIONS) && ABSL_HAVE_FEATURE(cxx_exceptions) -// Handle remaining special cases and default to exceptions being supported. -#elif !(defined(__GNUC__) && (__GNUC__ < 5) && !defined(__EXCEPTIONS)) && \ - !(ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(5, 0) && \ - !defined(__cpp_exceptions)) && \ - !(defined(_MSC_VER) && !defined(_CPPUNWIND)) -#define ABSL_HAVE_EXCEPTIONS 1 -#endif - -// ----------------------------------------------------------------------------- -// Platform Feature Checks -// ----------------------------------------------------------------------------- - -// Currently supported operating systems and associated preprocessor -// symbols: -// -// Linux and Linux-derived __linux__ -// Android __ANDROID__ (implies __linux__) -// Linux (non-Android) __linux__ && !__ANDROID__ -// Darwin (macOS and iOS) __APPLE__ -// Akaros (http://akaros.org) __ros__ -// Windows _WIN32 -// NaCL __native_client__ -// AsmJS __asmjs__ -// WebAssembly __wasm__ -// Fuchsia __Fuchsia__ -// -// Note that since Android defines both __ANDROID__ and __linux__, one -// may probe for either Linux or Android by simply testing for __linux__. - -// ABSL_HAVE_MMAP -// -// Checks whether the platform has an mmap(2) implementation as defined in -// POSIX.1-2001. -#ifdef ABSL_HAVE_MMAP -#error ABSL_HAVE_MMAP cannot be directly set -#elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ - defined(_AIX) || defined(__ros__) || defined(__native_client__) || \ - defined(__asmjs__) || defined(__wasm__) || defined(__Fuchsia__) || \ - defined(__sun) || defined(__ASYLO__) || defined(__myriad2__) || \ - defined(__HAIKU__) || defined(__OpenBSD__) || defined(__NetBSD__) || \ - defined(__QNX__) -#define ABSL_HAVE_MMAP 1 -#endif - -// ABSL_HAVE_PTHREAD_GETSCHEDPARAM -// -// Checks whether the platform implements the pthread_(get|set)schedparam(3) -// 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(__FreeBSD__) || \ - defined(_AIX) || defined(__ros__) || defined(__OpenBSD__) || \ - defined(__NetBSD__) -#define ABSL_HAVE_PTHREAD_GETSCHEDPARAM 1 -#endif - -// ABSL_HAVE_SCHED_GETCPU -// -// Checks whether sched_getcpu is available. -#ifdef ABSL_HAVE_SCHED_GETCPU -#error ABSL_HAVE_SCHED_GETCPU cannot be directly set -#elif defined(__linux__) -#define ABSL_HAVE_SCHED_GETCPU 1 -#endif - -// ABSL_HAVE_SCHED_YIELD -// -// Checks whether the platform implements sched_yield(2) as defined in -// POSIX.1-2001. -#ifdef ABSL_HAVE_SCHED_YIELD -#error ABSL_HAVE_SCHED_YIELD cannot be directly set -#elif defined(__linux__) || defined(__ros__) || defined(__native_client__) -#define ABSL_HAVE_SCHED_YIELD 1 -#endif - -// ABSL_HAVE_SEMAPHORE_H -// -// Checks whether the platform supports the header and sem_init(3) -// family of functions as standardized in POSIX.1-2001. -// -// Note: While Apple provides for both iOS and macOS, it is -// explicitly deprecated and will cause build failures if enabled for those -// platforms. We side-step the issue by not defining it here for Apple -// platforms. -#ifdef ABSL_HAVE_SEMAPHORE_H -#error ABSL_HAVE_SEMAPHORE_H cannot be directly set -#elif defined(__linux__) || defined(__ros__) -#define ABSL_HAVE_SEMAPHORE_H 1 -#endif - -// ABSL_HAVE_ALARM -// -// Checks whether the platform supports the header and alarm(2) -// function as standardized in POSIX.1-2001. -#ifdef ABSL_HAVE_ALARM -#error ABSL_HAVE_ALARM cannot be directly set -#elif defined(__GOOGLE_GRTE_VERSION__) -// feature tests for Google's GRTE -#define ABSL_HAVE_ALARM 1 -#elif defined(__GLIBC__) -// feature test for glibc -#define ABSL_HAVE_ALARM 1 -#elif defined(_MSC_VER) -// feature tests for Microsoft's library -#elif defined(__MINGW32__) -// mingw32 doesn't provide alarm(2): -// https://osdn.net/projects/mingw/scm/git/mingw-org-wsl/blobs/5.2-trunk/mingwrt/include/unistd.h -// mingw-w64 provides a no-op implementation: -// https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-crt/misc/alarm.c -#elif defined(__EMSCRIPTEN__) -// emscripten doesn't support signals -#elif defined(__Fuchsia__) -// Signals don't exist on fuchsia. -#elif defined(__native_client__) -#else -// other standard libraries -#define ABSL_HAVE_ALARM 1 -#endif - -// ABSL_IS_LITTLE_ENDIAN -// ABSL_IS_BIG_ENDIAN -// -// Checks the endianness of the platform. -// -// Notes: uses the built in endian macros provided by GCC (since 4.6) and -// Clang (since 3.2); see -// https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html. -// Otherwise, if _WIN32, assume little endian. Otherwise, bail with an error. -#if defined(ABSL_IS_BIG_ENDIAN) -#error "ABSL_IS_BIG_ENDIAN cannot be directly set." -#endif -#if defined(ABSL_IS_LITTLE_ENDIAN) -#error "ABSL_IS_LITTLE_ENDIAN cannot be directly set." -#endif - -#if (defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \ - __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__) -#define ABSL_IS_LITTLE_ENDIAN 1 -#elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && \ - __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -#define ABSL_IS_BIG_ENDIAN 1 -#elif defined(_WIN32) -#define ABSL_IS_LITTLE_ENDIAN 1 -#else -#error "absl endian detection needs to be set up for your compiler" -#endif - -// macOS < 10.13 and iOS < 11 don't let you use , , or -// even though the headers exist and are publicly noted to work, because the -// libc++ shared library shipped on the system doesn't have the requisite -// exported symbols. See https://github.com/abseil/abseil-cpp/issues/207 and -// https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes -// -// libc++ spells out the availability requirements in the file -// llvm-project/libcxx/include/__config via the #define -// _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS. -// -// Unfortunately, Apple initially mis-stated the requirements as macOS < 10.14 -// and iOS < 12 in the libc++ headers. This was corrected by -// https://github.com/llvm/llvm-project/commit/7fb40e1569dd66292b647f4501b85517e9247953 -// which subsequently made it into the XCode 12.5 release. We need to match the -// old (incorrect) conditions when built with old XCode, but can use the -// corrected earlier versions with new XCode. -#if defined(__APPLE__) && defined(_LIBCPP_VERSION) && \ - ((_LIBCPP_VERSION >= 11000 && /* XCode 12.5 or later: */ \ - ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) || \ - (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 110000) || \ - (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 40000) || \ - (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 110000))) || \ - (_LIBCPP_VERSION < 11000 && /* Pre-XCode 12.5: */ \ - ((defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101400) || \ - (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 120000) || \ - (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 50000) || \ - (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && \ - __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 120000)))) -#define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 1 -#else -#define ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE 0 -#endif - -// ABSL_HAVE_STD_ANY -// -// Checks whether C++17 std::any is available by checking whether exists. -#ifdef ABSL_HAVE_STD_ANY -#error "ABSL_HAVE_STD_ANY cannot be directly set." -#endif - -#ifdef __has_include -#if __has_include() && defined(__cplusplus) && __cplusplus >= 201703L && \ - !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE -#define ABSL_HAVE_STD_ANY 1 -#endif -#endif - -// ABSL_HAVE_STD_OPTIONAL -// -// Checks whether C++17 std::optional is available. -#ifdef ABSL_HAVE_STD_OPTIONAL -#error "ABSL_HAVE_STD_OPTIONAL cannot be directly set." -#endif - -#ifdef __has_include -#if __has_include() && defined(__cplusplus) && \ - __cplusplus >= 201703L && !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE -#define ABSL_HAVE_STD_OPTIONAL 1 -#endif -#endif - -// ABSL_HAVE_STD_VARIANT -// -// Checks whether C++17 std::variant is available. -#ifdef ABSL_HAVE_STD_VARIANT -#error "ABSL_HAVE_STD_VARIANT cannot be directly set." -#endif - -#ifdef __has_include -#if __has_include() && defined(__cplusplus) && \ - __cplusplus >= 201703L && !ABSL_INTERNAL_APPLE_CXX17_TYPES_UNAVAILABLE -#define ABSL_HAVE_STD_VARIANT 1 -#endif -#endif - -// ABSL_HAVE_STD_STRING_VIEW -// -// Checks whether C++17 std::string_view is available. -#ifdef ABSL_HAVE_STD_STRING_VIEW -#error "ABSL_HAVE_STD_STRING_VIEW cannot be directly set." -#endif - -#ifdef __has_include -#if __has_include() && defined(__cplusplus) && \ - __cplusplus >= 201703L -#define ABSL_HAVE_STD_STRING_VIEW 1 -#endif -#endif - -// For MSVC, `__has_include` is supported in VS 2017 15.3, which is later than -// the support for , , , . So we use -// _MSC_VER to check whether we have VS 2017 RTM (when , , -// , is implemented) or higher. Also, `__cplusplus` is -// not correctly set by MSVC, so we use `_MSVC_LANG` to check the language -// version. -// TODO(zhangxy): fix tests before enabling aliasing for `std::any`. -#if defined(_MSC_VER) && _MSC_VER >= 1910 && \ - ((defined(_MSVC_LANG) && _MSVC_LANG > 201402) || \ - (defined(__cplusplus) && __cplusplus > 201402)) -// #define ABSL_HAVE_STD_ANY 1 -#define ABSL_HAVE_STD_OPTIONAL 1 -#define ABSL_HAVE_STD_VARIANT 1 -#define ABSL_HAVE_STD_STRING_VIEW 1 -#endif - -// ABSL_USES_STD_ANY -// -// Indicates whether absl::any is an alias for std::any. -#if !defined(ABSL_OPTION_USE_STD_ANY) -#error options.h is misconfigured. -#elif ABSL_OPTION_USE_STD_ANY == 0 || \ - (ABSL_OPTION_USE_STD_ANY == 2 && !defined(ABSL_HAVE_STD_ANY)) -#undef ABSL_USES_STD_ANY -#elif ABSL_OPTION_USE_STD_ANY == 1 || \ - (ABSL_OPTION_USE_STD_ANY == 2 && defined(ABSL_HAVE_STD_ANY)) -#define ABSL_USES_STD_ANY 1 -#else -#error options.h is misconfigured. -#endif - -// ABSL_USES_STD_OPTIONAL -// -// Indicates whether absl::optional is an alias for std::optional. -#if !defined(ABSL_OPTION_USE_STD_OPTIONAL) -#error options.h is misconfigured. -#elif ABSL_OPTION_USE_STD_OPTIONAL == 0 || \ - (ABSL_OPTION_USE_STD_OPTIONAL == 2 && !defined(ABSL_HAVE_STD_OPTIONAL)) -#undef ABSL_USES_STD_OPTIONAL -#elif ABSL_OPTION_USE_STD_OPTIONAL == 1 || \ - (ABSL_OPTION_USE_STD_OPTIONAL == 2 && defined(ABSL_HAVE_STD_OPTIONAL)) -#define ABSL_USES_STD_OPTIONAL 1 -#else -#error options.h is misconfigured. -#endif - -// ABSL_USES_STD_VARIANT -// -// Indicates whether absl::variant is an alias for std::variant. -#if !defined(ABSL_OPTION_USE_STD_VARIANT) -#error options.h is misconfigured. -#elif ABSL_OPTION_USE_STD_VARIANT == 0 || \ - (ABSL_OPTION_USE_STD_VARIANT == 2 && !defined(ABSL_HAVE_STD_VARIANT)) -#undef ABSL_USES_STD_VARIANT -#elif ABSL_OPTION_USE_STD_VARIANT == 1 || \ - (ABSL_OPTION_USE_STD_VARIANT == 2 && defined(ABSL_HAVE_STD_VARIANT)) -#define ABSL_USES_STD_VARIANT 1 -#else -#error options.h is misconfigured. -#endif - -// ABSL_USES_STD_STRING_VIEW -// -// Indicates whether absl::string_view is an alias for std::string_view. -#if !defined(ABSL_OPTION_USE_STD_STRING_VIEW) -#error options.h is misconfigured. -#elif ABSL_OPTION_USE_STD_STRING_VIEW == 0 || \ - (ABSL_OPTION_USE_STD_STRING_VIEW == 2 && \ - !defined(ABSL_HAVE_STD_STRING_VIEW)) -#undef ABSL_USES_STD_STRING_VIEW -#elif ABSL_OPTION_USE_STD_STRING_VIEW == 1 || \ - (ABSL_OPTION_USE_STD_STRING_VIEW == 2 && \ - defined(ABSL_HAVE_STD_STRING_VIEW)) -#define ABSL_USES_STD_STRING_VIEW 1 -#else -#error options.h is misconfigured. -#endif - -// In debug mode, MSVC 2017's std::variant throws a EXCEPTION_ACCESS_VIOLATION -// SEH exception from emplace for variant when constructing the -// struct can throw. This defeats some of variant_test and -// variant_exception_safety_test. -#if defined(_MSC_VER) && _MSC_VER >= 1700 && defined(_DEBUG) -#define ABSL_INTERNAL_MSVC_2017_DBG_MODE -#endif - -// ABSL_INTERNAL_MANGLED_NS -// ABSL_INTERNAL_MANGLED_BACKREFERENCE -// -// Internal macros for building up mangled names in our internal fork of CCTZ. -// This implementation detail is only needed and provided for the MSVC build. -// -// These macros both expand to string literals. ABSL_INTERNAL_MANGLED_NS is -// the mangled spelling of the `absl` namespace, and -// ABSL_INTERNAL_MANGLED_BACKREFERENCE is a back-reference integer representing -// the proper count to skip past the CCTZ fork namespace names. (This number -// is one larger when there is an inline namespace name to skip.) -#if defined(_MSC_VER) -#if ABSL_OPTION_USE_INLINE_NAMESPACE == 0 -#define ABSL_INTERNAL_MANGLED_NS "absl" -#define ABSL_INTERNAL_MANGLED_BACKREFERENCE "5" -#else -#define ABSL_INTERNAL_MANGLED_NS \ - ABSL_INTERNAL_TOKEN_STR(ABSL_OPTION_INLINE_NAMESPACE_NAME) "@absl" -#define ABSL_INTERNAL_MANGLED_BACKREFERENCE "6" -#endif -#endif - -// ABSL_DLL -// -// When building Abseil as a DLL, this macro expands to `__declspec(dllexport)` -// so we can annotate symbols appropriately as being exported. When used in -// headers consuming a DLL, this macro expands to `__declspec(dllimport)` so -// that consumers know the symbol is defined inside the DLL. In all other cases, -// the macro expands to nothing. -#if defined(_MSC_VER) -#if defined(ABSL_BUILD_DLL) -#define ABSL_DLL __declspec(dllexport) -#elif defined(ABSL_CONSUME_DLL) -#define ABSL_DLL __declspec(dllimport) -#else -#define ABSL_DLL -#endif -#else -#define ABSL_DLL -#endif // defined(_MSC_VER) - -// ABSL_HAVE_MEMORY_SANITIZER -// -// MemorySanitizer (MSan) is a detector of uninitialized reads. It consists of -// a compiler instrumentation module and a run-time library. -#ifdef ABSL_HAVE_MEMORY_SANITIZER -#error "ABSL_HAVE_MEMORY_SANITIZER cannot be directly set." -#elif !defined(__native_client__) && ABSL_HAVE_FEATURE(memory_sanitizer) -#define ABSL_HAVE_MEMORY_SANITIZER 1 -#endif - -// ABSL_HAVE_THREAD_SANITIZER -// -// ThreadSanitizer (TSan) is a fast data race detector. -#ifdef ABSL_HAVE_THREAD_SANITIZER -#error "ABSL_HAVE_THREAD_SANITIZER cannot be directly set." -#elif defined(__SANITIZE_THREAD__) -#define ABSL_HAVE_THREAD_SANITIZER 1 -#elif ABSL_HAVE_FEATURE(thread_sanitizer) -#define ABSL_HAVE_THREAD_SANITIZER 1 -#endif - -// ABSL_HAVE_ADDRESS_SANITIZER -// -// AddressSanitizer (ASan) is a fast memory error detector. -#ifdef ABSL_HAVE_ADDRESS_SANITIZER -#error "ABSL_HAVE_ADDRESS_SANITIZER cannot be directly set." -#elif defined(__SANITIZE_ADDRESS__) -#define ABSL_HAVE_ADDRESS_SANITIZER 1 -#elif ABSL_HAVE_FEATURE(address_sanitizer) -#define ABSL_HAVE_ADDRESS_SANITIZER 1 -#endif - -// ABSL_HAVE_HWADDRESS_SANITIZER -// -// Hardware-Assisted AddressSanitizer (or HWASAN) is even faster than asan -// memory error detector which can use CPU features like ARM TBI, Intel LAM or -// AMD UAI. -#ifdef ABSL_HAVE_HWADDRESS_SANITIZER -#error "ABSL_HAVE_HWADDRESS_SANITIZER cannot be directly set." -#elif defined(__SANITIZE_HWADDRESS__) -#define ABSL_HAVE_HWADDRESS_SANITIZER 1 -#elif ABSL_HAVE_FEATURE(hwaddress_sanitizer) -#define ABSL_HAVE_HWADDRESS_SANITIZER 1 -#endif - -// ABSL_HAVE_LEAK_SANITIZER -// -// LeakSanitizer (or lsan) is a detector of memory leaks. -// https://clang.llvm.org/docs/LeakSanitizer.html -// https://github.com/google/sanitizers/wiki/AddressSanitizerLeakSanitizer -// -// The macro ABSL_HAVE_LEAK_SANITIZER can be used to detect at compile-time -// whether the LeakSanitizer is potentially available. However, just because the -// LeakSanitizer is available does not mean it is active. Use the -// always-available run-time interface in //absl/debugging/leak_check.h for -// interacting with LeakSanitizer. -#ifdef ABSL_HAVE_LEAK_SANITIZER -#error "ABSL_HAVE_LEAK_SANITIZER cannot be directly set." -#elif defined(LEAK_SANITIZER) -// GCC provides no method for detecting the presense of the standalone -// LeakSanitizer (-fsanitize=leak), so GCC users of -fsanitize=leak should also -// use -DLEAK_SANITIZER. -#define ABSL_HAVE_LEAK_SANITIZER 1 -// Clang standalone LeakSanitizer (-fsanitize=leak) -#elif ABSL_HAVE_FEATURE(leak_sanitizer) -#define ABSL_HAVE_LEAK_SANITIZER 1 -#elif defined(ABSL_HAVE_ADDRESS_SANITIZER) -// GCC or Clang using the LeakSanitizer integrated into AddressSanitizer. -#define ABSL_HAVE_LEAK_SANITIZER 1 -#endif - -// ABSL_HAVE_CLASS_TEMPLATE_ARGUMENT_DEDUCTION -// -// Class template argument deduction is a language feature added in C++17. -#ifdef ABSL_HAVE_CLASS_TEMPLATE_ARGUMENT_DEDUCTION -#error "ABSL_HAVE_CLASS_TEMPLATE_ARGUMENT_DEDUCTION cannot be directly set." -#elif defined(__cpp_deduction_guides) -#define ABSL_HAVE_CLASS_TEMPLATE_ARGUMENT_DEDUCTION 1 -#endif - -// ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -// -// Prior to C++17, static constexpr variables defined in classes required a -// separate definition outside of the class body, for example: -// -// class Foo { -// static constexpr int kBar = 0; -// }; -// constexpr int Foo::kBar; -// -// In C++17, these variables defined in classes are considered inline variables, -// and the extra declaration is redundant. Since some compilers warn on the -// extra declarations, ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL can be used -// conditionally ignore them: -// -// #ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -// constexpr int Foo::kBar; -// #endif -#if defined(ABSL_INTERNAL_CPLUSPLUS_LANG) && \ - ABSL_INTERNAL_CPLUSPLUS_LANG < 201703L -#define ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL 1 -#endif - -// `ABSL_INTERNAL_HAS_RTTI` determines whether abseil is being compiled with -// RTTI support. -#ifdef ABSL_INTERNAL_HAS_RTTI -#error ABSL_INTERNAL_HAS_RTTI cannot be directly set -#elif !defined(__GNUC__) || defined(__GXX_RTTI) -#define ABSL_INTERNAL_HAS_RTTI 1 -#endif // !defined(__GNUC__) || defined(__GXX_RTTI) - -// ABSL_INTERNAL_HAVE_SSE is used for compile-time detection of SSE support. -// See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html for an overview of -// which architectures support the various x86 instruction sets. -#ifdef ABSL_INTERNAL_HAVE_SSE -#error ABSL_INTERNAL_HAVE_SSE cannot be directly set -#elif defined(__SSE__) -#define ABSL_INTERNAL_HAVE_SSE 1 -#elif defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1) -// MSVC only defines _M_IX86_FP for x86 32-bit code, and _M_IX86_FP >= 1 -// indicates that at least SSE was targeted with the /arch:SSE option. -// All x86-64 processors support SSE, so support can be assumed. -// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros -#define ABSL_INTERNAL_HAVE_SSE 1 -#endif - -// ABSL_INTERNAL_HAVE_SSE2 is used for compile-time detection of SSE2 support. -// See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html for an overview of -// which architectures support the various x86 instruction sets. -#ifdef ABSL_INTERNAL_HAVE_SSE2 -#error ABSL_INTERNAL_HAVE_SSE2 cannot be directly set -#elif defined(__SSE2__) -#define ABSL_INTERNAL_HAVE_SSE2 1 -#elif defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2) -// MSVC only defines _M_IX86_FP for x86 32-bit code, and _M_IX86_FP >= 2 -// indicates that at least SSE2 was targeted with the /arch:SSE2 option. -// All x86-64 processors support SSE2, so support can be assumed. -// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros -#define ABSL_INTERNAL_HAVE_SSE2 1 -#endif - -// ABSL_INTERNAL_HAVE_SSSE3 is used for compile-time detection of SSSE3 support. -// See https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html for an overview of -// which architectures support the various x86 instruction sets. -// -// MSVC does not have a mode that targets SSSE3 at compile-time. To use SSSE3 -// with MSVC requires either assuming that the code will only every run on CPUs -// that support SSSE3, otherwise __cpuid() can be used to detect support at -// runtime and fallback to a non-SSSE3 implementation when SSSE3 is unsupported -// by the CPU. -#ifdef ABSL_INTERNAL_HAVE_SSSE3 -#error ABSL_INTERNAL_HAVE_SSSE3 cannot be directly set -#elif defined(__SSSE3__) -#define ABSL_INTERNAL_HAVE_SSSE3 1 -#endif - -// ABSL_INTERNAL_HAVE_ARM_NEON is used for compile-time detection of NEON (ARM -// SIMD). -#ifdef ABSL_INTERNAL_HAVE_ARM_NEON -#error ABSL_INTERNAL_HAVE_ARM_NEON cannot be directly set -#elif defined(__ARM_NEON) -#define ABSL_INTERNAL_HAVE_ARM_NEON 1 -#endif - -#endif // ABSL_BASE_CONFIG_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/const_init.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/const_init.h deleted file mode 100644 index 16520b6..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/const_init.h +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// kConstInit -// ----------------------------------------------------------------------------- -// -// A constructor tag used to mark an object as safe for use as a global -// variable, avoiding the usual lifetime issues that can affect globals. - -#ifndef ABSL_BASE_CONST_INIT_H_ -#define ABSL_BASE_CONST_INIT_H_ - -#include "absl/base/config.h" - -// In general, objects with static storage duration (such as global variables) -// can trigger tricky object lifetime situations. Attempting to access them -// from the constructors or destructors of other global objects can result in -// undefined behavior, unless their constructors and destructors are designed -// with this issue in mind. -// -// The normal way to deal with this issue in C++11 is to use constant -// initialization and trivial destructors. -// -// Constant initialization is guaranteed to occur before any other code -// executes. Constructors that are declared 'constexpr' are eligible for -// constant initialization. You can annotate a variable declaration with the -// ABSL_CONST_INIT macro to express this intent. For compilers that support -// it, this annotation will cause a compilation error for declarations that -// aren't subject to constant initialization (perhaps because a runtime value -// was passed as a constructor argument). -// -// On program shutdown, lifetime issues can be avoided on global objects by -// ensuring that they contain trivial destructors. A class has a trivial -// destructor unless it has a user-defined destructor, a virtual method or base -// class, or a data member or base class with a non-trivial destructor of its -// own. Objects with static storage duration and a trivial destructor are not -// cleaned up on program shutdown, and are thus safe to access from other code -// running during shutdown. -// -// For a few core Abseil classes, we make a best effort to allow for safe global -// instances, even though these classes have non-trivial destructors. These -// objects can be created with the absl::kConstInit tag. For example: -// ABSL_CONST_INIT absl::Mutex global_mutex(absl::kConstInit); -// -// The line above declares a global variable of type absl::Mutex which can be -// accessed at any point during startup or shutdown. global_mutex's destructor -// will still run, but will not invalidate the object. Note that C++ specifies -// that accessing an object after its destructor has run results in undefined -// behavior, but this pattern works on the toolchains we support. -// -// The absl::kConstInit tag should only be used to define objects with static -// or thread_local storage duration. - -namespace absl { -ABSL_NAMESPACE_BEGIN - -enum ConstInitType { - kConstInit, -}; - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_CONST_INIT_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/dynamic_annotations.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/dynamic_annotations.h deleted file mode 100644 index 3ea7c15..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/dynamic_annotations.h +++ /dev/null @@ -1,471 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file defines dynamic annotations for use with dynamic analysis tool -// such as valgrind, PIN, etc. -// -// Dynamic annotation is a source code annotation that affects the generated -// code (that is, the annotation is not a comment). Each such annotation is -// attached to a particular instruction and/or to a particular object (address) -// in the program. -// -// The annotations that should be used by users are macros in all upper-case -// (e.g., ABSL_ANNOTATE_THREAD_NAME). -// -// Actual implementation of these macros may differ depending on the dynamic -// analysis tool being used. -// -// This file supports the following configurations: -// - Dynamic Annotations enabled (with static thread-safety warnings disabled). -// In this case, macros expand to functions implemented by Thread Sanitizer, -// when building with TSan. When not provided an external implementation, -// dynamic_annotations.cc provides no-op implementations. -// -// - Static Clang thread-safety warnings enabled. -// When building with a Clang compiler that supports thread-safety warnings, -// a subset of annotations can be statically-checked at compile-time. We -// expand these macros to static-inline functions that can be analyzed for -// thread-safety, but afterwards elided when building the final binary. -// -// - All annotations are disabled. -// If neither Dynamic Annotations nor Clang thread-safety warnings are -// enabled, then all annotation-macros expand to empty. - -#ifndef ABSL_BASE_DYNAMIC_ANNOTATIONS_H_ -#define ABSL_BASE_DYNAMIC_ANNOTATIONS_H_ - -#include - -#include "absl/base/attributes.h" -#include "absl/base/config.h" -#ifdef __cplusplus -#include "absl/base/macros.h" -#endif - -// TODO(rogeeff): Remove after the backward compatibility period. -#include "absl/base/internal/dynamic_annotations.h" // IWYU pragma: export - -// ------------------------------------------------------------------------- -// Decide which features are enabled. - -#ifdef ABSL_HAVE_THREAD_SANITIZER - -#define ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED 1 -#define ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED 1 -#define ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED 1 -#define ABSL_INTERNAL_ANNOTALYSIS_ENABLED 0 -#define ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED 1 - -#else - -#define ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED 0 -#define ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED 0 -#define ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED 0 - -// Clang provides limited support for static thread-safety analysis through a -// feature called Annotalysis. We configure macro-definitions according to -// whether Annotalysis support is available. When running in opt-mode, GCC -// will issue a warning, if these attributes are compiled. Only include them -// when compiling using Clang. - -#if defined(__clang__) -#define ABSL_INTERNAL_ANNOTALYSIS_ENABLED 1 -#if !defined(SWIG) -#define ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED 1 -#endif -#else -#define ABSL_INTERNAL_ANNOTALYSIS_ENABLED 0 -#endif - -// Read/write annotations are enabled in Annotalysis mode; disabled otherwise. -#define ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED \ - ABSL_INTERNAL_ANNOTALYSIS_ENABLED - -#endif // ABSL_HAVE_THREAD_SANITIZER - -#ifdef __cplusplus -#define ABSL_INTERNAL_BEGIN_EXTERN_C extern "C" { -#define ABSL_INTERNAL_END_EXTERN_C } // extern "C" -#define ABSL_INTERNAL_GLOBAL_SCOPED(F) ::F -#define ABSL_INTERNAL_STATIC_INLINE inline -#else -#define ABSL_INTERNAL_BEGIN_EXTERN_C // empty -#define ABSL_INTERNAL_END_EXTERN_C // empty -#define ABSL_INTERNAL_GLOBAL_SCOPED(F) F -#define ABSL_INTERNAL_STATIC_INLINE static inline -#endif - -// ------------------------------------------------------------------------- -// Define race annotations. - -#if ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED == 1 -// Some of the symbols used in this section (e.g. AnnotateBenignRaceSized) are -// defined by the compiler-based santizer implementation, not by the Abseil -// library. Therefore they do not use ABSL_INTERNAL_C_SYMBOL. - -// ------------------------------------------------------------- -// Annotations that suppress errors. It is usually better to express the -// program's synchronization using the other annotations, but these can be used -// when all else fails. - -// Report that we may have a benign race at `pointer`, with size -// "sizeof(*(pointer))". `pointer` must be a non-void* pointer. Insert at the -// point where `pointer` has been allocated, preferably close to the point -// where the race happens. See also ABSL_ANNOTATE_BENIGN_RACE_STATIC. -#define ABSL_ANNOTATE_BENIGN_RACE(pointer, description) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateBenignRaceSized) \ - (__FILE__, __LINE__, pointer, sizeof(*(pointer)), description) - -// Same as ABSL_ANNOTATE_BENIGN_RACE(`address`, `description`), but applies to -// the memory range [`address`, `address`+`size`). -#define ABSL_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateBenignRaceSized) \ - (__FILE__, __LINE__, address, size, description) - -// Enable (`enable`!=0) or disable (`enable`==0) race detection for all threads. -// This annotation could be useful if you want to skip expensive race analysis -// during some period of program execution, e.g. during initialization. -#define ABSL_ANNOTATE_ENABLE_RACE_DETECTION(enable) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateEnableRaceDetection) \ - (__FILE__, __LINE__, enable) - -// ------------------------------------------------------------- -// Annotations useful for debugging. - -// Report the current thread `name` to a race detector. -#define ABSL_ANNOTATE_THREAD_NAME(name) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateThreadName)(__FILE__, __LINE__, name) - -// ------------------------------------------------------------- -// Annotations useful when implementing locks. They are not normally needed by -// modules that merely use locks. The `lock` argument is a pointer to the lock -// object. - -// Report that a lock has been created at address `lock`. -#define ABSL_ANNOTATE_RWLOCK_CREATE(lock) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockCreate)(__FILE__, __LINE__, lock) - -// Report that a linker initialized lock has been created at address `lock`. -#ifdef ABSL_HAVE_THREAD_SANITIZER -#define ABSL_ANNOTATE_RWLOCK_CREATE_STATIC(lock) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockCreateStatic) \ - (__FILE__, __LINE__, lock) -#else -#define ABSL_ANNOTATE_RWLOCK_CREATE_STATIC(lock) \ - ABSL_ANNOTATE_RWLOCK_CREATE(lock) -#endif - -// Report that the lock at address `lock` is about to be destroyed. -#define ABSL_ANNOTATE_RWLOCK_DESTROY(lock) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockDestroy)(__FILE__, __LINE__, lock) - -// Report that the lock at address `lock` has been acquired. -// `is_w`=1 for writer lock, `is_w`=0 for reader lock. -#define ABSL_ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockAcquired) \ - (__FILE__, __LINE__, lock, is_w) - -// Report that the lock at address `lock` is about to be released. -// `is_w`=1 for writer lock, `is_w`=0 for reader lock. -#define ABSL_ANNOTATE_RWLOCK_RELEASED(lock, is_w) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockReleased) \ - (__FILE__, __LINE__, lock, is_w) - -// Apply ABSL_ANNOTATE_BENIGN_RACE_SIZED to a static variable `static_var`. -#define ABSL_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) \ - namespace { \ - class static_var##_annotator { \ - public: \ - static_var##_annotator() { \ - ABSL_ANNOTATE_BENIGN_RACE_SIZED(&static_var, sizeof(static_var), \ - #static_var ": " description); \ - } \ - }; \ - static static_var##_annotator the##static_var##_annotator; \ - } // namespace - -// Function prototypes of annotations provided by the compiler-based sanitizer -// implementation. -ABSL_INTERNAL_BEGIN_EXTERN_C -void AnnotateRWLockCreate(const char* file, int line, - const volatile void* lock); -void AnnotateRWLockCreateStatic(const char* file, int line, - const volatile void* lock); -void AnnotateRWLockDestroy(const char* file, int line, - const volatile void* lock); -void AnnotateRWLockAcquired(const char* file, int line, - const volatile void* lock, long is_w); // NOLINT -void AnnotateRWLockReleased(const char* file, int line, - const volatile void* lock, long is_w); // NOLINT -void AnnotateBenignRace(const char* file, int line, - const volatile void* address, const char* description); -void AnnotateBenignRaceSized(const char* file, int line, - const volatile void* address, size_t size, - const char* description); -void AnnotateThreadName(const char* file, int line, const char* name); -void AnnotateEnableRaceDetection(const char* file, int line, int enable); -ABSL_INTERNAL_END_EXTERN_C - -#else // ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED == 0 - -#define ABSL_ANNOTATE_RWLOCK_CREATE(lock) // empty -#define ABSL_ANNOTATE_RWLOCK_CREATE_STATIC(lock) // empty -#define ABSL_ANNOTATE_RWLOCK_DESTROY(lock) // empty -#define ABSL_ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) // empty -#define ABSL_ANNOTATE_RWLOCK_RELEASED(lock, is_w) // empty -#define ABSL_ANNOTATE_BENIGN_RACE(address, description) // empty -#define ABSL_ANNOTATE_BENIGN_RACE_SIZED(address, size, description) // empty -#define ABSL_ANNOTATE_THREAD_NAME(name) // empty -#define ABSL_ANNOTATE_ENABLE_RACE_DETECTION(enable) // empty -#define ABSL_ANNOTATE_BENIGN_RACE_STATIC(static_var, description) // empty - -#endif // ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED - -// ------------------------------------------------------------------------- -// Define memory annotations. - -#ifdef ABSL_HAVE_MEMORY_SANITIZER - -#include - -#define ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \ - __msan_unpoison(address, size) - -#define ABSL_ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) \ - __msan_allocated_memory(address, size) - -#else // !defined(ABSL_HAVE_MEMORY_SANITIZER) - -// TODO(rogeeff): remove this branch -#ifdef ABSL_HAVE_THREAD_SANITIZER -#define ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \ - do { \ - (void)(address); \ - (void)(size); \ - } while (0) -#define ABSL_ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) \ - do { \ - (void)(address); \ - (void)(size); \ - } while (0) -#else - -#define ABSL_ANNOTATE_MEMORY_IS_INITIALIZED(address, size) // empty -#define ABSL_ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) // empty - -#endif - -#endif // ABSL_HAVE_MEMORY_SANITIZER - -// ------------------------------------------------------------------------- -// Define IGNORE_READS_BEGIN/_END attributes. - -#if defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED) - -#define ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE \ - __attribute((exclusive_lock_function("*"))) -#define ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE \ - __attribute((unlock_function("*"))) - -#else // !defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED) - -#define ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE // empty -#define ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE // empty - -#endif // defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED) - -// ------------------------------------------------------------------------- -// Define IGNORE_READS_BEGIN/_END annotations. - -#if ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED == 1 -// Some of the symbols used in this section (e.g. AnnotateIgnoreReadsBegin) are -// defined by the compiler-based implementation, not by the Abseil -// library. Therefore they do not use ABSL_INTERNAL_C_SYMBOL. - -// Request the analysis tool to ignore all reads in the current thread until -// ABSL_ANNOTATE_IGNORE_READS_END is called. Useful to ignore intentional racey -// reads, while still checking other reads and all writes. -// See also ABSL_ANNOTATE_UNPROTECTED_READ. -#define ABSL_ANNOTATE_IGNORE_READS_BEGIN() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreReadsBegin) \ - (__FILE__, __LINE__) - -// Stop ignoring reads. -#define ABSL_ANNOTATE_IGNORE_READS_END() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreReadsEnd) \ - (__FILE__, __LINE__) - -// Function prototypes of annotations provided by the compiler-based sanitizer -// implementation. -ABSL_INTERNAL_BEGIN_EXTERN_C -void AnnotateIgnoreReadsBegin(const char* file, int line) - ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE; -void AnnotateIgnoreReadsEnd(const char* file, - int line) ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE; -ABSL_INTERNAL_END_EXTERN_C - -#elif defined(ABSL_INTERNAL_ANNOTALYSIS_ENABLED) - -// When Annotalysis is enabled without Dynamic Annotations, the use of -// static-inline functions allows the annotations to be read at compile-time, -// while still letting the compiler elide the functions from the final build. -// -// TODO(delesley) -- The exclusive lock here ignores writes as well, but -// allows IGNORE_READS_AND_WRITES to work properly. - -#define ABSL_ANNOTATE_IGNORE_READS_BEGIN() \ - ABSL_INTERNAL_GLOBAL_SCOPED( \ - ABSL_INTERNAL_C_SYMBOL(AbslInternalAnnotateIgnoreReadsBegin)) \ - () - -#define ABSL_ANNOTATE_IGNORE_READS_END() \ - ABSL_INTERNAL_GLOBAL_SCOPED( \ - ABSL_INTERNAL_C_SYMBOL(AbslInternalAnnotateIgnoreReadsEnd)) \ - () - -ABSL_INTERNAL_STATIC_INLINE void ABSL_INTERNAL_C_SYMBOL( - AbslInternalAnnotateIgnoreReadsBegin)() - ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE {} - -ABSL_INTERNAL_STATIC_INLINE void ABSL_INTERNAL_C_SYMBOL( - AbslInternalAnnotateIgnoreReadsEnd)() - ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE {} - -#else - -#define ABSL_ANNOTATE_IGNORE_READS_BEGIN() // empty -#define ABSL_ANNOTATE_IGNORE_READS_END() // empty - -#endif - -// ------------------------------------------------------------------------- -// Define IGNORE_WRITES_BEGIN/_END annotations. - -#if ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED == 1 - -// Similar to ABSL_ANNOTATE_IGNORE_READS_BEGIN, but ignore writes instead. -#define ABSL_ANNOTATE_IGNORE_WRITES_BEGIN() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreWritesBegin)(__FILE__, __LINE__) - -// Stop ignoring writes. -#define ABSL_ANNOTATE_IGNORE_WRITES_END() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreWritesEnd)(__FILE__, __LINE__) - -// Function prototypes of annotations provided by the compiler-based sanitizer -// implementation. -ABSL_INTERNAL_BEGIN_EXTERN_C -void AnnotateIgnoreWritesBegin(const char* file, int line); -void AnnotateIgnoreWritesEnd(const char* file, int line); -ABSL_INTERNAL_END_EXTERN_C - -#else - -#define ABSL_ANNOTATE_IGNORE_WRITES_BEGIN() // empty -#define ABSL_ANNOTATE_IGNORE_WRITES_END() // empty - -#endif - -// ------------------------------------------------------------------------- -// Define the ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_* annotations using the more -// primitive annotations defined above. -// -// Instead of doing -// ABSL_ANNOTATE_IGNORE_READS_BEGIN(); -// ... = x; -// ABSL_ANNOTATE_IGNORE_READS_END(); -// one can use -// ... = ABSL_ANNOTATE_UNPROTECTED_READ(x); - -#if defined(ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED) - -// Start ignoring all memory accesses (both reads and writes). -#define ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() \ - do { \ - ABSL_ANNOTATE_IGNORE_READS_BEGIN(); \ - ABSL_ANNOTATE_IGNORE_WRITES_BEGIN(); \ - } while (0) - -// Stop ignoring both reads and writes. -#define ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_END() \ - do { \ - ABSL_ANNOTATE_IGNORE_WRITES_END(); \ - ABSL_ANNOTATE_IGNORE_READS_END(); \ - } while (0) - -#ifdef __cplusplus -// ABSL_ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads. -#define ABSL_ANNOTATE_UNPROTECTED_READ(x) \ - absl::base_internal::AnnotateUnprotectedRead(x) - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -template -inline T AnnotateUnprotectedRead(const volatile T& x) { // NOLINT - ABSL_ANNOTATE_IGNORE_READS_BEGIN(); - T res = x; - ABSL_ANNOTATE_IGNORE_READS_END(); - return res; -} - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl -#endif - -#else - -#define ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() // empty -#define ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_END() // empty -#define ABSL_ANNOTATE_UNPROTECTED_READ(x) (x) - -#endif - -// ------------------------------------------------------------------------- -// Address sanitizer annotations - -#ifdef ABSL_HAVE_ADDRESS_SANITIZER -// Describe the current state of a contiguous container such as e.g. -// std::vector or std::string. For more details see -// sanitizer/common_interface_defs.h, which is provided by the compiler. -#include - -#define ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(beg, end, old_mid, new_mid) \ - __sanitizer_annotate_contiguous_container(beg, end, old_mid, new_mid) -#define ABSL_ADDRESS_SANITIZER_REDZONE(name) \ - struct { \ - alignas(8) char x[8]; \ - } name - -#else - -#define ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(beg, end, old_mid, new_mid) // empty -#define ABSL_ADDRESS_SANITIZER_REDZONE(name) static_assert(true, "") - -#endif // ABSL_HAVE_ADDRESS_SANITIZER - -// ------------------------------------------------------------------------- -// Undefine the macros intended only for this file. - -#undef ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_ANNOTALYSIS_ENABLED -#undef ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_BEGIN_EXTERN_C -#undef ABSL_INTERNAL_END_EXTERN_C -#undef ABSL_INTERNAL_STATIC_INLINE - -#endif // ABSL_BASE_DYNAMIC_ANNOTATIONS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/atomic_hook.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/atomic_hook.h deleted file mode 100644 index ae21cd7..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/atomic_hook.h +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_ATOMIC_HOOK_H_ -#define ABSL_BASE_INTERNAL_ATOMIC_HOOK_H_ - -#include -#include -#include -#include - -#include "absl/base/attributes.h" -#include "absl/base/config.h" - -#if defined(_MSC_VER) && !defined(__clang__) -#define ABSL_HAVE_WORKING_CONSTEXPR_STATIC_INIT 0 -#else -#define ABSL_HAVE_WORKING_CONSTEXPR_STATIC_INIT 1 -#endif - -#if defined(_MSC_VER) -#define ABSL_HAVE_WORKING_ATOMIC_POINTER 0 -#else -#define ABSL_HAVE_WORKING_ATOMIC_POINTER 1 -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -template -class AtomicHook; - -// To workaround AtomicHook not being constant-initializable on some platforms, -// prefer to annotate instances with `ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES` -// instead of `ABSL_CONST_INIT`. -#if ABSL_HAVE_WORKING_CONSTEXPR_STATIC_INIT -#define ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES ABSL_CONST_INIT -#else -#define ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES -#endif - -// `AtomicHook` is a helper class, templatized on a raw function pointer type, -// for implementing Abseil customization hooks. It is a callable object that -// dispatches to the registered hook. Objects of type `AtomicHook` must have -// static or thread storage duration. -// -// A default constructed object performs a no-op (and returns a default -// constructed object) if no hook has been registered. -// -// Hooks can be pre-registered via constant initialization, for example: -// -// ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES static AtomicHook -// my_hook(DefaultAction); -// -// and then changed at runtime via a call to `Store()`. -// -// Reads and writes guarantee memory_order_acquire/memory_order_release -// semantics. -template -class AtomicHook { - public: - using FnPtr = ReturnType (*)(Args...); - - // Constructs an object that by default performs a no-op (and - // returns a default constructed object) when no hook as been registered. - constexpr AtomicHook() : AtomicHook(DummyFunction) {} - - // Constructs an object that by default dispatches to/returns the - // pre-registered default_fn when no hook has been registered at runtime. -#if ABSL_HAVE_WORKING_ATOMIC_POINTER && ABSL_HAVE_WORKING_CONSTEXPR_STATIC_INIT - explicit constexpr AtomicHook(FnPtr default_fn) - : hook_(default_fn), default_fn_(default_fn) {} -#elif ABSL_HAVE_WORKING_CONSTEXPR_STATIC_INIT - explicit constexpr AtomicHook(FnPtr default_fn) - : hook_(kUninitialized), default_fn_(default_fn) {} -#else - // As of January 2020, on all known versions of MSVC this constructor runs in - // the global constructor sequence. If `Store()` is called by a dynamic - // initializer, we want to preserve the value, even if this constructor runs - // after the call to `Store()`. If not, `hook_` will be - // zero-initialized by the linker and we have no need to set it. - // https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html - explicit constexpr AtomicHook(FnPtr default_fn) - : /* hook_(deliberately omitted), */ default_fn_(default_fn) { - static_assert(kUninitialized == 0, "here we rely on zero-initialization"); - } -#endif - - // Stores the provided function pointer as the value for this hook. - // - // This is intended to be called once. Multiple calls are legal only if the - // same function pointer is provided for each call. The store is implemented - // as a memory_order_release operation, and read accesses are implemented as - // memory_order_acquire. - void Store(FnPtr fn) { - bool success = DoStore(fn); - static_cast(success); - assert(success); - } - - // Invokes the registered callback. If no callback has yet been registered, a - // default-constructed object of the appropriate type is returned instead. - template - ReturnType operator()(CallArgs&&... args) const { - return DoLoad()(std::forward(args)...); - } - - // Returns the registered callback, or nullptr if none has been registered. - // Useful if client code needs to conditionalize behavior based on whether a - // callback was registered. - // - // Note that atomic_hook.Load()() and atomic_hook() have different semantics: - // operator()() will perform a no-op if no callback was registered, while - // Load()() will dereference a null function pointer. Prefer operator()() to - // Load()() unless you must conditionalize behavior on whether a hook was - // registered. - FnPtr Load() const { - FnPtr ptr = DoLoad(); - return (ptr == DummyFunction) ? nullptr : ptr; - } - - private: - static ReturnType DummyFunction(Args...) { - return ReturnType(); - } - - // Current versions of MSVC (as of September 2017) have a broken - // implementation of std::atomic: Its constructor attempts to do the - // equivalent of a reinterpret_cast in a constexpr context, which is not - // allowed. - // - // This causes an issue when building with LLVM under Windows. To avoid this, - // we use a less-efficient, intptr_t-based implementation on Windows. -#if ABSL_HAVE_WORKING_ATOMIC_POINTER - // Return the stored value, or DummyFunction if no value has been stored. - FnPtr DoLoad() const { return hook_.load(std::memory_order_acquire); } - - // Store the given value. Returns false if a different value was already - // stored to this object. - bool DoStore(FnPtr fn) { - assert(fn); - FnPtr expected = default_fn_; - const bool store_succeeded = hook_.compare_exchange_strong( - expected, fn, std::memory_order_acq_rel, std::memory_order_acquire); - const bool same_value_already_stored = (expected == fn); - return store_succeeded || same_value_already_stored; - } - - std::atomic hook_; -#else // !ABSL_HAVE_WORKING_ATOMIC_POINTER - // Use a sentinel value unlikely to be the address of an actual function. - static constexpr intptr_t kUninitialized = 0; - - static_assert(sizeof(intptr_t) >= sizeof(FnPtr), - "intptr_t can't contain a function pointer"); - - FnPtr DoLoad() const { - const intptr_t value = hook_.load(std::memory_order_acquire); - if (value == kUninitialized) { - return default_fn_; - } - return reinterpret_cast(value); - } - - bool DoStore(FnPtr fn) { - assert(fn); - const auto value = reinterpret_cast(fn); - intptr_t expected = kUninitialized; - const bool store_succeeded = hook_.compare_exchange_strong( - expected, value, std::memory_order_acq_rel, std::memory_order_acquire); - const bool same_value_already_stored = (expected == value); - return store_succeeded || same_value_already_stored; - } - - std::atomic hook_; -#endif - - const FnPtr default_fn_; -}; - -#undef ABSL_HAVE_WORKING_ATOMIC_POINTER -#undef ABSL_HAVE_WORKING_CONSTEXPR_STATIC_INIT - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_ATOMIC_HOOK_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/cycleclock.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/cycleclock.h deleted file mode 100644 index 9704e38..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/cycleclock.h +++ /dev/null @@ -1,159 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// ----------------------------------------------------------------------------- -// File: cycleclock.h -// ----------------------------------------------------------------------------- -// -// This header file defines a `CycleClock`, which yields the value and frequency -// of a cycle counter that increments at a rate that is approximately constant. -// -// NOTE: -// -// The cycle counter frequency is not necessarily related to the core clock -// frequency and should not be treated as such. That is, `CycleClock` cycles are -// not necessarily "CPU cycles" and code should not rely on that behavior, even -// if experimentally observed. -// -// An arbitrary offset may have been added to the counter at power on. -// -// On some platforms, the rate and offset of the counter may differ -// slightly when read from different CPUs of a multiprocessor. Usually, -// we try to ensure that the operating system adjusts values periodically -// so that values agree approximately. If you need stronger guarantees, -// consider using alternate interfaces. -// -// The CPU is not required to maintain the ordering of a cycle counter read -// with respect to surrounding instructions. - -#ifndef ABSL_BASE_INTERNAL_CYCLECLOCK_H_ -#define ABSL_BASE_INTERNAL_CYCLECLOCK_H_ - -#include -#include - -#include "absl/base/attributes.h" -#include "absl/base/config.h" -#include "absl/base/internal/unscaledcycleclock.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -using CycleClockSourceFunc = int64_t (*)(); - -// ----------------------------------------------------------------------------- -// CycleClock -// ----------------------------------------------------------------------------- -class CycleClock { - public: - // CycleClock::Now() - // - // Returns the value of a cycle counter that counts at a rate that is - // approximately constant. - static int64_t Now(); - - // CycleClock::Frequency() - // - // Returns the amount by which `CycleClock::Now()` increases per second. Note - // that this value may not necessarily match the core CPU clock frequency. - static double Frequency(); - - private: -#if ABSL_USE_UNSCALED_CYCLECLOCK - static CycleClockSourceFunc LoadCycleClockSource(); - -#ifdef NDEBUG -#ifdef ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY - // Not debug mode and the UnscaledCycleClock frequency is the CPU - // frequency. Scale the CycleClock to prevent overflow if someone - // tries to represent the time as cycles since the Unix epoch. - static constexpr int32_t kShift = 1; -#else - // Not debug mode and the UnscaledCycleClock isn't operating at the - // raw CPU frequency. There is no need to do any scaling, so don't - // needlessly sacrifice precision. - static constexpr int32_t kShift = 0; -#endif -#else // NDEBUG - // In debug mode use a different shift to discourage depending on a - // particular shift value. - static constexpr int32_t kShift = 2; -#endif // NDEBUG - - static constexpr double kFrequencyScale = 1.0 / (1 << kShift); - ABSL_CONST_INIT static std::atomic cycle_clock_source_; -#endif // ABSL_USE_UNSCALED_CYCLECLOC - - CycleClock() = delete; // no instances - CycleClock(const CycleClock&) = delete; - CycleClock& operator=(const CycleClock&) = delete; - - friend class CycleClockSource; -}; - -class CycleClockSource { - private: - // CycleClockSource::Register() - // - // Register a function that provides an alternate source for the unscaled CPU - // cycle count value. The source function must be async signal safe, must not - // call CycleClock::Now(), and must have a frequency that matches that of the - // unscaled clock used by CycleClock. A nullptr value resets CycleClock to use - // the default source. - static void Register(CycleClockSourceFunc source); -}; - -#if ABSL_USE_UNSCALED_CYCLECLOCK - -inline CycleClockSourceFunc CycleClock::LoadCycleClockSource() { -#if !defined(__x86_64__) - // Optimize for the common case (no callback) by first doing a relaxed load; - // this is significantly faster on non-x86 platforms. - if (cycle_clock_source_.load(std::memory_order_relaxed) == nullptr) { - return nullptr; - } -#endif // !defined(__x86_64__) - - // This corresponds to the store(std::memory_order_release) in - // CycleClockSource::Register, and makes sure that any updates made prior to - // registering the callback are visible to this thread before the callback - // is invoked. - return cycle_clock_source_.load(std::memory_order_acquire); -} - -// Accessing globals in inlined code in Window DLLs is problematic. -#ifndef _WIN32 -inline int64_t CycleClock::Now() { - auto fn = LoadCycleClockSource(); - if (fn == nullptr) { - return base_internal::UnscaledCycleClock::Now() >> kShift; - } - return fn() >> kShift; -} -#endif - -inline double CycleClock::Frequency() { - return kFrequencyScale * base_internal::UnscaledCycleClock::Frequency(); -} - -#endif // ABSL_USE_UNSCALED_CYCLECLOCK - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_CYCLECLOCK_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/direct_mmap.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/direct_mmap.h deleted file mode 100644 index e492bb0..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/direct_mmap.h +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Functions for directly invoking mmap() via syscall, avoiding the case where -// mmap() has been locally overridden. - -#ifndef ABSL_BASE_INTERNAL_DIRECT_MMAP_H_ -#define ABSL_BASE_INTERNAL_DIRECT_MMAP_H_ - -#include "absl/base/config.h" - -#ifdef ABSL_HAVE_MMAP - -#include - -#ifdef __linux__ - -#include -#ifdef __BIONIC__ -#include -#else -#include -#endif - -#include -#include -#include -#include -#include - -#ifdef __mips__ -// Include definitions of the ABI currently in use. -#if defined(__BIONIC__) || !defined(__GLIBC__) -// Android doesn't have sgidefs.h, but does have asm/sgidefs.h, which has the -// definitions we need. -#include -#else -#include -#endif // __BIONIC__ || !__GLIBC__ -#endif // __mips__ - -// SYS_mmap and SYS_munmap are not defined in Android. -#ifdef __BIONIC__ -extern "C" void* __mmap2(void*, size_t, int, int, int, size_t); -#if defined(__NR_mmap) && !defined(SYS_mmap) -#define SYS_mmap __NR_mmap -#endif -#ifndef SYS_munmap -#define SYS_munmap __NR_munmap -#endif -#endif // __BIONIC__ - -#if defined(__NR_mmap2) && !defined(SYS_mmap2) -#define SYS_mmap2 __NR_mmap2 -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// Platform specific logic extracted from -// https://chromium.googlesource.com/linux-syscall-support/+/master/linux_syscall_support.h -inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, - off64_t offset) noexcept { -#if defined(__i386__) || defined(__ARM_ARCH_3__) || defined(__ARM_EABI__) || \ - defined(__m68k__) || defined(__sh__) || \ - (defined(__hppa__) && !defined(__LP64__)) || \ - (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || \ - (defined(__PPC__) && !defined(__PPC64__)) || \ - (defined(__riscv) && __riscv_xlen == 32) || \ - (defined(__s390__) && !defined(__s390x__)) || \ - (defined(__sparc__) && !defined(__arch64__)) - // On these architectures, implement mmap with mmap2. - static int pagesize = 0; - if (pagesize == 0) { -#if defined(__wasm__) || defined(__asmjs__) - pagesize = getpagesize(); -#else - pagesize = sysconf(_SC_PAGESIZE); -#endif - } - if (offset < 0 || offset % pagesize != 0) { - errno = EINVAL; - return MAP_FAILED; - } -#ifdef __BIONIC__ - // SYS_mmap2 has problems on Android API level <= 16. - // Workaround by invoking __mmap2() instead. - return __mmap2(start, length, prot, flags, fd, offset / pagesize); -#else - return reinterpret_cast( - syscall(SYS_mmap2, start, length, prot, flags, fd, - static_cast(offset / pagesize))); -#endif -#elif defined(__s390x__) - // On s390x, mmap() arguments are passed in memory. - unsigned long buf[6] = {reinterpret_cast(start), // NOLINT - static_cast(length), // NOLINT - static_cast(prot), // NOLINT - static_cast(flags), // NOLINT - static_cast(fd), // NOLINT - static_cast(offset)}; // NOLINT - return reinterpret_cast(syscall(SYS_mmap, buf)); -#elif defined(__x86_64__) -// The x32 ABI has 32 bit longs, but the syscall interface is 64 bit. -// We need to explicitly cast to an unsigned 64 bit type to avoid implicit -// sign extension. We can't cast pointers directly because those are -// 32 bits, and gcc will dump ugly warnings about casting from a pointer -// to an integer of a different size. We also need to make sure __off64_t -// isn't truncated to 32-bits under x32. -#define MMAP_SYSCALL_ARG(x) ((uint64_t)(uintptr_t)(x)) - return reinterpret_cast( - syscall(SYS_mmap, MMAP_SYSCALL_ARG(start), MMAP_SYSCALL_ARG(length), - MMAP_SYSCALL_ARG(prot), MMAP_SYSCALL_ARG(flags), - MMAP_SYSCALL_ARG(fd), static_cast(offset))); -#undef MMAP_SYSCALL_ARG -#else // Remaining 64-bit aritectures. - static_assert(sizeof(unsigned long) == 8, "Platform is not 64-bit"); - return reinterpret_cast( - syscall(SYS_mmap, start, length, prot, flags, fd, offset)); -#endif -} - -inline int DirectMunmap(void* start, size_t length) { - return static_cast(syscall(SYS_munmap, start, length)); -} - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#else // !__linux__ - -// For non-linux platforms where we have mmap, just dispatch directly to the -// actual mmap()/munmap() methods. - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd, - off_t offset) { - return mmap(start, length, prot, flags, fd, offset); -} - -inline int DirectMunmap(void* start, size_t length) { - return munmap(start, length); -} - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // __linux__ - -#endif // ABSL_HAVE_MMAP - -#endif // ABSL_BASE_INTERNAL_DIRECT_MMAP_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/dynamic_annotations.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/dynamic_annotations.h deleted file mode 100644 index b23c5ec..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/dynamic_annotations.h +++ /dev/null @@ -1,398 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file defines dynamic annotations for use with dynamic analysis tool -// such as valgrind, PIN, etc. -// -// Dynamic annotation is a source code annotation that affects the generated -// code (that is, the annotation is not a comment). Each such annotation is -// attached to a particular instruction and/or to a particular object (address) -// in the program. -// -// The annotations that should be used by users are macros in all upper-case -// (e.g., ANNOTATE_THREAD_NAME). -// -// Actual implementation of these macros may differ depending on the dynamic -// analysis tool being used. -// -// This file supports the following configurations: -// - Dynamic Annotations enabled (with static thread-safety warnings disabled). -// In this case, macros expand to functions implemented by Thread Sanitizer, -// when building with TSan. When not provided an external implementation, -// dynamic_annotations.cc provides no-op implementations. -// -// - Static Clang thread-safety warnings enabled. -// When building with a Clang compiler that supports thread-safety warnings, -// a subset of annotations can be statically-checked at compile-time. We -// expand these macros to static-inline functions that can be analyzed for -// thread-safety, but afterwards elided when building the final binary. -// -// - All annotations are disabled. -// If neither Dynamic Annotations nor Clang thread-safety warnings are -// enabled, then all annotation-macros expand to empty. - -#ifndef ABSL_BASE_INTERNAL_DYNAMIC_ANNOTATIONS_H_ -#define ABSL_BASE_INTERNAL_DYNAMIC_ANNOTATIONS_H_ - -#include - -#include "absl/base/config.h" - -// ------------------------------------------------------------------------- -// Decide which features are enabled - -#ifndef DYNAMIC_ANNOTATIONS_ENABLED -#define DYNAMIC_ANNOTATIONS_ENABLED 0 -#endif - -#if defined(__clang__) && !defined(SWIG) -#define ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED 1 -#endif - -#if DYNAMIC_ANNOTATIONS_ENABLED != 0 - -#define ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED 1 -#define ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED 1 -#define ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED 1 -#define ABSL_INTERNAL_ANNOTALYSIS_ENABLED 0 -#define ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED 1 - -#else - -#define ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED 0 -#define ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED 0 -#define ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED 0 - -// Clang provides limited support for static thread-safety analysis through a -// feature called Annotalysis. We configure macro-definitions according to -// whether Annotalysis support is available. When running in opt-mode, GCC -// will issue a warning, if these attributes are compiled. Only include them -// when compiling using Clang. - -// ANNOTALYSIS_ENABLED == 1 when IGNORE_READ_ATTRIBUTE_ENABLED == 1 -#define ABSL_INTERNAL_ANNOTALYSIS_ENABLED \ - defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED) -// Read/write annotations are enabled in Annotalysis mode; disabled otherwise. -#define ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED \ - ABSL_INTERNAL_ANNOTALYSIS_ENABLED -#endif - -// Memory annotations are also made available to LLVM's Memory Sanitizer -#if defined(ABSL_HAVE_MEMORY_SANITIZER) && !defined(__native_client__) -#define ABSL_INTERNAL_MEMORY_ANNOTATIONS_ENABLED 1 -#endif - -#ifndef ABSL_INTERNAL_MEMORY_ANNOTATIONS_ENABLED -#define ABSL_INTERNAL_MEMORY_ANNOTATIONS_ENABLED 0 -#endif - -#ifdef __cplusplus -#define ABSL_INTERNAL_BEGIN_EXTERN_C extern "C" { -#define ABSL_INTERNAL_END_EXTERN_C } // extern "C" -#define ABSL_INTERNAL_GLOBAL_SCOPED(F) ::F -#define ABSL_INTERNAL_STATIC_INLINE inline -#else -#define ABSL_INTERNAL_BEGIN_EXTERN_C // empty -#define ABSL_INTERNAL_END_EXTERN_C // empty -#define ABSL_INTERNAL_GLOBAL_SCOPED(F) F -#define ABSL_INTERNAL_STATIC_INLINE static inline -#endif - -// ------------------------------------------------------------------------- -// Define race annotations. - -#if ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED == 1 - -// ------------------------------------------------------------- -// Annotations that suppress errors. It is usually better to express the -// program's synchronization using the other annotations, but these can be used -// when all else fails. - -// Report that we may have a benign race at `pointer`, with size -// "sizeof(*(pointer))". `pointer` must be a non-void* pointer. Insert at the -// point where `pointer` has been allocated, preferably close to the point -// where the race happens. See also ANNOTATE_BENIGN_RACE_STATIC. -#define ANNOTATE_BENIGN_RACE(pointer, description) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateBenignRaceSized) \ - (__FILE__, __LINE__, pointer, sizeof(*(pointer)), description) - -// Same as ANNOTATE_BENIGN_RACE(`address`, `description`), but applies to -// the memory range [`address`, `address`+`size`). -#define ANNOTATE_BENIGN_RACE_SIZED(address, size, description) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateBenignRaceSized) \ - (__FILE__, __LINE__, address, size, description) - -// Enable (`enable`!=0) or disable (`enable`==0) race detection for all threads. -// This annotation could be useful if you want to skip expensive race analysis -// during some period of program execution, e.g. during initialization. -#define ANNOTATE_ENABLE_RACE_DETECTION(enable) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateEnableRaceDetection) \ - (__FILE__, __LINE__, enable) - -// ------------------------------------------------------------- -// Annotations useful for debugging. - -// Report the current thread `name` to a race detector. -#define ANNOTATE_THREAD_NAME(name) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateThreadName)(__FILE__, __LINE__, name) - -// ------------------------------------------------------------- -// Annotations useful when implementing locks. They are not normally needed by -// modules that merely use locks. The `lock` argument is a pointer to the lock -// object. - -// Report that a lock has been created at address `lock`. -#define ANNOTATE_RWLOCK_CREATE(lock) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockCreate)(__FILE__, __LINE__, lock) - -// Report that a linker initialized lock has been created at address `lock`. -#ifdef ABSL_HAVE_THREAD_SANITIZER -#define ANNOTATE_RWLOCK_CREATE_STATIC(lock) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockCreateStatic) \ - (__FILE__, __LINE__, lock) -#else -#define ANNOTATE_RWLOCK_CREATE_STATIC(lock) ANNOTATE_RWLOCK_CREATE(lock) -#endif - -// Report that the lock at address `lock` is about to be destroyed. -#define ANNOTATE_RWLOCK_DESTROY(lock) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockDestroy)(__FILE__, __LINE__, lock) - -// Report that the lock at address `lock` has been acquired. -// `is_w`=1 for writer lock, `is_w`=0 for reader lock. -#define ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockAcquired) \ - (__FILE__, __LINE__, lock, is_w) - -// Report that the lock at address `lock` is about to be released. -// `is_w`=1 for writer lock, `is_w`=0 for reader lock. -#define ANNOTATE_RWLOCK_RELEASED(lock, is_w) \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateRWLockReleased) \ - (__FILE__, __LINE__, lock, is_w) - -// Apply ANNOTATE_BENIGN_RACE_SIZED to a static variable `static_var`. -#define ANNOTATE_BENIGN_RACE_STATIC(static_var, description) \ - namespace { \ - class static_var##_annotator { \ - public: \ - static_var##_annotator() { \ - ANNOTATE_BENIGN_RACE_SIZED(&static_var, sizeof(static_var), \ - #static_var ": " description); \ - } \ - }; \ - static static_var##_annotator the##static_var##_annotator; \ - } // namespace - -#else // ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED == 0 - -#define ANNOTATE_RWLOCK_CREATE(lock) // empty -#define ANNOTATE_RWLOCK_CREATE_STATIC(lock) // empty -#define ANNOTATE_RWLOCK_DESTROY(lock) // empty -#define ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) // empty -#define ANNOTATE_RWLOCK_RELEASED(lock, is_w) // empty -#define ANNOTATE_BENIGN_RACE(address, description) // empty -#define ANNOTATE_BENIGN_RACE_SIZED(address, size, description) // empty -#define ANNOTATE_THREAD_NAME(name) // empty -#define ANNOTATE_ENABLE_RACE_DETECTION(enable) // empty -#define ANNOTATE_BENIGN_RACE_STATIC(static_var, description) // empty - -#endif // ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED - -// ------------------------------------------------------------------------- -// Define memory annotations. - -#if ABSL_INTERNAL_MEMORY_ANNOTATIONS_ENABLED == 1 - -#include - -#define ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \ - __msan_unpoison(address, size) - -#define ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) \ - __msan_allocated_memory(address, size) - -#else // ABSL_INTERNAL_MEMORY_ANNOTATIONS_ENABLED == 0 - -#if DYNAMIC_ANNOTATIONS_ENABLED == 1 -#define ANNOTATE_MEMORY_IS_INITIALIZED(address, size) \ - do { \ - (void)(address); \ - (void)(size); \ - } while (0) -#define ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) \ - do { \ - (void)(address); \ - (void)(size); \ - } while (0) -#else -#define ANNOTATE_MEMORY_IS_INITIALIZED(address, size) // empty -#define ANNOTATE_MEMORY_IS_UNINITIALIZED(address, size) // empty -#endif - -#endif // ABSL_INTERNAL_MEMORY_ANNOTATIONS_ENABLED - -// ------------------------------------------------------------------------- -// Define IGNORE_READS_BEGIN/_END attributes. - -#if defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED) - -#define ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE \ - __attribute((exclusive_lock_function("*"))) -#define ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE \ - __attribute((unlock_function("*"))) - -#else // !defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED) - -#define ABSL_INTERNAL_IGNORE_READS_BEGIN_ATTRIBUTE // empty -#define ABSL_INTERNAL_IGNORE_READS_END_ATTRIBUTE // empty - -#endif // defined(ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED) - -// ------------------------------------------------------------------------- -// Define IGNORE_READS_BEGIN/_END annotations. - -#if ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED == 1 - -// Request the analysis tool to ignore all reads in the current thread until -// ANNOTATE_IGNORE_READS_END is called. Useful to ignore intentional racey -// reads, while still checking other reads and all writes. -// See also ANNOTATE_UNPROTECTED_READ. -#define ANNOTATE_IGNORE_READS_BEGIN() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreReadsBegin)(__FILE__, __LINE__) - -// Stop ignoring reads. -#define ANNOTATE_IGNORE_READS_END() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreReadsEnd)(__FILE__, __LINE__) - -#elif defined(ABSL_INTERNAL_ANNOTALYSIS_ENABLED) - -// When Annotalysis is enabled without Dynamic Annotations, the use of -// static-inline functions allows the annotations to be read at compile-time, -// while still letting the compiler elide the functions from the final build. -// -// TODO(delesley) -- The exclusive lock here ignores writes as well, but -// allows IGNORE_READS_AND_WRITES to work properly. - -#define ANNOTATE_IGNORE_READS_BEGIN() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AbslInternalAnnotateIgnoreReadsBegin)() - -#define ANNOTATE_IGNORE_READS_END() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AbslInternalAnnotateIgnoreReadsEnd)() - -#else - -#define ANNOTATE_IGNORE_READS_BEGIN() // empty -#define ANNOTATE_IGNORE_READS_END() // empty - -#endif - -// ------------------------------------------------------------------------- -// Define IGNORE_WRITES_BEGIN/_END annotations. - -#if ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED == 1 - -// Similar to ANNOTATE_IGNORE_READS_BEGIN, but ignore writes instead. -#define ANNOTATE_IGNORE_WRITES_BEGIN() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreWritesBegin)(__FILE__, __LINE__) - -// Stop ignoring writes. -#define ANNOTATE_IGNORE_WRITES_END() \ - ABSL_INTERNAL_GLOBAL_SCOPED(AnnotateIgnoreWritesEnd)(__FILE__, __LINE__) - -#else - -#define ANNOTATE_IGNORE_WRITES_BEGIN() // empty -#define ANNOTATE_IGNORE_WRITES_END() // empty - -#endif - -// ------------------------------------------------------------------------- -// Define the ANNOTATE_IGNORE_READS_AND_WRITES_* annotations using the more -// primitive annotations defined above. -// -// Instead of doing -// ANNOTATE_IGNORE_READS_BEGIN(); -// ... = x; -// ANNOTATE_IGNORE_READS_END(); -// one can use -// ... = ANNOTATE_UNPROTECTED_READ(x); - -#if defined(ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED) - -// Start ignoring all memory accesses (both reads and writes). -#define ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() \ - do { \ - ANNOTATE_IGNORE_READS_BEGIN(); \ - ANNOTATE_IGNORE_WRITES_BEGIN(); \ - } while (0) - -// Stop ignoring both reads and writes. -#define ANNOTATE_IGNORE_READS_AND_WRITES_END() \ - do { \ - ANNOTATE_IGNORE_WRITES_END(); \ - ANNOTATE_IGNORE_READS_END(); \ - } while (0) - -#ifdef __cplusplus -// ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads. -#define ANNOTATE_UNPROTECTED_READ(x) \ - absl::base_internal::AnnotateUnprotectedRead(x) - -#endif - -#else - -#define ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() // empty -#define ANNOTATE_IGNORE_READS_AND_WRITES_END() // empty -#define ANNOTATE_UNPROTECTED_READ(x) (x) - -#endif - -// ------------------------------------------------------------------------- -// Address sanitizer annotations - -#ifdef ABSL_HAVE_ADDRESS_SANITIZER -// Describe the current state of a contiguous container such as e.g. -// std::vector or std::string. For more details see -// sanitizer/common_interface_defs.h, which is provided by the compiler. -#include - -#define ANNOTATE_CONTIGUOUS_CONTAINER(beg, end, old_mid, new_mid) \ - __sanitizer_annotate_contiguous_container(beg, end, old_mid, new_mid) -#define ADDRESS_SANITIZER_REDZONE(name) \ - struct { \ - char x[8] __attribute__((aligned(8))); \ - } name - -#else - -#define ANNOTATE_CONTIGUOUS_CONTAINER(beg, end, old_mid, new_mid) -#define ADDRESS_SANITIZER_REDZONE(name) static_assert(true, "") - -#endif // ABSL_HAVE_ADDRESS_SANITIZER - -// ------------------------------------------------------------------------- -// Undefine the macros intended only for this file. - -#undef ABSL_INTERNAL_RACE_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_MEMORY_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_READS_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_WRITES_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_ANNOTALYSIS_ENABLED -#undef ABSL_INTERNAL_READS_WRITES_ANNOTATIONS_ENABLED -#undef ABSL_INTERNAL_BEGIN_EXTERN_C -#undef ABSL_INTERNAL_END_EXTERN_C -#undef ABSL_INTERNAL_STATIC_INLINE - -#endif // ABSL_BASE_INTERNAL_DYNAMIC_ANNOTATIONS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/endian.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/endian.h deleted file mode 100644 index 50747d7..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/endian.h +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef ABSL_BASE_INTERNAL_ENDIAN_H_ -#define ABSL_BASE_INTERNAL_ENDIAN_H_ - -#include -#include - -#include "absl/base/casts.h" -#include "absl/base/config.h" -#include "absl/base/internal/unaligned_access.h" -#include "absl/base/port.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -inline uint64_t gbswap_64(uint64_t host_int) { -#if ABSL_HAVE_BUILTIN(__builtin_bswap64) || defined(__GNUC__) - return __builtin_bswap64(host_int); -#elif defined(_MSC_VER) - return _byteswap_uint64(host_int); -#else - return (((host_int & uint64_t{0xFF}) << 56) | - ((host_int & uint64_t{0xFF00}) << 40) | - ((host_int & uint64_t{0xFF0000}) << 24) | - ((host_int & uint64_t{0xFF000000}) << 8) | - ((host_int & uint64_t{0xFF00000000}) >> 8) | - ((host_int & uint64_t{0xFF0000000000}) >> 24) | - ((host_int & uint64_t{0xFF000000000000}) >> 40) | - ((host_int & uint64_t{0xFF00000000000000}) >> 56)); -#endif -} - -inline uint32_t gbswap_32(uint32_t host_int) { -#if ABSL_HAVE_BUILTIN(__builtin_bswap32) || defined(__GNUC__) - return __builtin_bswap32(host_int); -#elif defined(_MSC_VER) - return _byteswap_ulong(host_int); -#else - return (((host_int & uint32_t{0xFF}) << 24) | - ((host_int & uint32_t{0xFF00}) << 8) | - ((host_int & uint32_t{0xFF0000}) >> 8) | - ((host_int & uint32_t{0xFF000000}) >> 24)); -#endif -} - -inline uint16_t gbswap_16(uint16_t host_int) { -#if ABSL_HAVE_BUILTIN(__builtin_bswap16) || defined(__GNUC__) - return __builtin_bswap16(host_int); -#elif defined(_MSC_VER) - return _byteswap_ushort(host_int); -#else - return (((host_int & uint16_t{0xFF}) << 8) | - ((host_int & uint16_t{0xFF00}) >> 8)); -#endif -} - -#ifdef ABSL_IS_LITTLE_ENDIAN - -// Portable definitions for htonl (host-to-network) and friends on little-endian -// architectures. -inline uint16_t ghtons(uint16_t x) { return gbswap_16(x); } -inline uint32_t ghtonl(uint32_t x) { return gbswap_32(x); } -inline uint64_t ghtonll(uint64_t x) { return gbswap_64(x); } - -#elif defined ABSL_IS_BIG_ENDIAN - -// Portable definitions for htonl (host-to-network) etc on big-endian -// architectures. These definitions are simpler since the host byte order is the -// same as network byte order. -inline uint16_t ghtons(uint16_t x) { return x; } -inline uint32_t ghtonl(uint32_t x) { return x; } -inline uint64_t ghtonll(uint64_t x) { return x; } - -#else -#error \ - "Unsupported byte order: Either ABSL_IS_BIG_ENDIAN or " \ - "ABSL_IS_LITTLE_ENDIAN must be defined" -#endif // byte order - -inline uint16_t gntohs(uint16_t x) { return ghtons(x); } -inline uint32_t gntohl(uint32_t x) { return ghtonl(x); } -inline uint64_t gntohll(uint64_t x) { return ghtonll(x); } - -// Utilities to convert numbers between the current hosts's native byte -// order and little-endian byte order -// -// Load/Store methods are alignment safe -namespace little_endian { -// Conversion functions. -#ifdef ABSL_IS_LITTLE_ENDIAN - -inline uint16_t FromHost16(uint16_t x) { return x; } -inline uint16_t ToHost16(uint16_t x) { return x; } - -inline uint32_t FromHost32(uint32_t x) { return x; } -inline uint32_t ToHost32(uint32_t x) { return x; } - -inline uint64_t FromHost64(uint64_t x) { return x; } -inline uint64_t ToHost64(uint64_t x) { return x; } - -inline constexpr bool IsLittleEndian() { return true; } - -#elif defined ABSL_IS_BIG_ENDIAN - -inline uint16_t FromHost16(uint16_t x) { return gbswap_16(x); } -inline uint16_t ToHost16(uint16_t x) { return gbswap_16(x); } - -inline uint32_t FromHost32(uint32_t x) { return gbswap_32(x); } -inline uint32_t ToHost32(uint32_t x) { return gbswap_32(x); } - -inline uint64_t FromHost64(uint64_t x) { return gbswap_64(x); } -inline uint64_t ToHost64(uint64_t x) { return gbswap_64(x); } - -inline constexpr bool IsLittleEndian() { return false; } - -#endif /* ENDIAN */ - -inline uint8_t FromHost(uint8_t x) { return x; } -inline uint16_t FromHost(uint16_t x) { return FromHost16(x); } -inline uint32_t FromHost(uint32_t x) { return FromHost32(x); } -inline uint64_t FromHost(uint64_t x) { return FromHost64(x); } -inline uint8_t ToHost(uint8_t x) { return x; } -inline uint16_t ToHost(uint16_t x) { return ToHost16(x); } -inline uint32_t ToHost(uint32_t x) { return ToHost32(x); } -inline uint64_t ToHost(uint64_t x) { return ToHost64(x); } - -inline int8_t FromHost(int8_t x) { return x; } -inline int16_t FromHost(int16_t x) { - return bit_cast(FromHost16(bit_cast(x))); -} -inline int32_t FromHost(int32_t x) { - return bit_cast(FromHost32(bit_cast(x))); -} -inline int64_t FromHost(int64_t x) { - return bit_cast(FromHost64(bit_cast(x))); -} -inline int8_t ToHost(int8_t x) { return x; } -inline int16_t ToHost(int16_t x) { - return bit_cast(ToHost16(bit_cast(x))); -} -inline int32_t ToHost(int32_t x) { - return bit_cast(ToHost32(bit_cast(x))); -} -inline int64_t ToHost(int64_t x) { - return bit_cast(ToHost64(bit_cast(x))); -} - -// Functions to do unaligned loads and stores in little-endian order. -inline uint16_t Load16(const void *p) { - return ToHost16(ABSL_INTERNAL_UNALIGNED_LOAD16(p)); -} - -inline void Store16(void *p, uint16_t v) { - ABSL_INTERNAL_UNALIGNED_STORE16(p, FromHost16(v)); -} - -inline uint32_t Load32(const void *p) { - return ToHost32(ABSL_INTERNAL_UNALIGNED_LOAD32(p)); -} - -inline void Store32(void *p, uint32_t v) { - ABSL_INTERNAL_UNALIGNED_STORE32(p, FromHost32(v)); -} - -inline uint64_t Load64(const void *p) { - return ToHost64(ABSL_INTERNAL_UNALIGNED_LOAD64(p)); -} - -inline void Store64(void *p, uint64_t v) { - ABSL_INTERNAL_UNALIGNED_STORE64(p, FromHost64(v)); -} - -} // namespace little_endian - -// Utilities to convert numbers between the current hosts's native byte -// order and big-endian byte order (same as network byte order) -// -// Load/Store methods are alignment safe -namespace big_endian { -#ifdef ABSL_IS_LITTLE_ENDIAN - -inline uint16_t FromHost16(uint16_t x) { return gbswap_16(x); } -inline uint16_t ToHost16(uint16_t x) { return gbswap_16(x); } - -inline uint32_t FromHost32(uint32_t x) { return gbswap_32(x); } -inline uint32_t ToHost32(uint32_t x) { return gbswap_32(x); } - -inline uint64_t FromHost64(uint64_t x) { return gbswap_64(x); } -inline uint64_t ToHost64(uint64_t x) { return gbswap_64(x); } - -inline constexpr bool IsLittleEndian() { return true; } - -#elif defined ABSL_IS_BIG_ENDIAN - -inline uint16_t FromHost16(uint16_t x) { return x; } -inline uint16_t ToHost16(uint16_t x) { return x; } - -inline uint32_t FromHost32(uint32_t x) { return x; } -inline uint32_t ToHost32(uint32_t x) { return x; } - -inline uint64_t FromHost64(uint64_t x) { return x; } -inline uint64_t ToHost64(uint64_t x) { return x; } - -inline constexpr bool IsLittleEndian() { return false; } - -#endif /* ENDIAN */ - -inline uint8_t FromHost(uint8_t x) { return x; } -inline uint16_t FromHost(uint16_t x) { return FromHost16(x); } -inline uint32_t FromHost(uint32_t x) { return FromHost32(x); } -inline uint64_t FromHost(uint64_t x) { return FromHost64(x); } -inline uint8_t ToHost(uint8_t x) { return x; } -inline uint16_t ToHost(uint16_t x) { return ToHost16(x); } -inline uint32_t ToHost(uint32_t x) { return ToHost32(x); } -inline uint64_t ToHost(uint64_t x) { return ToHost64(x); } - -inline int8_t FromHost(int8_t x) { return x; } -inline int16_t FromHost(int16_t x) { - return bit_cast(FromHost16(bit_cast(x))); -} -inline int32_t FromHost(int32_t x) { - return bit_cast(FromHost32(bit_cast(x))); -} -inline int64_t FromHost(int64_t x) { - return bit_cast(FromHost64(bit_cast(x))); -} -inline int8_t ToHost(int8_t x) { return x; } -inline int16_t ToHost(int16_t x) { - return bit_cast(ToHost16(bit_cast(x))); -} -inline int32_t ToHost(int32_t x) { - return bit_cast(ToHost32(bit_cast(x))); -} -inline int64_t ToHost(int64_t x) { - return bit_cast(ToHost64(bit_cast(x))); -} - -// Functions to do unaligned loads and stores in big-endian order. -inline uint16_t Load16(const void *p) { - return ToHost16(ABSL_INTERNAL_UNALIGNED_LOAD16(p)); -} - -inline void Store16(void *p, uint16_t v) { - ABSL_INTERNAL_UNALIGNED_STORE16(p, FromHost16(v)); -} - -inline uint32_t Load32(const void *p) { - return ToHost32(ABSL_INTERNAL_UNALIGNED_LOAD32(p)); -} - -inline void Store32(void *p, uint32_t v) { - ABSL_INTERNAL_UNALIGNED_STORE32(p, FromHost32(v)); -} - -inline uint64_t Load64(const void *p) { - return ToHost64(ABSL_INTERNAL_UNALIGNED_LOAD64(p)); -} - -inline void Store64(void *p, uint64_t v) { - ABSL_INTERNAL_UNALIGNED_STORE64(p, FromHost64(v)); -} - -} // namespace big_endian - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_ENDIAN_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/errno_saver.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/errno_saver.h deleted file mode 100644 index 251de51..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/errno_saver.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_ERRNO_SAVER_H_ -#define ABSL_BASE_INTERNAL_ERRNO_SAVER_H_ - -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// `ErrnoSaver` captures the value of `errno` upon construction and restores it -// upon deletion. It is used in low-level code and must be super fast. Do not -// add instrumentation, even in debug modes. -class ErrnoSaver { - public: - ErrnoSaver() : saved_errno_(errno) {} - ~ErrnoSaver() { errno = saved_errno_; } - int operator()() const { return saved_errno_; } - - private: - const int saved_errno_; -}; - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_ERRNO_SAVER_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/fast_type_id.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/fast_type_id.h deleted file mode 100644 index a547b3a..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/fast_type_id.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2020 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef ABSL_BASE_INTERNAL_FAST_TYPE_ID_H_ -#define ABSL_BASE_INTERNAL_FAST_TYPE_ID_H_ - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -template -struct FastTypeTag { - constexpr static char dummy_var = 0; -}; - -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -template -constexpr char FastTypeTag::dummy_var; -#endif - -// FastTypeId() evaluates at compile/link-time to a unique pointer for the -// passed-in type. These are meant to be good match for keys into maps or -// straight up comparisons. -using FastTypeIdType = const void*; - -template -constexpr inline FastTypeIdType FastTypeId() { - return &FastTypeTag::dummy_var; -} - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_FAST_TYPE_ID_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/hide_ptr.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/hide_ptr.h deleted file mode 100644 index 1dba809..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/hide_ptr.h +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_HIDE_PTR_H_ -#define ABSL_BASE_INTERNAL_HIDE_PTR_H_ - -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// Arbitrary value with high bits set. Xor'ing with it is unlikely -// to map one valid pointer to another valid pointer. -constexpr uintptr_t HideMask() { - return (uintptr_t{0xF03A5F7BU} << (sizeof(uintptr_t) - 4) * 8) | 0xF03A5F7BU; -} - -// Hide a pointer from the leak checker. For internal use only. -// Differs from absl::IgnoreLeak(ptr) in that absl::IgnoreLeak(ptr) causes ptr -// and all objects reachable from ptr to be ignored by the leak checker. -template -inline uintptr_t HidePtr(T* ptr) { - return reinterpret_cast(ptr) ^ HideMask(); -} - -// Return a pointer that has been hidden from the leak checker. -// For internal use only. -template -inline T* UnhidePtr(uintptr_t hidden) { - return reinterpret_cast(hidden ^ HideMask()); -} - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_HIDE_PTR_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/identity.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/identity.h deleted file mode 100644 index a3154ed..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/identity.h +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef ABSL_BASE_INTERNAL_IDENTITY_H_ -#define ABSL_BASE_INTERNAL_IDENTITY_H_ - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace internal { - -template -struct identity { - typedef T type; -}; - -template -using identity_t = typename identity::type; - -} // namespace internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_IDENTITY_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/inline_variable.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/inline_variable.h deleted file mode 100644 index 130d8c2..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/inline_variable.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_INLINE_VARIABLE_EMULATION_H_ -#define ABSL_BASE_INTERNAL_INLINE_VARIABLE_EMULATION_H_ - -#include - -#include "absl/base/internal/identity.h" - -// File: -// This file define a macro that allows the creation of or emulation of C++17 -// inline variables based on whether or not the feature is supported. - -//////////////////////////////////////////////////////////////////////////////// -// Macro: ABSL_INTERNAL_INLINE_CONSTEXPR(type, name, init) -// -// Description: -// Expands to the equivalent of an inline constexpr instance of the specified -// `type` and `name`, initialized to the value `init`. If the compiler being -// used is detected as supporting actual inline variables as a language -// feature, then the macro expands to an actual inline variable definition. -// -// Requires: -// `type` is a type that is usable in an extern variable declaration. -// -// Requires: `name` is a valid identifier -// -// Requires: -// `init` is an expression that can be used in the following definition: -// constexpr type name = init; -// -// Usage: -// -// // Equivalent to: `inline constexpr size_t variant_npos = -1;` -// ABSL_INTERNAL_INLINE_CONSTEXPR(size_t, variant_npos, -1); -// -// Differences in implementation: -// For a direct, language-level inline variable, decltype(name) will be the -// type that was specified along with const qualification, whereas for -// emulated inline variables, decltype(name) may be different (in practice -// it will likely be a reference type). -//////////////////////////////////////////////////////////////////////////////// - -#ifdef __cpp_inline_variables - -// Clang's -Wmissing-variable-declarations option erroneously warned that -// inline constexpr objects need to be pre-declared. This has now been fixed, -// but we will need to support this workaround for people building with older -// versions of clang. -// -// Bug: https://bugs.llvm.org/show_bug.cgi?id=35862 -// -// Note: -// identity_t is used here so that the const and name are in the -// appropriate place for pointer types, reference types, function pointer -// types, etc.. -#if defined(__clang__) -#define ABSL_INTERNAL_EXTERN_DECL(type, name) \ - extern const ::absl::internal::identity_t name; -#else // Otherwise, just define the macro to do nothing. -#define ABSL_INTERNAL_EXTERN_DECL(type, name) -#endif // defined(__clang__) - -// See above comment at top of file for details. -#define ABSL_INTERNAL_INLINE_CONSTEXPR(type, name, init) \ - ABSL_INTERNAL_EXTERN_DECL(type, name) \ - inline constexpr ::absl::internal::identity_t name = init - -#else - -// See above comment at top of file for details. -// -// Note: -// identity_t is used here so that the const and name are in the -// appropriate place for pointer types, reference types, function pointer -// types, etc.. -#define ABSL_INTERNAL_INLINE_CONSTEXPR(var_type, name, init) \ - template \ - struct AbslInternalInlineVariableHolder##name { \ - static constexpr ::absl::internal::identity_t kInstance = init; \ - }; \ - \ - template \ - constexpr ::absl::internal::identity_t \ - AbslInternalInlineVariableHolder##name::kInstance; \ - \ - static constexpr const ::absl::internal::identity_t& \ - name = /* NOLINT */ \ - AbslInternalInlineVariableHolder##name<>::kInstance; \ - static_assert(sizeof(void (*)(decltype(name))) != 0, \ - "Silence unused variable warnings.") - -#endif // __cpp_inline_variables - -#endif // ABSL_BASE_INTERNAL_INLINE_VARIABLE_EMULATION_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/invoke.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/invoke.h deleted file mode 100644 index 643c2a4..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/invoke.h +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// absl::base_internal::invoke(f, args...) is an implementation of -// INVOKE(f, args...) from section [func.require] of the C++ standard. -// When compiled as C++17 and later versions, it is implemented as an alias of -// std::invoke. -// -// [func.require] -// Define INVOKE (f, t1, t2, ..., tN) as follows: -// 1. (t1.*f)(t2, ..., tN) when f is a pointer to a member function of a class T -// and t1 is an object of type T or a reference to an object of type T or a -// reference to an object of a type derived from T; -// 2. ((*t1).*f)(t2, ..., tN) when f is a pointer to a member function of a -// class T and t1 is not one of the types described in the previous item; -// 3. t1.*f when N == 1 and f is a pointer to member data of a class T and t1 is -// an object of type T or a reference to an object of type T or a reference -// to an object of a type derived from T; -// 4. (*t1).*f when N == 1 and f is a pointer to member data of a class T and t1 -// is not one of the types described in the previous item; -// 5. f(t1, t2, ..., tN) in all other cases. -// -// The implementation is SFINAE-friendly: substitution failure within invoke() -// isn't an error. - -#ifndef ABSL_BASE_INTERNAL_INVOKE_H_ -#define ABSL_BASE_INTERNAL_INVOKE_H_ - -#include "absl/base/config.h" - -#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L - -#include - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -using std::invoke; -using std::invoke_result_t; -using std::is_invocable_r; - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#else // ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L - -#include -#include -#include - -#include "absl/meta/type_traits.h" - -// The following code is internal implementation detail. See the comment at the -// top of this file for the API documentation. - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// The five classes below each implement one of the clauses from the definition -// of INVOKE. The inner class template Accept checks whether the -// clause is applicable; static function template Invoke(f, args...) does the -// invocation. -// -// By separating the clause selection logic from invocation we make sure that -// Invoke() does exactly what the standard says. - -template -struct StrippedAccept { - template - struct Accept : Derived::template AcceptImpl::type>::type...> {}; -}; - -// (t1.*f)(t2, ..., tN) when f is a pointer to a member function of a class T -// and t1 is an object of type T or a reference to an object of type T or a -// reference to an object of a type derived from T. -struct MemFunAndRef : StrippedAccept { - template - struct AcceptImpl : std::false_type {}; - - template - struct AcceptImpl - : std::integral_constant::value && - absl::is_function::value> { - }; - - template - static decltype((std::declval().* - std::declval())(std::declval()...)) - Invoke(MemFun&& mem_fun, Obj&& obj, Args&&... args) { -// Ignore bogus GCC warnings on this line. -// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101436 for similar example. -#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(11, 0) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Warray-bounds" -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif - return (std::forward(obj).* - std::forward(mem_fun))(std::forward(args)...); -#if ABSL_INTERNAL_HAVE_MIN_GNUC_VERSION(11, 0) -#pragma GCC diagnostic pop -#endif - } -}; - -// ((*t1).*f)(t2, ..., tN) when f is a pointer to a member function of a -// class T and t1 is not one of the types described in the previous item. -struct MemFunAndPtr : StrippedAccept { - template - struct AcceptImpl : std::false_type {}; - - template - struct AcceptImpl - : std::integral_constant::value && - absl::is_function::value> { - }; - - template - static decltype(((*std::declval()).* - std::declval())(std::declval()...)) - Invoke(MemFun&& mem_fun, Ptr&& ptr, Args&&... args) { - return ((*std::forward(ptr)).* - std::forward(mem_fun))(std::forward(args)...); - } -}; - -// t1.*f when N == 1 and f is a pointer to member data of a class T and t1 is -// an object of type T or a reference to an object of type T or a reference -// to an object of a type derived from T. -struct DataMemAndRef : StrippedAccept { - template - struct AcceptImpl : std::false_type {}; - - template - struct AcceptImpl - : std::integral_constant::value && - !absl::is_function::value> {}; - - template - static decltype(std::declval().*std::declval()) Invoke( - DataMem&& data_mem, Ref&& ref) { - return std::forward(ref).*std::forward(data_mem); - } -}; - -// (*t1).*f when N == 1 and f is a pointer to member data of a class T and t1 -// is not one of the types described in the previous item. -struct DataMemAndPtr : StrippedAccept { - template - struct AcceptImpl : std::false_type {}; - - template - struct AcceptImpl - : std::integral_constant::value && - !absl::is_function::value> {}; - - template - static decltype((*std::declval()).*std::declval()) Invoke( - DataMem&& data_mem, Ptr&& ptr) { - return (*std::forward(ptr)).*std::forward(data_mem); - } -}; - -// f(t1, t2, ..., tN) in all other cases. -struct Callable { - // Callable doesn't have Accept because it's the last clause that gets picked - // when none of the previous clauses are applicable. - template - static decltype(std::declval()(std::declval()...)) Invoke( - F&& f, Args&&... args) { - return std::forward(f)(std::forward(args)...); - } -}; - -// Resolves to the first matching clause. -template -struct Invoker { - typedef typename std::conditional< - MemFunAndRef::Accept::value, MemFunAndRef, - typename std::conditional< - MemFunAndPtr::Accept::value, MemFunAndPtr, - typename std::conditional< - DataMemAndRef::Accept::value, DataMemAndRef, - typename std::conditional::value, - DataMemAndPtr, Callable>::type>::type>:: - type>::type type; -}; - -// The result type of Invoke. -template -using invoke_result_t = decltype(Invoker::type::Invoke( - std::declval(), std::declval()...)); - -// Invoke(f, args...) is an implementation of INVOKE(f, args...) from section -// [func.require] of the C++ standard. -template -invoke_result_t invoke(F&& f, Args&&... args) { - return Invoker::type::Invoke(std::forward(f), - std::forward(args)...); -} - -template -struct IsInvocableRImpl : std::false_type {}; - -template -struct IsInvocableRImpl< - absl::void_t >, R, F, - Args...> - : std::integral_constant< - bool, - std::is_convertible, - R>::value || - std::is_void::value> {}; - -// Type trait whose member `value` is true if invoking `F` with `Args` is valid, -// and either the return type is convertible to `R`, or `R` is void. -// C++11-compatible version of `std::is_invocable_r`. -template -using is_invocable_r = IsInvocableRImpl; - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L - -#endif // ABSL_BASE_INTERNAL_INVOKE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/low_level_alloc.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/low_level_alloc.h deleted file mode 100644 index db91951..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/low_level_alloc.h +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef ABSL_BASE_INTERNAL_LOW_LEVEL_ALLOC_H_ -#define ABSL_BASE_INTERNAL_LOW_LEVEL_ALLOC_H_ - -// A simple thread-safe memory allocator that does not depend on -// mutexes or thread-specific data. It is intended to be used -// sparingly, and only when malloc() would introduce an unwanted -// dependency, such as inside the heap-checker, or the Mutex -// implementation. - -// IWYU pragma: private, include "base/low_level_alloc.h" - -#include - -#include - -#include "absl/base/attributes.h" -#include "absl/base/config.h" - -// LowLevelAlloc requires that the platform support low-level -// allocation of virtual memory. Platforms lacking this cannot use -// LowLevelAlloc. -#ifdef ABSL_LOW_LEVEL_ALLOC_MISSING -#error ABSL_LOW_LEVEL_ALLOC_MISSING cannot be directly set -#elif !defined(ABSL_HAVE_MMAP) && !defined(_WIN32) -#define ABSL_LOW_LEVEL_ALLOC_MISSING 1 -#endif - -// Using LowLevelAlloc with kAsyncSignalSafe isn't supported on Windows or -// asm.js / WebAssembly. -// See https://kripken.github.io/emscripten-site/docs/porting/pthreads.html -// for more information. -#ifdef ABSL_LOW_LEVEL_ALLOC_ASYNC_SIGNAL_SAFE_MISSING -#error ABSL_LOW_LEVEL_ALLOC_ASYNC_SIGNAL_SAFE_MISSING cannot be directly set -#elif defined(_WIN32) || defined(__asmjs__) || defined(__wasm__) -#define ABSL_LOW_LEVEL_ALLOC_ASYNC_SIGNAL_SAFE_MISSING 1 -#endif - -#include - -#include "absl/base/port.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -class LowLevelAlloc { - public: - struct Arena; // an arena from which memory may be allocated - - // Returns a pointer to a block of at least "request" bytes - // that have been newly allocated from the specific arena. - // for Alloc() call the DefaultArena() is used. - // Returns 0 if passed request==0. - // Does not return 0 under other circumstances; it crashes if memory - // is not available. - static void *Alloc(size_t request) ABSL_ATTRIBUTE_SECTION(malloc_hook); - static void *AllocWithArena(size_t request, Arena *arena) - ABSL_ATTRIBUTE_SECTION(malloc_hook); - - // Deallocates a region of memory that was previously allocated with - // Alloc(). Does nothing if passed 0. "s" must be either 0, - // or must have been returned from a call to Alloc() and not yet passed to - // Free() since that call to Alloc(). The space is returned to the arena - // from which it was allocated. - static void Free(void *s) ABSL_ATTRIBUTE_SECTION(malloc_hook); - - // ABSL_ATTRIBUTE_SECTION(malloc_hook) for Alloc* and Free - // are to put all callers of MallocHook::Invoke* in this module - // into special section, - // so that MallocHook::GetCallerStackTrace can function accurately. - - // Create a new arena. - // The root metadata for the new arena is allocated in the - // meta_data_arena; the DefaultArena() can be passed for meta_data_arena. - // These values may be ored into flags: - enum { - // Report calls to Alloc() and Free() via the MallocHook interface. - // Set in the DefaultArena. - kCallMallocHook = 0x0001, - -#ifndef ABSL_LOW_LEVEL_ALLOC_ASYNC_SIGNAL_SAFE_MISSING - // Make calls to Alloc(), Free() be async-signal-safe. Not set in - // DefaultArena(). Not supported on all platforms. - kAsyncSignalSafe = 0x0002, -#endif - }; - // Construct a new arena. The allocation of the underlying metadata honors - // the provided flags. For example, the call NewArena(kAsyncSignalSafe) - // is itself async-signal-safe, as well as generatating an arena that provides - // async-signal-safe Alloc/Free. - static Arena *NewArena(int32_t flags); - - // Destroys an arena allocated by NewArena and returns true, - // provided no allocated blocks remain in the arena. - // If allocated blocks remain in the arena, does nothing and - // returns false. - // It is illegal to attempt to destroy the DefaultArena(). - static bool DeleteArena(Arena *arena); - - // The default arena that always exists. - static Arena *DefaultArena(); - - private: - LowLevelAlloc(); // no instances -}; - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_LOW_LEVEL_ALLOC_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/low_level_scheduling.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/low_level_scheduling.h deleted file mode 100644 index 9baccc0..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/low_level_scheduling.h +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Core interfaces and definitions used by by low-level interfaces such as -// SpinLock. - -#ifndef ABSL_BASE_INTERNAL_LOW_LEVEL_SCHEDULING_H_ -#define ABSL_BASE_INTERNAL_LOW_LEVEL_SCHEDULING_H_ - -#include "absl/base/internal/raw_logging.h" -#include "absl/base/internal/scheduling_mode.h" -#include "absl/base/macros.h" - -// The following two declarations exist so SchedulingGuard may friend them with -// the appropriate language linkage. These callbacks allow libc internals, such -// as function level statics, to schedule cooperatively when locking. -extern "C" bool __google_disable_rescheduling(void); -extern "C" void __google_enable_rescheduling(bool disable_result); - -namespace absl { -ABSL_NAMESPACE_BEGIN -class CondVar; -class Mutex; - -namespace synchronization_internal { -int MutexDelay(int32_t c, int mode); -} // namespace synchronization_internal - -namespace base_internal { - -class SchedulingHelper; // To allow use of SchedulingGuard. -class SpinLock; // To allow use of SchedulingGuard. - -// SchedulingGuard -// Provides guard semantics that may be used to disable cooperative rescheduling -// of the calling thread within specific program blocks. This is used to -// protect resources (e.g. low-level SpinLocks or Domain code) that cooperative -// scheduling depends on. -// -// Domain implementations capable of rescheduling in reaction to involuntary -// kernel thread actions (e.g blocking due to a pagefault or syscall) must -// guarantee that an annotated thread is not allowed to (cooperatively) -// reschedule until the annotated region is complete. -// -// It is an error to attempt to use a cooperatively scheduled resource (e.g. -// Mutex) within a rescheduling-disabled region. -// -// All methods are async-signal safe. -class SchedulingGuard { - public: - // Returns true iff the calling thread may be cooperatively rescheduled. - static bool ReschedulingIsAllowed(); - SchedulingGuard(const SchedulingGuard&) = delete; - SchedulingGuard& operator=(const SchedulingGuard&) = delete; - - private: - // Disable cooperative rescheduling of the calling thread. It may still - // initiate scheduling operations (e.g. wake-ups), however, it may not itself - // reschedule. Nestable. The returned result is opaque, clients should not - // attempt to interpret it. - // REQUIRES: Result must be passed to a pairing EnableScheduling(). - static bool DisableRescheduling(); - - // Marks the end of a rescheduling disabled region, previously started by - // DisableRescheduling(). - // REQUIRES: Pairs with innermost call (and result) of DisableRescheduling(). - static void EnableRescheduling(bool disable_result); - - // A scoped helper for {Disable, Enable}Rescheduling(). - // REQUIRES: destructor must run in same thread as constructor. - struct ScopedDisable { - ScopedDisable() { disabled = SchedulingGuard::DisableRescheduling(); } - ~ScopedDisable() { SchedulingGuard::EnableRescheduling(disabled); } - - bool disabled; - }; - - // A scoped helper to enable rescheduling temporarily. - // REQUIRES: destructor must run in same thread as constructor. - class ScopedEnable { - public: - ScopedEnable(); - ~ScopedEnable(); - - private: - int scheduling_disabled_depth_; - }; - - // Access to SchedulingGuard is explicitly permitted. - friend class absl::CondVar; - friend class absl::Mutex; - friend class SchedulingHelper; - friend class SpinLock; - friend int absl::synchronization_internal::MutexDelay(int32_t c, int mode); -}; - -//------------------------------------------------------------------------------ -// End of public interfaces. -//------------------------------------------------------------------------------ - -inline bool SchedulingGuard::ReschedulingIsAllowed() { - return false; -} - -inline bool SchedulingGuard::DisableRescheduling() { - return false; -} - -inline void SchedulingGuard::EnableRescheduling(bool /* disable_result */) { - return; -} - -inline SchedulingGuard::ScopedEnable::ScopedEnable() - : scheduling_disabled_depth_(0) {} -inline SchedulingGuard::ScopedEnable::~ScopedEnable() { - ABSL_RAW_CHECK(scheduling_disabled_depth_ == 0, "disable unused warning"); -} - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_LOW_LEVEL_SCHEDULING_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/per_thread_tls.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/per_thread_tls.h deleted file mode 100644 index cf5e97a..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/per_thread_tls.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_PER_THREAD_TLS_H_ -#define ABSL_BASE_INTERNAL_PER_THREAD_TLS_H_ - -// This header defines two macros: -// -// If the platform supports thread-local storage: -// -// * ABSL_PER_THREAD_TLS_KEYWORD is the C keyword needed to declare a -// thread-local variable -// * ABSL_PER_THREAD_TLS is 1 -// -// Otherwise: -// -// * ABSL_PER_THREAD_TLS_KEYWORD is empty -// * ABSL_PER_THREAD_TLS is 0 -// -// Microsoft C supports thread-local storage. -// GCC supports it if the appropriate version of glibc is available, -// which the programmer can indicate by defining ABSL_HAVE_TLS - -#include "absl/base/port.h" // For ABSL_HAVE_TLS - -#if defined(ABSL_PER_THREAD_TLS) -#error ABSL_PER_THREAD_TLS cannot be directly set -#elif defined(ABSL_PER_THREAD_TLS_KEYWORD) -#error ABSL_PER_THREAD_TLS_KEYWORD cannot be directly set -#elif defined(ABSL_HAVE_TLS) -#define ABSL_PER_THREAD_TLS_KEYWORD __thread -#define ABSL_PER_THREAD_TLS 1 -#elif defined(_MSC_VER) -#define ABSL_PER_THREAD_TLS_KEYWORD __declspec(thread) -#define ABSL_PER_THREAD_TLS 1 -#else -#define ABSL_PER_THREAD_TLS_KEYWORD -#define ABSL_PER_THREAD_TLS 0 -#endif - -#endif // ABSL_BASE_INTERNAL_PER_THREAD_TLS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/prefetch.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/prefetch.h deleted file mode 100644 index 0641928..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/prefetch.h +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2022 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_PREFETCH_H_ -#define ABSL_BASE_INTERNAL_PREFETCH_H_ - -#include "absl/base/config.h" - -#ifdef __SSE__ -#include -#endif - -#if defined(_MSC_VER) && defined(ABSL_INTERNAL_HAVE_SSE) -#include -#pragma intrinsic(_mm_prefetch) -#endif - -// Compatibility wrappers around __builtin_prefetch, to prefetch data -// for read if supported by the toolchain. - -// Move data into the cache before it is read, or "prefetch" it. -// -// The value of `addr` is the address of the memory to prefetch. If -// the target and compiler support it, data prefetch instructions are -// generated. If the prefetch is done some time before the memory is -// read, it may be in the cache by the time the read occurs. -// -// The function names specify the temporal locality heuristic applied, -// using the names of Intel prefetch instructions: -// -// T0 - high degree of temporal locality; data should be left in as -// many levels of the cache possible -// T1 - moderate degree of temporal locality -// T2 - low degree of temporal locality -// Nta - no temporal locality, data need not be left in the cache -// after the read -// -// Incorrect or gratuitous use of these functions can degrade -// performance, so use them only when representative benchmarks show -// an improvement. -// -// Example usage: -// -// absl::base_internal::PrefetchT0(addr); -// -// Currently, the different prefetch calls behave on some Intel -// architectures as follows: -// -// SNB..SKL SKX -// PrefetchT0() L1/L2/L3 L1/L2 -// PrefetchT1() L2/L3 L2 -// PrefetchT2() L2/L3 L2 -// PrefetchNta() L1/--/L3 L1* -// -// * On SKX PrefetchNta() will bring the line into L1 but will evict -// from L3 cache. This might result in surprising behavior. -// -// SNB = Sandy Bridge, SKL = Skylake, SKX = Skylake Xeon. -// -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -void PrefetchT0(const void* addr); -void PrefetchT1(const void* addr); -void PrefetchT2(const void* addr); -void PrefetchNta(const void* addr); - -// Implementation details follow. - -#if ABSL_HAVE_BUILTIN(__builtin_prefetch) || defined(__GNUC__) - -#define ABSL_INTERNAL_HAVE_PREFETCH 1 - -// See __builtin_prefetch: -// https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html. -// -// These functions speculatively load for read only. This is -// safe for all currently supported platforms. However, prefetch for -// store may have problems depending on the target platform. -// -inline void PrefetchT0(const void* addr) { - // Note: this uses prefetcht0 on Intel. - __builtin_prefetch(addr, 0, 3); -} -inline void PrefetchT1(const void* addr) { - // Note: this uses prefetcht1 on Intel. - __builtin_prefetch(addr, 0, 2); -} -inline void PrefetchT2(const void* addr) { - // Note: this uses prefetcht2 on Intel. - __builtin_prefetch(addr, 0, 1); -} -inline void PrefetchNta(const void* addr) { - // Note: this uses prefetchtnta on Intel. - __builtin_prefetch(addr, 0, 0); -} - -#elif defined(ABSL_INTERNAL_HAVE_SSE) - -#define ABSL_INTERNAL_HAVE_PREFETCH 1 - -inline void PrefetchT0(const void* addr) { - _mm_prefetch(reinterpret_cast(addr), _MM_HINT_T0); -} -inline void PrefetchT1(const void* addr) { - _mm_prefetch(reinterpret_cast(addr), _MM_HINT_T1); -} -inline void PrefetchT2(const void* addr) { - _mm_prefetch(reinterpret_cast(addr), _MM_HINT_T2); -} -inline void PrefetchNta(const void* addr) { - _mm_prefetch(reinterpret_cast(addr), _MM_HINT_NTA); -} - -#else -inline void PrefetchT0(const void*) {} -inline void PrefetchT1(const void*) {} -inline void PrefetchT2(const void*) {} -inline void PrefetchNta(const void*) {} -#endif - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_PREFETCH_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/pretty_function.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/pretty_function.h deleted file mode 100644 index 35d5167..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/pretty_function.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_PRETTY_FUNCTION_H_ -#define ABSL_BASE_INTERNAL_PRETTY_FUNCTION_H_ - -// ABSL_PRETTY_FUNCTION -// -// In C++11, __func__ gives the undecorated name of the current function. That -// is, "main", not "int main()". Various compilers give extra macros to get the -// decorated function name, including return type and arguments, to -// differentiate between overload sets. ABSL_PRETTY_FUNCTION is a portable -// version of these macros which forwards to the correct macro on each compiler. -#if defined(_MSC_VER) -#define ABSL_PRETTY_FUNCTION __FUNCSIG__ -#elif defined(__GNUC__) -#define ABSL_PRETTY_FUNCTION __PRETTY_FUNCTION__ -#else -#error "Unsupported compiler" -#endif - -#endif // ABSL_BASE_INTERNAL_PRETTY_FUNCTION_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/raw_logging.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/raw_logging.h deleted file mode 100644 index 0747c9d..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/raw_logging.h +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Thread-safe logging routines that do not allocate any memory or -// acquire any locks, and can therefore be used by low-level memory -// allocation, synchronization, and signal-handling code. - -#ifndef ABSL_BASE_INTERNAL_RAW_LOGGING_H_ -#define ABSL_BASE_INTERNAL_RAW_LOGGING_H_ - -#include - -#include "absl/base/attributes.h" -#include "absl/base/config.h" -#include "absl/base/internal/atomic_hook.h" -#include "absl/base/log_severity.h" -#include "absl/base/macros.h" -#include "absl/base/optimization.h" -#include "absl/base/port.h" - -// This is similar to LOG(severity) << format..., but -// * it is to be used ONLY by low-level modules that can't use normal LOG() -// * it is designed to be a low-level logger that does not allocate any -// memory and does not need any locks, hence: -// * it logs straight and ONLY to STDERR w/o buffering -// * it uses an explicit printf-format and arguments list -// * it will silently chop off really long message strings -// Usage example: -// ABSL_RAW_LOG(ERROR, "Failed foo with %i: %s", status, error); -// This will print an almost standard log line like this to stderr only: -// E0821 211317 file.cc:123] RAW: Failed foo with 22: bad_file - -#define ABSL_RAW_LOG(severity, ...) \ - do { \ - constexpr const char* absl_raw_logging_internal_basename = \ - ::absl::raw_logging_internal::Basename(__FILE__, \ - sizeof(__FILE__) - 1); \ - ::absl::raw_logging_internal::RawLog(ABSL_RAW_LOGGING_INTERNAL_##severity, \ - absl_raw_logging_internal_basename, \ - __LINE__, __VA_ARGS__); \ - } while (0) - -// Similar to CHECK(condition) << message, but for low-level modules: -// we use only ABSL_RAW_LOG that does not allocate memory. -// We do not want to provide args list here to encourage this usage: -// if (!cond) ABSL_RAW_LOG(FATAL, "foo ...", hard_to_compute_args); -// so that the args are not computed when not needed. -#define ABSL_RAW_CHECK(condition, message) \ - do { \ - if (ABSL_PREDICT_FALSE(!(condition))) { \ - ABSL_RAW_LOG(FATAL, "Check %s failed: %s", #condition, message); \ - } \ - } while (0) - -// ABSL_INTERNAL_LOG and ABSL_INTERNAL_CHECK work like the RAW variants above, -// except that if the richer log library is linked into the binary, we dispatch -// to that instead. This is potentially useful for internal logging and -// assertions, where we are using RAW_LOG neither for its async-signal-safety -// nor for its non-allocating nature, but rather because raw logging has very -// few other dependencies. -// -// The API is a subset of the above: each macro only takes two arguments. Use -// StrCat if you need to build a richer message. -#define ABSL_INTERNAL_LOG(severity, message) \ - do { \ - constexpr const char* absl_raw_logging_internal_filename = __FILE__; \ - ::absl::raw_logging_internal::internal_log_function( \ - ABSL_RAW_LOGGING_INTERNAL_##severity, \ - absl_raw_logging_internal_filename, __LINE__, message); \ - if (ABSL_RAW_LOGGING_INTERNAL_##severity == ::absl::LogSeverity::kFatal) \ - ABSL_INTERNAL_UNREACHABLE; \ - } while (0) - -#define ABSL_INTERNAL_CHECK(condition, message) \ - do { \ - if (ABSL_PREDICT_FALSE(!(condition))) { \ - std::string death_message = "Check " #condition " failed: "; \ - death_message += std::string(message); \ - ABSL_INTERNAL_LOG(FATAL, death_message); \ - } \ - } while (0) - -#define ABSL_RAW_LOGGING_INTERNAL_INFO ::absl::LogSeverity::kInfo -#define ABSL_RAW_LOGGING_INTERNAL_WARNING ::absl::LogSeverity::kWarning -#define ABSL_RAW_LOGGING_INTERNAL_ERROR ::absl::LogSeverity::kError -#define ABSL_RAW_LOGGING_INTERNAL_FATAL ::absl::LogSeverity::kFatal -#define ABSL_RAW_LOGGING_INTERNAL_LEVEL(severity) \ - ::absl::NormalizeLogSeverity(severity) - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace raw_logging_internal { - -// Helper function to implement ABSL_RAW_LOG -// Logs format... at "severity" level, reporting it -// as called from file:line. -// This does not allocate memory or acquire locks. -void RawLog(absl::LogSeverity severity, const char* file, int line, - const char* format, ...) ABSL_PRINTF_ATTRIBUTE(4, 5); - -// Writes the provided buffer directly to stderr, in a signal-safe, low-level -// manner. -void AsyncSignalSafeWriteToStderr(const char* s, size_t len); - -// compile-time function to get the "base" filename, that is, the part of -// a filename after the last "/" or "\" path separator. The search starts at -// the end of the string; the second parameter is the length of the string. -constexpr const char* Basename(const char* fname, int offset) { - return offset == 0 || fname[offset - 1] == '/' || fname[offset - 1] == '\\' - ? fname + offset - : Basename(fname, offset - 1); -} - -// For testing only. -// Returns true if raw logging is fully supported. When it is not -// fully supported, no messages will be emitted, but a log at FATAL -// severity will cause an abort. -// -// TODO(gfalcon): Come up with a better name for this method. -bool RawLoggingFullySupported(); - -// Function type for a raw_logging customization hook for suppressing messages -// by severity, and for writing custom prefixes on non-suppressed messages. -// -// The installed hook is called for every raw log invocation. The message will -// be logged to stderr only if the hook returns true. FATAL errors will cause -// the process to abort, even if writing to stderr is suppressed. The hook is -// also provided with an output buffer, where it can write a custom log message -// prefix. -// -// The raw_logging system does not allocate memory or grab locks. User-provided -// hooks must avoid these operations, and must not throw exceptions. -// -// 'severity' is the severity level of the message being written. -// 'file' and 'line' are the file and line number where the ABSL_RAW_LOG macro -// was located. -// 'buf' and 'buf_size' are pointers to the buffer and buffer size. If the -// hook writes a prefix, it must increment *buf and decrement *buf_size -// accordingly. -using LogFilterAndPrefixHook = bool (*)(absl::LogSeverity severity, - const char* file, int line, char** buf, - int* buf_size); - -// Function type for a raw_logging customization hook called to abort a process -// when a FATAL message is logged. If the provided AbortHook() returns, the -// logging system will call abort(). -// -// 'file' and 'line' are the file and line number where the ABSL_RAW_LOG macro -// was located. -// The NUL-terminated logged message lives in the buffer between 'buf_start' -// and 'buf_end'. 'prefix_end' points to the first non-prefix character of the -// buffer (as written by the LogFilterAndPrefixHook.) -// -// The lifetime of the filename and message buffers will not end while the -// process remains alive. -using AbortHook = void (*)(const char* file, int line, const char* buf_start, - const char* prefix_end, const char* buf_end); - -// Internal logging function for ABSL_INTERNAL_LOG to dispatch to. -// -// TODO(gfalcon): When string_view no longer depends on base, change this -// interface to take its message as a string_view instead. -using InternalLogFunction = void (*)(absl::LogSeverity severity, - const char* file, int line, - const std::string& message); - -ABSL_INTERNAL_ATOMIC_HOOK_ATTRIBUTES ABSL_DLL extern base_internal::AtomicHook< - InternalLogFunction> - internal_log_function; - -// Registers hooks of the above types. Only a single hook of each type may be -// registered. It is an error to call these functions multiple times with -// different input arguments. -// -// These functions are safe to call at any point during initialization; they do -// not block or malloc, and are async-signal safe. -void RegisterLogFilterAndPrefixHook(LogFilterAndPrefixHook func); -void RegisterAbortHook(AbortHook func); -void RegisterInternalLogFunction(InternalLogFunction func); - -} // namespace raw_logging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_RAW_LOGGING_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/scheduling_mode.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/scheduling_mode.h deleted file mode 100644 index 8be5ab6..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/scheduling_mode.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Core interfaces and definitions used by by low-level interfaces such as -// SpinLock. - -#ifndef ABSL_BASE_INTERNAL_SCHEDULING_MODE_H_ -#define ABSL_BASE_INTERNAL_SCHEDULING_MODE_H_ - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// Used to describe how a thread may be scheduled. Typically associated with -// the declaration of a resource supporting synchronized access. -// -// SCHEDULE_COOPERATIVE_AND_KERNEL: -// Specifies that when waiting, a cooperative thread (e.g. a Fiber) may -// reschedule (using base::scheduling semantics); allowing other cooperative -// threads to proceed. -// -// SCHEDULE_KERNEL_ONLY: (Also described as "non-cooperative") -// Specifies that no cooperative scheduling semantics may be used, even if the -// current thread is itself cooperatively scheduled. This means that -// cooperative threads will NOT allow other cooperative threads to execute in -// their place while waiting for a resource of this type. Host operating system -// semantics (e.g. a futex) may still be used. -// -// When optional, clients should strongly prefer SCHEDULE_COOPERATIVE_AND_KERNEL -// by default. SCHEDULE_KERNEL_ONLY should only be used for resources on which -// base::scheduling (e.g. the implementation of a Scheduler) may depend. -// -// NOTE: Cooperative resources may not be nested below non-cooperative ones. -// This means that it is invalid to to acquire a SCHEDULE_COOPERATIVE_AND_KERNEL -// resource if a SCHEDULE_KERNEL_ONLY resource is already held. -enum SchedulingMode { - SCHEDULE_KERNEL_ONLY = 0, // Allow scheduling only the host OS. - SCHEDULE_COOPERATIVE_AND_KERNEL, // Also allow cooperative scheduling. -}; - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_SCHEDULING_MODE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock.h deleted file mode 100644 index 6d8d8dd..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock.h +++ /dev/null @@ -1,256 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Most users requiring mutual exclusion should use Mutex. -// SpinLock is provided for use in two situations: -// - for use by Abseil internal code that Mutex itself depends on -// - for async signal safety (see below) - -// SpinLock is async signal safe. If a spinlock is used within a signal -// handler, all code that acquires the lock must ensure that the signal cannot -// arrive while they are holding the lock. Typically, this is done by blocking -// the signal. -// -// Threads waiting on a SpinLock may be woken in an arbitrary order. - -#ifndef ABSL_BASE_INTERNAL_SPINLOCK_H_ -#define ABSL_BASE_INTERNAL_SPINLOCK_H_ - -#include -#include - -#include - -#include "absl/base/attributes.h" -#include "absl/base/const_init.h" -#include "absl/base/dynamic_annotations.h" -#include "absl/base/internal/low_level_scheduling.h" -#include "absl/base/internal/raw_logging.h" -#include "absl/base/internal/scheduling_mode.h" -#include "absl/base/internal/tsan_mutex_interface.h" -#include "absl/base/macros.h" -#include "absl/base/port.h" -#include "absl/base/thread_annotations.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -class ABSL_LOCKABLE SpinLock { - public: - SpinLock() : lockword_(kSpinLockCooperative) { - ABSL_TSAN_MUTEX_CREATE(this, __tsan_mutex_not_static); - } - - // Constructors that allow non-cooperative spinlocks to be created for use - // inside thread schedulers. Normal clients should not use these. - explicit SpinLock(base_internal::SchedulingMode mode); - - // Constructor for global SpinLock instances. See absl/base/const_init.h. - constexpr SpinLock(absl::ConstInitType, base_internal::SchedulingMode mode) - : lockword_(IsCooperative(mode) ? kSpinLockCooperative : 0) {} - - // For global SpinLock instances prefer trivial destructor when possible. - // Default but non-trivial destructor in some build configurations causes an - // extra static initializer. -#ifdef ABSL_INTERNAL_HAVE_TSAN_INTERFACE - ~SpinLock() { ABSL_TSAN_MUTEX_DESTROY(this, __tsan_mutex_not_static); } -#else - ~SpinLock() = default; -#endif - - // Acquire this SpinLock. - inline void Lock() ABSL_EXCLUSIVE_LOCK_FUNCTION() { - ABSL_TSAN_MUTEX_PRE_LOCK(this, 0); - if (!TryLockImpl()) { - SlowLock(); - } - ABSL_TSAN_MUTEX_POST_LOCK(this, 0, 0); - } - - // Try to acquire this SpinLock without blocking and return true if the - // acquisition was successful. If the lock was not acquired, false is - // returned. If this SpinLock is free at the time of the call, TryLock - // will return true with high probability. - inline bool TryLock() ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) { - ABSL_TSAN_MUTEX_PRE_LOCK(this, __tsan_mutex_try_lock); - bool res = TryLockImpl(); - ABSL_TSAN_MUTEX_POST_LOCK( - this, __tsan_mutex_try_lock | (res ? 0 : __tsan_mutex_try_lock_failed), - 0); - return res; - } - - // Release this SpinLock, which must be held by the calling thread. - inline void Unlock() ABSL_UNLOCK_FUNCTION() { - ABSL_TSAN_MUTEX_PRE_UNLOCK(this, 0); - uint32_t lock_value = lockword_.load(std::memory_order_relaxed); - lock_value = lockword_.exchange(lock_value & kSpinLockCooperative, - std::memory_order_release); - - if ((lock_value & kSpinLockDisabledScheduling) != 0) { - base_internal::SchedulingGuard::EnableRescheduling(true); - } - if ((lock_value & kWaitTimeMask) != 0) { - // Collect contentionz profile info, and speed the wakeup of any waiter. - // The wait_cycles value indicates how long this thread spent waiting - // for the lock. - SlowUnlock(lock_value); - } - ABSL_TSAN_MUTEX_POST_UNLOCK(this, 0); - } - - // Determine if the lock is held. When the lock is held by the invoking - // thread, true will always be returned. Intended to be used as - // CHECK(lock.IsHeld()). - inline bool IsHeld() const { - return (lockword_.load(std::memory_order_relaxed) & kSpinLockHeld) != 0; - } - - // Return immediately if this thread holds the SpinLock exclusively. - // Otherwise, report an error by crashing with a diagnostic. - inline void AssertHeld() const ABSL_ASSERT_EXCLUSIVE_LOCK() { - if (!IsHeld()) { - ABSL_RAW_LOG(FATAL, "thread should hold the lock on SpinLock"); - } - } - - protected: - // These should not be exported except for testing. - - // Store number of cycles between wait_start_time and wait_end_time in a - // lock value. - static uint32_t EncodeWaitCycles(int64_t wait_start_time, - int64_t wait_end_time); - - // Extract number of wait cycles in a lock value. - static uint64_t DecodeWaitCycles(uint32_t lock_value); - - // Provide access to protected method above. Use for testing only. - friend struct SpinLockTest; - - private: - // lockword_ is used to store the following: - // - // bit[0] encodes whether a lock is being held. - // bit[1] encodes whether a lock uses cooperative scheduling. - // bit[2] encodes whether the current lock holder disabled scheduling when - // acquiring the lock. Only set when kSpinLockHeld is also set. - // bit[3:31] encodes time a lock spent on waiting as a 29-bit unsigned int. - // This is set by the lock holder to indicate how long it waited on - // the lock before eventually acquiring it. The number of cycles is - // encoded as a 29-bit unsigned int, or in the case that the current - // holder did not wait but another waiter is queued, the LSB - // (kSpinLockSleeper) is set. The implementation does not explicitly - // track the number of queued waiters beyond this. It must always be - // assumed that waiters may exist if the current holder was required to - // queue. - // - // Invariant: if the lock is not held, the value is either 0 or - // kSpinLockCooperative. - static constexpr uint32_t kSpinLockHeld = 1; - static constexpr uint32_t kSpinLockCooperative = 2; - static constexpr uint32_t kSpinLockDisabledScheduling = 4; - static constexpr uint32_t kSpinLockSleeper = 8; - // Includes kSpinLockSleeper. - static constexpr uint32_t kWaitTimeMask = - ~(kSpinLockHeld | kSpinLockCooperative | kSpinLockDisabledScheduling); - - // Returns true if the provided scheduling mode is cooperative. - static constexpr bool IsCooperative( - base_internal::SchedulingMode scheduling_mode) { - return scheduling_mode == base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL; - } - - uint32_t TryLockInternal(uint32_t lock_value, uint32_t wait_cycles); - void SlowLock() ABSL_ATTRIBUTE_COLD; - void SlowUnlock(uint32_t lock_value) ABSL_ATTRIBUTE_COLD; - uint32_t SpinLoop(); - - inline bool TryLockImpl() { - uint32_t lock_value = lockword_.load(std::memory_order_relaxed); - return (TryLockInternal(lock_value, 0) & kSpinLockHeld) == 0; - } - - std::atomic lockword_; - - SpinLock(const SpinLock&) = delete; - SpinLock& operator=(const SpinLock&) = delete; -}; - -// Corresponding locker object that arranges to acquire a spinlock for -// the duration of a C++ scope. -class ABSL_SCOPED_LOCKABLE SpinLockHolder { - public: - inline explicit SpinLockHolder(SpinLock* l) ABSL_EXCLUSIVE_LOCK_FUNCTION(l) - : lock_(l) { - l->Lock(); - } - inline ~SpinLockHolder() ABSL_UNLOCK_FUNCTION() { lock_->Unlock(); } - - SpinLockHolder(const SpinLockHolder&) = delete; - SpinLockHolder& operator=(const SpinLockHolder&) = delete; - - private: - SpinLock* lock_; -}; - -// Register a hook for profiling support. -// -// The function pointer registered here will be called whenever a spinlock is -// contended. The callback is given an opaque handle to the contended spinlock -// and the number of wait cycles. This is thread-safe, but only a single -// profiler can be registered. It is an error to call this function multiple -// times with different arguments. -void RegisterSpinLockProfiler(void (*fn)(const void* lock, - int64_t wait_cycles)); - -//------------------------------------------------------------------------------ -// Public interface ends here. -//------------------------------------------------------------------------------ - -// If (result & kSpinLockHeld) == 0, then *this was successfully locked. -// Otherwise, returns last observed value for lockword_. -inline uint32_t SpinLock::TryLockInternal(uint32_t lock_value, - uint32_t wait_cycles) { - if ((lock_value & kSpinLockHeld) != 0) { - return lock_value; - } - - uint32_t sched_disabled_bit = 0; - if ((lock_value & kSpinLockCooperative) == 0) { - // For non-cooperative locks we must make sure we mark ourselves as - // non-reschedulable before we attempt to CompareAndSwap. - if (base_internal::SchedulingGuard::DisableRescheduling()) { - sched_disabled_bit = kSpinLockDisabledScheduling; - } - } - - if (!lockword_.compare_exchange_strong( - lock_value, - kSpinLockHeld | lock_value | wait_cycles | sched_disabled_bit, - std::memory_order_acquire, std::memory_order_relaxed)) { - base_internal::SchedulingGuard::EnableRescheduling(sched_disabled_bit != 0); - } - - return lock_value; -} - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_SPINLOCK_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_akaros.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_akaros.inc deleted file mode 100644 index 7b0cada..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_akaros.inc +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file is an Akaros-specific part of spinlock_wait.cc - -#include - -#include "absl/base/internal/scheduling_mode.h" - -extern "C" { - -ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( - std::atomic* /* lock_word */, uint32_t /* value */, - int /* loop */, absl::base_internal::SchedulingMode /* mode */) { - // In Akaros, one must take care not to call anything that could cause a - // malloc(), a blocking system call, or a uthread_yield() while holding a - // spinlock. Our callers assume will not call into libraries or other - // arbitrary code. -} - -ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)( - std::atomic* /* lock_word */, bool /* all */) {} - -} // extern "C" diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_linux.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_linux.inc deleted file mode 100644 index fe8ba67..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_linux.inc +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file is a Linux-specific part of spinlock_wait.cc - -#include -#include -#include - -#include -#include -#include -#include - -#include "absl/base/attributes.h" -#include "absl/base/internal/errno_saver.h" - -// The SpinLock lockword is `std::atomic`. Here we assert that -// `std::atomic` is bitwise equivalent of the `int` expected -// by SYS_futex. We also assume that reads/writes done to the lockword -// by SYS_futex have rational semantics with regard to the -// std::atomic<> API. C++ provides no guarantees of these assumptions, -// but they are believed to hold in practice. -static_assert(sizeof(std::atomic) == sizeof(int), - "SpinLock lockword has the wrong size for a futex"); - -// Some Android headers are missing these definitions even though they -// support these futex operations. -#ifdef __BIONIC__ -#ifndef SYS_futex -#define SYS_futex __NR_futex -#endif -#ifndef FUTEX_PRIVATE_FLAG -#define FUTEX_PRIVATE_FLAG 128 -#endif -#endif - -#if defined(__NR_futex_time64) && !defined(SYS_futex_time64) -#define SYS_futex_time64 __NR_futex_time64 -#endif - -#if defined(SYS_futex_time64) && !defined(SYS_futex) -#define SYS_futex SYS_futex_time64 -#endif - -extern "C" { - -ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( - std::atomic *w, uint32_t value, int, - absl::base_internal::SchedulingMode) { - absl::base_internal::ErrnoSaver errno_saver; - syscall(SYS_futex, w, FUTEX_WAIT | FUTEX_PRIVATE_FLAG, value, nullptr); -} - -ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)( - std::atomic *w, bool all) { - syscall(SYS_futex, w, FUTEX_WAKE | FUTEX_PRIVATE_FLAG, all ? INT_MAX : 1, 0); -} - -} // extern "C" diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_posix.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_posix.inc deleted file mode 100644 index 4f6f887..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_posix.inc +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file is a Posix-specific part of spinlock_wait.cc - -#include - -#include -#include - -#include "absl/base/internal/errno_saver.h" -#include "absl/base/internal/scheduling_mode.h" -#include "absl/base/port.h" - -extern "C" { - -ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( - std::atomic* /* lock_word */, uint32_t /* value */, int loop, - absl::base_internal::SchedulingMode /* mode */) { - absl::base_internal::ErrnoSaver errno_saver; - if (loop == 0) { - } else if (loop == 1) { - sched_yield(); - } else { - struct timespec tm; - tm.tv_sec = 0; - tm.tv_nsec = absl::base_internal::SpinLockSuggestedDelayNS(loop); - nanosleep(&tm, nullptr); - } -} - -ABSL_ATTRIBUTE_WEAK void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)( - std::atomic* /* lock_word */, bool /* all */) {} - -} // extern "C" diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_wait.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_wait.h deleted file mode 100644 index 9a1adcd..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_wait.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_SPINLOCK_WAIT_H_ -#define ABSL_BASE_INTERNAL_SPINLOCK_WAIT_H_ - -// Operations to make atomic transitions on a word, and to allow -// waiting for those transitions to become possible. - -#include -#include - -#include "absl/base/internal/scheduling_mode.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// SpinLockWait() waits until it can perform one of several transitions from -// "from" to "to". It returns when it performs a transition where done==true. -struct SpinLockWaitTransition { - uint32_t from; - uint32_t to; - bool done; -}; - -// Wait until *w can transition from trans[i].from to trans[i].to for some i -// satisfying 0<=i *w, int n, - const SpinLockWaitTransition trans[], - SchedulingMode scheduling_mode); - -// If possible, wake some thread that has called SpinLockDelay(w, ...). If `all` -// is true, wake all such threads. On some systems, this may be a no-op; on -// those systems, threads calling SpinLockDelay() will always wake eventually -// even if SpinLockWake() is never called. -void SpinLockWake(std::atomic *w, bool all); - -// Wait for an appropriate spin delay on iteration "loop" of a -// spin loop on location *w, whose previously observed value was "value". -// SpinLockDelay() may do nothing, may yield the CPU, may sleep a clock tick, -// or may wait for a call to SpinLockWake(w). -void SpinLockDelay(std::atomic *w, uint32_t value, int loop, - base_internal::SchedulingMode scheduling_mode); - -// Helper used by AbslInternalSpinLockDelay. -// Returns a suggested delay in nanoseconds for iteration number "loop". -int SpinLockSuggestedDelayNS(int loop); - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -// In some build configurations we pass --detect-odr-violations to the -// gold linker. This causes it to flag weak symbol overrides as ODR -// violations. Because ODR only applies to C++ and not C, -// --detect-odr-violations ignores symbols not mangled with C++ names. -// By changing our extension points to be extern "C", we dodge this -// check. -extern "C" { -void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)(std::atomic *w, - bool all); -void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( - std::atomic *w, uint32_t value, int loop, - absl::base_internal::SchedulingMode scheduling_mode); -} - -inline void absl::base_internal::SpinLockWake(std::atomic *w, - bool all) { - ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)(w, all); -} - -inline void absl::base_internal::SpinLockDelay( - std::atomic *w, uint32_t value, int loop, - absl::base_internal::SchedulingMode scheduling_mode) { - ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay) - (w, value, loop, scheduling_mode); -} - -#endif // ABSL_BASE_INTERNAL_SPINLOCK_WAIT_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_win32.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_win32.inc deleted file mode 100644 index 9d22481..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/spinlock_win32.inc +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file is a Win32-specific part of spinlock_wait.cc - -#include -#include -#include "absl/base/internal/scheduling_mode.h" - -extern "C" { - -void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockDelay)( - std::atomic* /* lock_word */, uint32_t /* value */, int loop, - absl::base_internal::SchedulingMode /* mode */) { - if (loop == 0) { - } else if (loop == 1) { - Sleep(0); - } else { - Sleep(absl::base_internal::SpinLockSuggestedDelayNS(loop) / 1000000); - } -} - -void ABSL_INTERNAL_C_SYMBOL(AbslInternalSpinLockWake)( - std::atomic* /* lock_word */, bool /* all */) {} - -} // extern "C" diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/strerror.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/strerror.h deleted file mode 100644 index 3500973..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/strerror.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2020 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_INTERNAL_STRERROR_H_ -#define ABSL_BASE_INTERNAL_STRERROR_H_ - -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// A portable and thread-safe alternative to C89's `strerror`. -// -// The C89 specification of `strerror` is not suitable for use in a -// multi-threaded application as the returned string may be changed by calls to -// `strerror` from another thread. The many non-stdlib alternatives differ -// enough in their names, availability, and semantics to justify this wrapper -// around them. `errno` will not be modified by a call to `absl::StrError`. -std::string StrError(int errnum); - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_STRERROR_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/sysinfo.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/sysinfo.h deleted file mode 100644 index 119cf1f..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/sysinfo.h +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file includes routines to find out characteristics -// of the machine a program is running on. It is undoubtedly -// system-dependent. - -// Functions listed here that accept a pid_t as an argument act on the -// current process if the pid_t argument is 0 -// All functions here are thread-hostile due to file caching unless -// commented otherwise. - -#ifndef ABSL_BASE_INTERNAL_SYSINFO_H_ -#define ABSL_BASE_INTERNAL_SYSINFO_H_ - -#ifndef _WIN32 -#include -#endif - -#include - -#include "absl/base/config.h" -#include "absl/base/port.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// Nominal core processor cycles per second of each processor. This is _not_ -// necessarily the frequency of the CycleClock counter (see cycleclock.h) -// Thread-safe. -double NominalCPUFrequency(); - -// Number of logical processors (hyperthreads) in system. Thread-safe. -int NumCPUs(); - -// Return the thread id of the current thread, as told by the system. -// No two currently-live threads implemented by the OS shall have the same ID. -// Thread ids of exited threads may be reused. Multiple user-level threads -// may have the same thread ID if multiplexed on the same OS thread. -// -// On Linux, you may send a signal to the resulting ID with kill(). However, -// it is recommended for portability that you use pthread_kill() instead. -#ifdef _WIN32 -// On Windows, process id and thread id are of the same type according to the -// return types of GetProcessId() and GetThreadId() are both DWORD, an unsigned -// 32-bit type. -using pid_t = uint32_t; -#endif -pid_t GetTID(); - -// Like GetTID(), but caches the result in thread-local storage in order -// to avoid unnecessary system calls. Note that there are some cases where -// one must call through to GetTID directly, which is why this exists as a -// separate function. For example, GetCachedTID() is not safe to call in -// an asynchronous signal-handling context nor right after a call to fork(). -pid_t GetCachedTID(); - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_SYSINFO_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/thread_annotations.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/thread_annotations.h deleted file mode 100644 index 4dab6a9..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/thread_annotations.h +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright 2019 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: thread_annotations.h -// ----------------------------------------------------------------------------- -// -// WARNING: This is a backwards compatible header and it will be removed after -// the migration to prefixed thread annotations is finished; please include -// "absl/base/thread_annotations.h". -// -// This header file contains macro definitions for thread safety annotations -// that allow developers to document the locking policies of multi-threaded -// code. The annotations can also help program analysis tools to identify -// potential thread safety issues. -// -// These annotations are implemented using compiler attributes. Using the macros -// defined here instead of raw attributes allow for portability and future -// compatibility. -// -// When referring to mutexes in the arguments of the attributes, you should -// use variable names or more complex expressions (e.g. my_object->mutex_) -// that evaluate to a concrete mutex object whenever possible. If the mutex -// you want to refer to is not in scope, you may use a member pointer -// (e.g. &MyClass::mutex_) to refer to a mutex in some (unknown) object. - -#ifndef ABSL_BASE_INTERNAL_THREAD_ANNOTATIONS_H_ -#define ABSL_BASE_INTERNAL_THREAD_ANNOTATIONS_H_ - -#if defined(__clang__) -#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) -#else -#define THREAD_ANNOTATION_ATTRIBUTE__(x) // no-op -#endif - -// GUARDED_BY() -// -// Documents if a shared field or global variable needs to be protected by a -// mutex. GUARDED_BY() allows the user to specify a particular mutex that -// should be held when accessing the annotated variable. -// -// Although this annotation (and PT_GUARDED_BY, below) cannot be applied to -// local variables, a local variable and its associated mutex can often be -// combined into a small class or struct, thereby allowing the annotation. -// -// Example: -// -// class Foo { -// Mutex mu_; -// int p1_ GUARDED_BY(mu_); -// ... -// }; -#define GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x)) - -// PT_GUARDED_BY() -// -// Documents if the memory location pointed to by a pointer should be guarded -// by a mutex when dereferencing the pointer. -// -// Example: -// class Foo { -// Mutex mu_; -// int *p1_ PT_GUARDED_BY(mu_); -// ... -// }; -// -// Note that a pointer variable to a shared memory location could itself be a -// shared variable. -// -// Example: -// -// // `q_`, guarded by `mu1_`, points to a shared memory location that is -// // guarded by `mu2_`: -// int *q_ GUARDED_BY(mu1_) PT_GUARDED_BY(mu2_); -#define PT_GUARDED_BY(x) THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x)) - -// ACQUIRED_AFTER() / ACQUIRED_BEFORE() -// -// Documents the acquisition order between locks that can be held -// simultaneously by a thread. For any two locks that need to be annotated -// to establish an acquisition order, only one of them needs the annotation. -// (i.e. You don't have to annotate both locks with both ACQUIRED_AFTER -// and ACQUIRED_BEFORE.) -// -// As with GUARDED_BY, this is only applicable to mutexes that are shared -// fields or global variables. -// -// Example: -// -// Mutex m1_; -// Mutex m2_ ACQUIRED_AFTER(m1_); -#define ACQUIRED_AFTER(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(__VA_ARGS__)) - -#define ACQUIRED_BEFORE(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(__VA_ARGS__)) - -// EXCLUSIVE_LOCKS_REQUIRED() / SHARED_LOCKS_REQUIRED() -// -// Documents a function that expects a mutex to be held prior to entry. -// The mutex is expected to be held both on entry to, and exit from, the -// function. -// -// An exclusive lock allows read-write access to the guarded data member(s), and -// only one thread can acquire a lock exclusively at any one time. A shared lock -// allows read-only access, and any number of threads can acquire a shared lock -// concurrently. -// -// Generally, non-const methods should be annotated with -// EXCLUSIVE_LOCKS_REQUIRED, while const methods should be annotated with -// SHARED_LOCKS_REQUIRED. -// -// Example: -// -// Mutex mu1, mu2; -// int a GUARDED_BY(mu1); -// int b GUARDED_BY(mu2); -// -// void foo() EXCLUSIVE_LOCKS_REQUIRED(mu1, mu2) { ... } -// void bar() const SHARED_LOCKS_REQUIRED(mu1, mu2) { ... } -#define EXCLUSIVE_LOCKS_REQUIRED(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(__VA_ARGS__)) - -#define SHARED_LOCKS_REQUIRED(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(shared_locks_required(__VA_ARGS__)) - -// LOCKS_EXCLUDED() -// -// Documents the locks acquired in the body of the function. These locks -// cannot be held when calling this function (as Abseil's `Mutex` locks are -// non-reentrant). -#define LOCKS_EXCLUDED(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(__VA_ARGS__)) - -// LOCK_RETURNED() -// -// Documents a function that returns a mutex without acquiring it. For example, -// a public getter method that returns a pointer to a private mutex should -// be annotated with LOCK_RETURNED. -#define LOCK_RETURNED(x) \ - THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x)) - -// LOCKABLE -// -// Documents if a class/type is a lockable type (such as the `Mutex` class). -#define LOCKABLE \ - THREAD_ANNOTATION_ATTRIBUTE__(lockable) - -// SCOPED_LOCKABLE -// -// Documents if a class does RAII locking (such as the `MutexLock` class). -// The constructor should use `LOCK_FUNCTION()` to specify the mutex that is -// acquired, and the destructor should use `UNLOCK_FUNCTION()` with no -// arguments; the analysis will assume that the destructor unlocks whatever the -// constructor locked. -#define SCOPED_LOCKABLE \ - THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable) - -// EXCLUSIVE_LOCK_FUNCTION() -// -// Documents functions that acquire a lock in the body of a function, and do -// not release it. -#define EXCLUSIVE_LOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(exclusive_lock_function(__VA_ARGS__)) - -// SHARED_LOCK_FUNCTION() -// -// Documents functions that acquire a shared (reader) lock in the body of a -// function, and do not release it. -#define SHARED_LOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(shared_lock_function(__VA_ARGS__)) - -// UNLOCK_FUNCTION() -// -// Documents functions that expect a lock to be held on entry to the function, -// and release it in the body of the function. -#define UNLOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(unlock_function(__VA_ARGS__)) - -// EXCLUSIVE_TRYLOCK_FUNCTION() / SHARED_TRYLOCK_FUNCTION() -// -// Documents functions that try to acquire a lock, and return success or failure -// (or a non-boolean value that can be interpreted as a boolean). -// The first argument should be `true` for functions that return `true` on -// success, or `false` for functions that return `false` on success. The second -// argument specifies the mutex that is locked on success. If unspecified, this -// mutex is assumed to be `this`. -#define EXCLUSIVE_TRYLOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(exclusive_trylock_function(__VA_ARGS__)) - -#define SHARED_TRYLOCK_FUNCTION(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(shared_trylock_function(__VA_ARGS__)) - -// ASSERT_EXCLUSIVE_LOCK() / ASSERT_SHARED_LOCK() -// -// Documents functions that dynamically check to see if a lock is held, and fail -// if it is not held. -#define ASSERT_EXCLUSIVE_LOCK(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(assert_exclusive_lock(__VA_ARGS__)) - -#define ASSERT_SHARED_LOCK(...) \ - THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_lock(__VA_ARGS__)) - -// NO_THREAD_SAFETY_ANALYSIS -// -// Turns off thread safety checking within the body of a particular function. -// This annotation is used to mark functions that are known to be correct, but -// the locking behavior is more complicated than the analyzer can handle. -#define NO_THREAD_SAFETY_ANALYSIS \ - THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) - -//------------------------------------------------------------------------------ -// Tool-Supplied Annotations -//------------------------------------------------------------------------------ - -// TS_UNCHECKED should be placed around lock expressions that are not valid -// C++ syntax, but which are present for documentation purposes. These -// annotations will be ignored by the analysis. -#define TS_UNCHECKED(x) "" - -// TS_FIXME is used to mark lock expressions that are not valid C++ syntax. -// It is used by automated tools to mark and disable invalid expressions. -// The annotation should either be fixed, or changed to TS_UNCHECKED. -#define TS_FIXME(x) "" - -// Like NO_THREAD_SAFETY_ANALYSIS, this turns off checking within the body of -// a particular function. However, this attribute is used to mark functions -// that are incorrect and need to be fixed. It is used by automated tools to -// avoid breaking the build when the analysis is updated. -// Code owners are expected to eventually fix the routine. -#define NO_THREAD_SAFETY_ANALYSIS_FIXME NO_THREAD_SAFETY_ANALYSIS - -// Similar to NO_THREAD_SAFETY_ANALYSIS_FIXME, this macro marks a GUARDED_BY -// annotation that needs to be fixed, because it is producing thread safety -// warning. It disables the GUARDED_BY. -#define GUARDED_BY_FIXME(x) - -// Disables warnings for a single read operation. This can be used to avoid -// warnings when it is known that the read is not actually involved in a race, -// but the compiler cannot confirm that. -#define TS_UNCHECKED_READ(x) thread_safety_analysis::ts_unchecked_read(x) - - -namespace thread_safety_analysis { - -// Takes a reference to a guarded data member, and returns an unguarded -// reference. -template -inline const T& ts_unchecked_read(const T& v) NO_THREAD_SAFETY_ANALYSIS { - return v; -} - -template -inline T& ts_unchecked_read(T& v) NO_THREAD_SAFETY_ANALYSIS { - return v; -} - -} // namespace thread_safety_analysis - -#endif // ABSL_BASE_INTERNAL_THREAD_ANNOTATIONS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/thread_identity.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/thread_identity.h deleted file mode 100644 index 659694b..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/thread_identity.h +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Each active thread has an ThreadIdentity that may represent the thread in -// various level interfaces. ThreadIdentity objects are never deallocated. -// When a thread terminates, its ThreadIdentity object may be reused for a -// thread created later. - -#ifndef ABSL_BASE_INTERNAL_THREAD_IDENTITY_H_ -#define ABSL_BASE_INTERNAL_THREAD_IDENTITY_H_ - -#ifndef _WIN32 -#include -// Defines __GOOGLE_GRTE_VERSION__ (via glibc-specific features.h) when -// supported. -#include -#endif - -#include -#include - -#include "absl/base/config.h" -#include "absl/base/internal/per_thread_tls.h" -#include "absl/base/optimization.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -struct SynchLocksHeld; -struct SynchWaitParams; - -namespace base_internal { - -class SpinLock; -struct ThreadIdentity; - -// Used by the implementation of absl::Mutex and absl::CondVar. -struct PerThreadSynch { - // The internal representation of absl::Mutex and absl::CondVar rely - // on the alignment of PerThreadSynch. Both store the address of the - // PerThreadSynch in the high-order bits of their internal state, - // which means the low kLowZeroBits of the address of PerThreadSynch - // must be zero. - static constexpr int kLowZeroBits = 8; - static constexpr int kAlignment = 1 << kLowZeroBits; - - // Returns the associated ThreadIdentity. - // This can be implemented as a cast because we guarantee - // PerThreadSynch is the first element of ThreadIdentity. - ThreadIdentity* thread_identity() { - return reinterpret_cast(this); - } - - PerThreadSynch *next; // Circular waiter queue; initialized to 0. - PerThreadSynch *skip; // If non-zero, all entries in Mutex queue - // up to and including "skip" have same - // condition as this, and will be woken later - bool may_skip; // if false while on mutex queue, a mutex unlocker - // is using this PerThreadSynch as a terminator. Its - // skip field must not be filled in because the loop - // might then skip over the terminator. - bool wake; // This thread is to be woken from a Mutex. - // If "x" is on a waiter list for a mutex, "x->cond_waiter" is true iff the - // waiter is waiting on the mutex as part of a CV Wait or Mutex Await. - // - // The value of "x->cond_waiter" is meaningless if "x" is not on a - // Mutex waiter list. - bool cond_waiter; - bool maybe_unlocking; // Valid at head of Mutex waiter queue; - // true if UnlockSlow could be searching - // for a waiter to wake. Used for an optimization - // in Enqueue(). true is always a valid value. - // Can be reset to false when the unlocker or any - // writer releases the lock, or a reader fully - // releases the lock. It may not be set to false - // by a reader that decrements the count to - // non-zero. protected by mutex spinlock - bool suppress_fatal_errors; // If true, try to proceed even in the face - // of broken invariants. This is used within - // fatal signal handlers to improve the - // chances of debug logging information being - // output successfully. - int priority; // Priority of thread (updated every so often). - - // State values: - // kAvailable: This PerThreadSynch is available. - // kQueued: This PerThreadSynch is unavailable, it's currently queued on a - // Mutex or CondVar waistlist. - // - // Transitions from kQueued to kAvailable require a release - // barrier. This is needed as a waiter may use "state" to - // independently observe that it's no longer queued. - // - // Transitions from kAvailable to kQueued require no barrier, they - // are externally ordered by the Mutex. - enum State { - kAvailable, - kQueued - }; - std::atomic state; - - // The wait parameters of the current wait. waitp is null if the - // thread is not waiting. Transitions from null to non-null must - // occur before the enqueue commit point (state = kQueued in - // Enqueue() and CondVarEnqueue()). Transitions from non-null to - // null must occur after the wait is finished (state = kAvailable in - // Mutex::Block() and CondVar::WaitCommon()). This field may be - // changed only by the thread that describes this PerThreadSynch. A - // special case is Fer(), which calls Enqueue() on another thread, - // but with an identical SynchWaitParams pointer, thus leaving the - // pointer unchanged. - SynchWaitParams* waitp; - - intptr_t readers; // Number of readers in mutex. - - // When priority will next be read (cycles). - int64_t next_priority_read_cycles; - - // Locks held; used during deadlock detection. - // Allocated in Synch_GetAllLocks() and freed in ReclaimThreadIdentity(). - SynchLocksHeld *all_locks; -}; - -// The instances of this class are allocated in NewThreadIdentity() with an -// alignment of PerThreadSynch::kAlignment. -struct ThreadIdentity { - // Must be the first member. The Mutex implementation requires that - // the PerThreadSynch object associated with each thread is - // PerThreadSynch::kAlignment aligned. We provide this alignment on - // ThreadIdentity itself. - PerThreadSynch per_thread_synch; - - // Private: Reserved for absl::synchronization_internal::Waiter. - struct WaiterState { - alignas(void*) char data[128]; - } waiter_state; - - // Used by PerThreadSem::{Get,Set}ThreadBlockedCounter(). - std::atomic* blocked_count_ptr; - - // The following variables are mostly read/written just by the - // thread itself. The only exception is that these are read by - // a ticker thread as a hint. - std::atomic ticker; // Tick counter, incremented once per second. - std::atomic wait_start; // Ticker value when thread started waiting. - std::atomic is_idle; // Has thread become idle yet? - - ThreadIdentity* next; -}; - -// Returns the ThreadIdentity object representing the calling thread; guaranteed -// to be unique for its lifetime. The returned object will remain valid for the -// program's lifetime; although it may be re-assigned to a subsequent thread. -// If one does not exist, return nullptr instead. -// -// Does not malloc(*), and is async-signal safe. -// [*] Technically pthread_setspecific() does malloc on first use; however this -// is handled internally within tcmalloc's initialization already. -// -// New ThreadIdentity objects can be constructed and associated with a thread -// by calling GetOrCreateCurrentThreadIdentity() in per-thread-sem.h. -ThreadIdentity* CurrentThreadIdentityIfPresent(); - -using ThreadIdentityReclaimerFunction = void (*)(void*); - -// Sets the current thread identity to the given value. 'reclaimer' is a -// pointer to the global function for cleaning up instances on thread -// destruction. -void SetCurrentThreadIdentity(ThreadIdentity* identity, - ThreadIdentityReclaimerFunction reclaimer); - -// Removes the currently associated ThreadIdentity from the running thread. -// This must be called from inside the ThreadIdentityReclaimerFunction, and only -// from that function. -void ClearCurrentThreadIdentity(); - -// May be chosen at compile time via: -DABSL_FORCE_THREAD_IDENTITY_MODE= -#ifdef ABSL_THREAD_IDENTITY_MODE_USE_POSIX_SETSPECIFIC -#error ABSL_THREAD_IDENTITY_MODE_USE_POSIX_SETSPECIFIC cannot be directly set -#else -#define ABSL_THREAD_IDENTITY_MODE_USE_POSIX_SETSPECIFIC 0 -#endif - -#ifdef ABSL_THREAD_IDENTITY_MODE_USE_TLS -#error ABSL_THREAD_IDENTITY_MODE_USE_TLS cannot be directly set -#else -#define ABSL_THREAD_IDENTITY_MODE_USE_TLS 1 -#endif - -#ifdef ABSL_THREAD_IDENTITY_MODE_USE_CPP11 -#error ABSL_THREAD_IDENTITY_MODE_USE_CPP11 cannot be directly set -#else -#define ABSL_THREAD_IDENTITY_MODE_USE_CPP11 2 -#endif - -#ifdef ABSL_THREAD_IDENTITY_MODE -#error ABSL_THREAD_IDENTITY_MODE cannot be directly set -#elif defined(ABSL_FORCE_THREAD_IDENTITY_MODE) -#define ABSL_THREAD_IDENTITY_MODE ABSL_FORCE_THREAD_IDENTITY_MODE -#elif defined(_WIN32) && !defined(__MINGW32__) -#define ABSL_THREAD_IDENTITY_MODE ABSL_THREAD_IDENTITY_MODE_USE_CPP11 -#elif defined(__APPLE__) && defined(ABSL_HAVE_THREAD_LOCAL) -#define ABSL_THREAD_IDENTITY_MODE ABSL_THREAD_IDENTITY_MODE_USE_CPP11 -#elif ABSL_PER_THREAD_TLS && defined(__GOOGLE_GRTE_VERSION__) && \ - (__GOOGLE_GRTE_VERSION__ >= 20140228L) -// Support for async-safe TLS was specifically added in GRTEv4. It's not -// present in the upstream eglibc. -// Note: Current default for production systems. -#define ABSL_THREAD_IDENTITY_MODE ABSL_THREAD_IDENTITY_MODE_USE_TLS -#else -#define ABSL_THREAD_IDENTITY_MODE \ - ABSL_THREAD_IDENTITY_MODE_USE_POSIX_SETSPECIFIC -#endif - -#if ABSL_THREAD_IDENTITY_MODE == ABSL_THREAD_IDENTITY_MODE_USE_TLS || \ - ABSL_THREAD_IDENTITY_MODE == ABSL_THREAD_IDENTITY_MODE_USE_CPP11 - -#if ABSL_PER_THREAD_TLS -ABSL_CONST_INIT extern ABSL_PER_THREAD_TLS_KEYWORD ThreadIdentity* - thread_identity_ptr; -#elif defined(ABSL_HAVE_THREAD_LOCAL) -ABSL_CONST_INIT extern thread_local ThreadIdentity* thread_identity_ptr; -#else -#error Thread-local storage not detected on this platform -#endif - -// thread_local variables cannot be in headers exposed by DLLs or in certain -// build configurations on Apple platforms. However, it is important for -// performance reasons in general that `CurrentThreadIdentityIfPresent` be -// inlined. In the other cases we opt to have the function not be inlined. Note -// that `CurrentThreadIdentityIfPresent` is declared above so we can exclude -// this entire inline definition. -#if !defined(__APPLE__) && !defined(ABSL_BUILD_DLL) && \ - !defined(ABSL_CONSUME_DLL) -#define ABSL_INTERNAL_INLINE_CURRENT_THREAD_IDENTITY_IF_PRESENT 1 -#endif - -#ifdef ABSL_INTERNAL_INLINE_CURRENT_THREAD_IDENTITY_IF_PRESENT -inline ThreadIdentity* CurrentThreadIdentityIfPresent() { - return thread_identity_ptr; -} -#endif - -#elif ABSL_THREAD_IDENTITY_MODE != \ - ABSL_THREAD_IDENTITY_MODE_USE_POSIX_SETSPECIFIC -#error Unknown ABSL_THREAD_IDENTITY_MODE -#endif - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_THREAD_IDENTITY_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/throw_delegate.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/throw_delegate.h deleted file mode 100644 index 075f527..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/throw_delegate.h +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef ABSL_BASE_INTERNAL_THROW_DELEGATE_H_ -#define ABSL_BASE_INTERNAL_THROW_DELEGATE_H_ - -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// Helper functions that allow throwing exceptions consistently from anywhere. -// The main use case is for header-based libraries (eg templates), as they will -// be built by many different targets with their own compiler options. -// In particular, this will allow a safe way to throw exceptions even if the -// caller is compiled with -fno-exceptions. This is intended for implementing -// things like map<>::at(), which the standard documents as throwing an -// exception on error. -// -// Using other techniques like #if tricks could lead to ODR violations. -// -// You shouldn't use it unless you're writing code that you know will be built -// both with and without exceptions and you need to conform to an interface -// that uses exceptions. - -[[noreturn]] void ThrowStdLogicError(const std::string& what_arg); -[[noreturn]] void ThrowStdLogicError(const char* what_arg); -[[noreturn]] void ThrowStdInvalidArgument(const std::string& what_arg); -[[noreturn]] void ThrowStdInvalidArgument(const char* what_arg); -[[noreturn]] void ThrowStdDomainError(const std::string& what_arg); -[[noreturn]] void ThrowStdDomainError(const char* what_arg); -[[noreturn]] void ThrowStdLengthError(const std::string& what_arg); -[[noreturn]] void ThrowStdLengthError(const char* what_arg); -[[noreturn]] void ThrowStdOutOfRange(const std::string& what_arg); -[[noreturn]] void ThrowStdOutOfRange(const char* what_arg); -[[noreturn]] void ThrowStdRuntimeError(const std::string& what_arg); -[[noreturn]] void ThrowStdRuntimeError(const char* what_arg); -[[noreturn]] void ThrowStdRangeError(const std::string& what_arg); -[[noreturn]] void ThrowStdRangeError(const char* what_arg); -[[noreturn]] void ThrowStdOverflowError(const std::string& what_arg); -[[noreturn]] void ThrowStdOverflowError(const char* what_arg); -[[noreturn]] void ThrowStdUnderflowError(const std::string& what_arg); -[[noreturn]] void ThrowStdUnderflowError(const char* what_arg); - -[[noreturn]] void ThrowStdBadFunctionCall(); -[[noreturn]] void ThrowStdBadAlloc(); - -// ThrowStdBadArrayNewLength() cannot be consistently supported because -// std::bad_array_new_length is missing in libstdc++ until 4.9.0. -// https://gcc.gnu.org/onlinedocs/gcc-4.8.3/libstdc++/api/a01379_source.html -// https://gcc.gnu.org/onlinedocs/gcc-4.9.0/libstdc++/api/a01327_source.html -// libcxx (as of 3.2) and msvc (as of 2015) both have it. -// [[noreturn]] void ThrowStdBadArrayNewLength(); - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_INTERNAL_THROW_DELEGATE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/tsan_mutex_interface.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/tsan_mutex_interface.h deleted file mode 100644 index 39207d8..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/tsan_mutex_interface.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file is intended solely for spinlock.h. -// It provides ThreadSanitizer annotations for custom mutexes. -// See for meaning of these annotations. - -#ifndef ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_ -#define ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_ - -#include "absl/base/config.h" - -// ABSL_INTERNAL_HAVE_TSAN_INTERFACE -// Macro intended only for internal use. -// -// Checks whether LLVM Thread Sanitizer interfaces are available. -// First made available in LLVM 5.0 (Sep 2017). -#ifdef ABSL_INTERNAL_HAVE_TSAN_INTERFACE -#error "ABSL_INTERNAL_HAVE_TSAN_INTERFACE cannot be directly set." -#endif - -#if defined(ABSL_HAVE_THREAD_SANITIZER) && defined(__has_include) -#if __has_include() -#define ABSL_INTERNAL_HAVE_TSAN_INTERFACE 1 -#endif -#endif - -#ifdef ABSL_INTERNAL_HAVE_TSAN_INTERFACE -#include - -#define ABSL_TSAN_MUTEX_CREATE __tsan_mutex_create -#define ABSL_TSAN_MUTEX_DESTROY __tsan_mutex_destroy -#define ABSL_TSAN_MUTEX_PRE_LOCK __tsan_mutex_pre_lock -#define ABSL_TSAN_MUTEX_POST_LOCK __tsan_mutex_post_lock -#define ABSL_TSAN_MUTEX_PRE_UNLOCK __tsan_mutex_pre_unlock -#define ABSL_TSAN_MUTEX_POST_UNLOCK __tsan_mutex_post_unlock -#define ABSL_TSAN_MUTEX_PRE_SIGNAL __tsan_mutex_pre_signal -#define ABSL_TSAN_MUTEX_POST_SIGNAL __tsan_mutex_post_signal -#define ABSL_TSAN_MUTEX_PRE_DIVERT __tsan_mutex_pre_divert -#define ABSL_TSAN_MUTEX_POST_DIVERT __tsan_mutex_post_divert - -#else - -#define ABSL_TSAN_MUTEX_CREATE(...) -#define ABSL_TSAN_MUTEX_DESTROY(...) -#define ABSL_TSAN_MUTEX_PRE_LOCK(...) -#define ABSL_TSAN_MUTEX_POST_LOCK(...) -#define ABSL_TSAN_MUTEX_PRE_UNLOCK(...) -#define ABSL_TSAN_MUTEX_POST_UNLOCK(...) -#define ABSL_TSAN_MUTEX_PRE_SIGNAL(...) -#define ABSL_TSAN_MUTEX_POST_SIGNAL(...) -#define ABSL_TSAN_MUTEX_PRE_DIVERT(...) -#define ABSL_TSAN_MUTEX_POST_DIVERT(...) - -#endif - -#endif // ABSL_BASE_INTERNAL_TSAN_MUTEX_INTERFACE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/unaligned_access.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/unaligned_access.h deleted file mode 100644 index 093dd9b..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/unaligned_access.h +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#ifndef ABSL_BASE_INTERNAL_UNALIGNED_ACCESS_H_ -#define ABSL_BASE_INTERNAL_UNALIGNED_ACCESS_H_ - -#include - -#include - -#include "absl/base/attributes.h" -#include "absl/base/config.h" - -// unaligned APIs - -// Portable handling of unaligned loads, stores, and copies. - -// The unaligned API is C++ only. The declarations use C++ features -// (namespaces, inline) which are absent or incompatible in C. -#if defined(__cplusplus) -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -inline uint16_t UnalignedLoad16(const void *p) { - uint16_t t; - memcpy(&t, p, sizeof t); - return t; -} - -inline uint32_t UnalignedLoad32(const void *p) { - uint32_t t; - memcpy(&t, p, sizeof t); - return t; -} - -inline uint64_t UnalignedLoad64(const void *p) { - uint64_t t; - memcpy(&t, p, sizeof t); - return t; -} - -inline void UnalignedStore16(void *p, uint16_t v) { memcpy(p, &v, sizeof v); } - -inline void UnalignedStore32(void *p, uint32_t v) { memcpy(p, &v, sizeof v); } - -inline void UnalignedStore64(void *p, uint64_t v) { memcpy(p, &v, sizeof v); } - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#define ABSL_INTERNAL_UNALIGNED_LOAD16(_p) \ - (absl::base_internal::UnalignedLoad16(_p)) -#define ABSL_INTERNAL_UNALIGNED_LOAD32(_p) \ - (absl::base_internal::UnalignedLoad32(_p)) -#define ABSL_INTERNAL_UNALIGNED_LOAD64(_p) \ - (absl::base_internal::UnalignedLoad64(_p)) - -#define ABSL_INTERNAL_UNALIGNED_STORE16(_p, _val) \ - (absl::base_internal::UnalignedStore16(_p, _val)) -#define ABSL_INTERNAL_UNALIGNED_STORE32(_p, _val) \ - (absl::base_internal::UnalignedStore32(_p, _val)) -#define ABSL_INTERNAL_UNALIGNED_STORE64(_p, _val) \ - (absl::base_internal::UnalignedStore64(_p, _val)) - -#endif // defined(__cplusplus), end of unaligned API - -#endif // ABSL_BASE_INTERNAL_UNALIGNED_ACCESS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/unscaledcycleclock.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/unscaledcycleclock.h deleted file mode 100644 index 2cbeae3..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/internal/unscaledcycleclock.h +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// UnscaledCycleClock -// An UnscaledCycleClock yields the value and frequency of a cycle counter -// that increments at a rate that is approximately constant. -// This class is for internal use only, you should consider using CycleClock -// instead. -// -// Notes: -// The cycle counter frequency is not necessarily the core clock frequency. -// That is, CycleCounter cycles are not necessarily "CPU cycles". -// -// An arbitrary offset may have been added to the counter at power on. -// -// On some platforms, the rate and offset of the counter may differ -// slightly when read from different CPUs of a multiprocessor. Usually, -// we try to ensure that the operating system adjusts values periodically -// so that values agree approximately. If you need stronger guarantees, -// consider using alternate interfaces. -// -// The CPU is not required to maintain the ordering of a cycle counter read -// with respect to surrounding instructions. - -#ifndef ABSL_BASE_INTERNAL_UNSCALEDCYCLECLOCK_H_ -#define ABSL_BASE_INTERNAL_UNSCALEDCYCLECLOCK_H_ - -#include - -#if defined(__APPLE__) -#include -#endif - -#include "absl/base/port.h" - -// The following platforms have an implementation of a hardware counter. -#if defined(__i386__) || defined(__x86_64__) || defined(__aarch64__) || \ - defined(__powerpc__) || defined(__ppc__) || defined(__riscv) || \ - defined(_M_IX86) || (defined(_M_X64) && !defined(_M_ARM64EC)) -#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 1 -#else -#define ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION 0 -#endif - -// The following platforms often disable access to the hardware -// counter (through a sandbox) even if the underlying hardware has a -// usable counter. The CycleTimer interface also requires a *scaled* -// CycleClock that runs at atleast 1 MHz. We've found some Android -// ARM64 devices where this is not the case, so we disable it by -// default on Android ARM64. -#if defined(__native_client__) || (defined(__APPLE__)) || \ - (defined(__ANDROID__) && defined(__aarch64__)) -#define ABSL_USE_UNSCALED_CYCLECLOCK_DEFAULT 0 -#else -#define ABSL_USE_UNSCALED_CYCLECLOCK_DEFAULT 1 -#endif - -// UnscaledCycleClock is an optional internal feature. -// Use "#if ABSL_USE_UNSCALED_CYCLECLOCK" to test for its presence. -// Can be overridden at compile-time via -DABSL_USE_UNSCALED_CYCLECLOCK=0|1 -#if !defined(ABSL_USE_UNSCALED_CYCLECLOCK) -#define ABSL_USE_UNSCALED_CYCLECLOCK \ - (ABSL_HAVE_UNSCALED_CYCLECLOCK_IMPLEMENTATION && \ - ABSL_USE_UNSCALED_CYCLECLOCK_DEFAULT) -#endif - -#if ABSL_USE_UNSCALED_CYCLECLOCK - -// This macro can be used to test if UnscaledCycleClock::Frequency() -// is NominalCPUFrequency() on a particular platform. -#if (defined(__i386__) || defined(__x86_64__) || defined(__riscv) || \ - defined(_M_IX86) || defined(_M_X64)) -#define ABSL_INTERNAL_UNSCALED_CYCLECLOCK_FREQUENCY_IS_CPU_FREQUENCY -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace time_internal { -class UnscaledCycleClockWrapperForGetCurrentTime; -} // namespace time_internal - -namespace base_internal { -class CycleClock; -class UnscaledCycleClockWrapperForInitializeFrequency; - -class UnscaledCycleClock { - private: - UnscaledCycleClock() = delete; - - // Return the value of a cycle counter that counts at a rate that is - // approximately constant. - static int64_t Now(); - - // Return the how much UnscaledCycleClock::Now() increases per second. - // This is not necessarily the core CPU clock frequency. - // It may be the nominal value report by the kernel, rather than a measured - // value. - static double Frequency(); - - // Allowed users - friend class base_internal::CycleClock; - friend class time_internal::UnscaledCycleClockWrapperForGetCurrentTime; - friend class base_internal::UnscaledCycleClockWrapperForInitializeFrequency; -}; - -#if defined(__x86_64__) - -inline int64_t UnscaledCycleClock::Now() { - uint64_t low, high; - __asm__ volatile("rdtsc" : "=a"(low), "=d"(high)); - return (high << 32) | low; -} - -#endif - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_USE_UNSCALED_CYCLECLOCK - -#endif // ABSL_BASE_INTERNAL_UNSCALEDCYCLECLOCK_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/log_severity.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/log_severity.h deleted file mode 100644 index 8bdca38..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/log_severity.h +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_BASE_LOG_SEVERITY_H_ -#define ABSL_BASE_LOG_SEVERITY_H_ - -#include -#include - -#include "absl/base/attributes.h" -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// absl::LogSeverity -// -// Four severity levels are defined. Logging APIs should terminate the program -// when a message is logged at severity `kFatal`; the other levels have no -// special semantics. -// -// Values other than the four defined levels (e.g. produced by `static_cast`) -// are valid, but their semantics when passed to a function, macro, or flag -// depend on the function, macro, or flag. The usual behavior is to normalize -// such values to a defined severity level, however in some cases values other -// than the defined levels are useful for comparison. -// -// Example: -// -// // Effectively disables all logging: -// SetMinLogLevel(static_cast(100)); -// -// Abseil flags may be defined with type `LogSeverity`. Dependency layering -// constraints require that the `AbslParseFlag()` overload be declared and -// defined in the flags library itself rather than here. The `AbslUnparseFlag()` -// overload is defined there as well for consistency. -// -// absl::LogSeverity Flag String Representation -// -// An `absl::LogSeverity` has a string representation used for parsing -// command-line flags based on the enumerator name (e.g. `kFatal`) or -// its unprefixed name (without the `k`) in any case-insensitive form. (E.g. -// "FATAL", "fatal" or "Fatal" are all valid.) Unparsing such flags produces an -// unprefixed string representation in all caps (e.g. "FATAL") or an integer. -// -// Additionally, the parser accepts arbitrary integers (as if the type were -// `int`). -// -// Examples: -// -// --my_log_level=kInfo -// --my_log_level=INFO -// --my_log_level=info -// --my_log_level=0 -// -// Unparsing a flag produces the same result as `absl::LogSeverityName()` for -// the standard levels and a base-ten integer otherwise. -enum class LogSeverity : int { - kInfo = 0, - kWarning = 1, - kError = 2, - kFatal = 3, -}; - -// LogSeverities() -// -// Returns an iterable of all standard `absl::LogSeverity` values, ordered from -// least to most severe. -constexpr std::array LogSeverities() { - return {{absl::LogSeverity::kInfo, absl::LogSeverity::kWarning, - absl::LogSeverity::kError, absl::LogSeverity::kFatal}}; -} - -// LogSeverityName() -// -// Returns the all-caps string representation (e.g. "INFO") of the specified -// severity level if it is one of the standard levels and "UNKNOWN" otherwise. -constexpr const char* LogSeverityName(absl::LogSeverity s) { - return s == absl::LogSeverity::kInfo - ? "INFO" - : s == absl::LogSeverity::kWarning - ? "WARNING" - : s == absl::LogSeverity::kError - ? "ERROR" - : s == absl::LogSeverity::kFatal ? "FATAL" : "UNKNOWN"; -} - -// NormalizeLogSeverity() -// -// Values less than `kInfo` normalize to `kInfo`; values greater than `kFatal` -// normalize to `kError` (**NOT** `kFatal`). -constexpr absl::LogSeverity NormalizeLogSeverity(absl::LogSeverity s) { - return s < absl::LogSeverity::kInfo - ? absl::LogSeverity::kInfo - : s > absl::LogSeverity::kFatal ? absl::LogSeverity::kError : s; -} -constexpr absl::LogSeverity NormalizeLogSeverity(int s) { - return absl::NormalizeLogSeverity(static_cast(s)); -} - -// operator<< -// -// The exact representation of a streamed `absl::LogSeverity` is deliberately -// unspecified; do not rely on it. -std::ostream& operator<<(std::ostream& os, absl::LogSeverity s); - -// Enums representing a lower bound for LogSeverity. APIs that only operate on -// messages of at least a certain level (for example, `SetMinLogLevel()`) use -// this type to specify that level. absl::LogSeverityAtLeast::kInfinity is -// a level above all threshold levels and therefore no log message will -// ever meet this threshold. -enum class LogSeverityAtLeast : int { - kInfo = static_cast(absl::LogSeverity::kInfo), - kWarning = static_cast(absl::LogSeverity::kWarning), - kError = static_cast(absl::LogSeverity::kError), - kFatal = static_cast(absl::LogSeverity::kFatal), - kInfinity = 1000, -}; - -std::ostream& operator<<(std::ostream& os, absl::LogSeverityAtLeast s); - -// Enums representing an upper bound for LogSeverity. APIs that only operate on -// messages of at most a certain level (for example, buffer all messages at or -// below a certain level) use this type to specify that level. -// absl::LogSeverityAtMost::kNegativeInfinity is a level below all threshold -// levels and therefore will exclude all log messages. -enum class LogSeverityAtMost : int { - kNegativeInfinity = -1000, - kInfo = static_cast(absl::LogSeverity::kInfo), - kWarning = static_cast(absl::LogSeverity::kWarning), - kError = static_cast(absl::LogSeverity::kError), - kFatal = static_cast(absl::LogSeverity::kFatal), -}; - -std::ostream& operator<<(std::ostream& os, absl::LogSeverityAtMost s); - -#define COMPOP(op1, op2, T) \ - constexpr bool operator op1(absl::T lhs, absl::LogSeverity rhs) { \ - return static_cast(lhs) op1 rhs; \ - } \ - constexpr bool operator op2(absl::LogSeverity lhs, absl::T rhs) { \ - return lhs op2 static_cast(rhs); \ - } - -// Comparisons between `LogSeverity` and `LogSeverityAtLeast`/ -// `LogSeverityAtMost` are only supported in one direction. -// Valid checks are: -// LogSeverity >= LogSeverityAtLeast -// LogSeverity < LogSeverityAtLeast -// LogSeverity <= LogSeverityAtMost -// LogSeverity > LogSeverityAtMost -COMPOP(>, <, LogSeverityAtLeast) -COMPOP(<=, >=, LogSeverityAtLeast) -COMPOP(<, >, LogSeverityAtMost) -COMPOP(>=, <=, LogSeverityAtMost) -#undef COMPOP - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_LOG_SEVERITY_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/macros.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/macros.h deleted file mode 100644 index 3e085a9..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/macros.h +++ /dev/null @@ -1,158 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: macros.h -// ----------------------------------------------------------------------------- -// -// This header file defines the set of language macros used within Abseil code. -// For the set of macros used to determine supported compilers and platforms, -// see absl/base/config.h instead. -// -// This code is compiled directly on many platforms, including client -// platforms like Windows, Mac, and embedded systems. Before making -// any changes here, make sure that you're not breaking any platforms. - -#ifndef ABSL_BASE_MACROS_H_ -#define ABSL_BASE_MACROS_H_ - -#include -#include - -#include "absl/base/attributes.h" -#include "absl/base/config.h" -#include "absl/base/optimization.h" -#include "absl/base/port.h" - -// ABSL_ARRAYSIZE() -// -// Returns the number of elements in an array as a compile-time constant, which -// can be used in defining new arrays. If you use this macro on a pointer by -// mistake, you will get a compile-time error. -#define ABSL_ARRAYSIZE(array) \ - (sizeof(::absl::macros_internal::ArraySizeHelper(array))) - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace macros_internal { -// Note: this internal template function declaration is used by ABSL_ARRAYSIZE. -// The function doesn't need a definition, as we only use its type. -template -auto ArraySizeHelper(const T (&array)[N]) -> char (&)[N]; -} // namespace macros_internal -ABSL_NAMESPACE_END -} // namespace absl - -// ABSL_BAD_CALL_IF() -// -// Used on a function overload to trap bad calls: any call that matches the -// overload will cause a compile-time error. This macro uses a clang-specific -// "enable_if" attribute, as described at -// https://clang.llvm.org/docs/AttributeReference.html#enable-if -// -// Overloads which use this macro should be bracketed by -// `#ifdef ABSL_BAD_CALL_IF`. -// -// Example: -// -// int isdigit(int c); -// #ifdef ABSL_BAD_CALL_IF -// int isdigit(int c) -// ABSL_BAD_CALL_IF(c <= -1 || c > 255, -// "'c' must have the value of an unsigned char or EOF"); -// #endif // ABSL_BAD_CALL_IF -#if ABSL_HAVE_ATTRIBUTE(enable_if) -#define ABSL_BAD_CALL_IF(expr, msg) \ - __attribute__((enable_if(expr, "Bad call trap"), unavailable(msg))) -#endif - -// ABSL_ASSERT() -// -// In C++11, `assert` can't be used portably within constexpr functions. -// ABSL_ASSERT functions as a runtime assert but works in C++11 constexpr -// functions. Example: -// -// constexpr double Divide(double a, double b) { -// return ABSL_ASSERT(b != 0), a / b; -// } -// -// This macro is inspired by -// https://akrzemi1.wordpress.com/2017/05/18/asserts-in-constexpr-functions/ -#if defined(NDEBUG) -#define ABSL_ASSERT(expr) \ - (false ? static_cast(expr) : static_cast(0)) -#else -#define ABSL_ASSERT(expr) \ - (ABSL_PREDICT_TRUE((expr)) ? static_cast(0) \ - : [] { assert(false && #expr); }()) // NOLINT -#endif - -// `ABSL_INTERNAL_HARDENING_ABORT()` controls how `ABSL_HARDENING_ASSERT()` -// aborts the program in release mode (when NDEBUG is defined). The -// implementation should abort the program as quickly as possible and ideally it -// should not be possible to ignore the abort request. -#if (ABSL_HAVE_BUILTIN(__builtin_trap) && \ - ABSL_HAVE_BUILTIN(__builtin_unreachable)) || \ - (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_INTERNAL_HARDENING_ABORT() \ - do { \ - __builtin_trap(); \ - __builtin_unreachable(); \ - } while (false) -#else -#define ABSL_INTERNAL_HARDENING_ABORT() abort() -#endif - -// ABSL_HARDENING_ASSERT() -// -// `ABSL_HARDENING_ASSERT()` is like `ABSL_ASSERT()`, but used to implement -// runtime assertions that should be enabled in hardened builds even when -// `NDEBUG` is defined. -// -// When `NDEBUG` is not defined, `ABSL_HARDENING_ASSERT()` is identical to -// `ABSL_ASSERT()`. -// -// See `ABSL_OPTION_HARDENED` in `absl/base/options.h` for more information on -// hardened mode. -#if ABSL_OPTION_HARDENED == 1 && defined(NDEBUG) -#define ABSL_HARDENING_ASSERT(expr) \ - (ABSL_PREDICT_TRUE((expr)) ? static_cast(0) \ - : [] { ABSL_INTERNAL_HARDENING_ABORT(); }()) -#else -#define ABSL_HARDENING_ASSERT(expr) ABSL_ASSERT(expr) -#endif - -#ifdef ABSL_HAVE_EXCEPTIONS -#define ABSL_INTERNAL_TRY try -#define ABSL_INTERNAL_CATCH_ANY catch (...) -#define ABSL_INTERNAL_RETHROW do { throw; } while (false) -#else // ABSL_HAVE_EXCEPTIONS -#define ABSL_INTERNAL_TRY if (true) -#define ABSL_INTERNAL_CATCH_ANY else if (false) -#define ABSL_INTERNAL_RETHROW do {} while (false) -#endif // ABSL_HAVE_EXCEPTIONS - -// `ABSL_INTERNAL_UNREACHABLE` is an unreachable statement. A program which -// reaches one has undefined behavior, and the compiler may optimize -// accordingly. -#if defined(__GNUC__) || ABSL_HAVE_BUILTIN(__builtin_unreachable) -#define ABSL_INTERNAL_UNREACHABLE __builtin_unreachable() -#elif defined(_MSC_VER) -#define ABSL_INTERNAL_UNREACHABLE __assume(0) -#else -#define ABSL_INTERNAL_UNREACHABLE -#endif - -#endif // ABSL_BASE_MACROS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/optimization.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/optimization.h deleted file mode 100644 index db5cc09..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/optimization.h +++ /dev/null @@ -1,252 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: optimization.h -// ----------------------------------------------------------------------------- -// -// This header file defines portable macros for performance optimization. - -#ifndef ABSL_BASE_OPTIMIZATION_H_ -#define ABSL_BASE_OPTIMIZATION_H_ - -#include - -#include "absl/base/config.h" - -// ABSL_BLOCK_TAIL_CALL_OPTIMIZATION -// -// Instructs the compiler to avoid optimizing tail-call recursion. This macro is -// useful when you wish to preserve the existing function order within a stack -// trace for logging, debugging, or profiling purposes. -// -// Example: -// -// int f() { -// int result = g(); -// ABSL_BLOCK_TAIL_CALL_OPTIMIZATION(); -// return result; -// } -#if defined(__pnacl__) -#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() if (volatile int x = 0) { (void)x; } -#elif defined(__clang__) -// Clang will not tail call given inline volatile assembly. -#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("") -#elif defined(__GNUC__) -// GCC will not tail call given inline volatile assembly. -#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __asm__ __volatile__("") -#elif defined(_MSC_VER) -#include -// The __nop() intrinsic blocks the optimisation. -#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() __nop() -#else -#define ABSL_BLOCK_TAIL_CALL_OPTIMIZATION() if (volatile int x = 0) { (void)x; } -#endif - -// ABSL_CACHELINE_SIZE -// -// Explicitly defines the size of the L1 cache for purposes of alignment. -// Setting the cacheline size allows you to specify that certain objects be -// aligned on a cacheline boundary with `ABSL_CACHELINE_ALIGNED` declarations. -// (See below.) -// -// NOTE: this macro should be replaced with the following C++17 features, when -// those are generally available: -// -// * `std::hardware_constructive_interference_size` -// * `std::hardware_destructive_interference_size` -// -// See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html -// for more information. -#if defined(__GNUC__) -// Cache line alignment -#if defined(__i386__) || defined(__x86_64__) -#define ABSL_CACHELINE_SIZE 64 -#elif defined(__powerpc64__) -#define ABSL_CACHELINE_SIZE 128 -#elif defined(__aarch64__) -// We would need to read special register ctr_el0 to find out L1 dcache size. -// This value is a good estimate based on a real aarch64 machine. -#define ABSL_CACHELINE_SIZE 64 -#elif defined(__arm__) -// Cache line sizes for ARM: These values are not strictly correct since -// cache line sizes depend on implementations, not architectures. There -// are even implementations with cache line sizes configurable at boot -// time. -#if defined(__ARM_ARCH_5T__) -#define ABSL_CACHELINE_SIZE 32 -#elif defined(__ARM_ARCH_7A__) -#define ABSL_CACHELINE_SIZE 64 -#endif -#endif - -#ifndef ABSL_CACHELINE_SIZE -// A reasonable default guess. Note that overestimates tend to waste more -// space, while underestimates tend to waste more time. -#define ABSL_CACHELINE_SIZE 64 -#endif - -// ABSL_CACHELINE_ALIGNED -// -// Indicates that the declared object be cache aligned using -// `ABSL_CACHELINE_SIZE` (see above). Cacheline aligning objects allows you to -// load a set of related objects in the L1 cache for performance improvements. -// Cacheline aligning objects properly allows constructive memory sharing and -// prevents destructive (or "false") memory sharing. -// -// NOTE: callers should replace uses of this macro with `alignas()` using -// `std::hardware_constructive_interference_size` and/or -// `std::hardware_destructive_interference_size` when C++17 becomes available to -// them. -// -// See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0154r1.html -// for more information. -// -// On some compilers, `ABSL_CACHELINE_ALIGNED` expands to an `__attribute__` -// or `__declspec` attribute. For compilers where this is not known to work, -// the macro expands to nothing. -// -// No further guarantees are made here. The result of applying the macro -// to variables and types is always implementation-defined. -// -// WARNING: It is easy to use this attribute incorrectly, even to the point -// of causing bugs that are difficult to diagnose, crash, etc. It does not -// of itself guarantee that objects are aligned to a cache line. -// -// NOTE: Some compilers are picky about the locations of annotations such as -// this attribute, so prefer to put it at the beginning of your declaration. -// For example, -// -// ABSL_CACHELINE_ALIGNED static Foo* foo = ... -// -// class ABSL_CACHELINE_ALIGNED Bar { ... -// -// Recommendations: -// -// 1) Consult compiler documentation; this comment is not kept in sync as -// toolchains evolve. -// 2) Verify your use has the intended effect. This often requires inspecting -// the generated machine code. -// 3) Prefer applying this attribute to individual variables. Avoid -// applying it to types. This tends to localize the effect. -#define ABSL_CACHELINE_ALIGNED __attribute__((aligned(ABSL_CACHELINE_SIZE))) -#elif defined(_MSC_VER) -#define ABSL_CACHELINE_SIZE 64 -#define ABSL_CACHELINE_ALIGNED __declspec(align(ABSL_CACHELINE_SIZE)) -#else -#define ABSL_CACHELINE_SIZE 64 -#define ABSL_CACHELINE_ALIGNED -#endif - -// ABSL_PREDICT_TRUE, ABSL_PREDICT_FALSE -// -// Enables the compiler to prioritize compilation using static analysis for -// likely paths within a boolean branch. -// -// Example: -// -// if (ABSL_PREDICT_TRUE(expression)) { -// return result; // Faster if more likely -// } else { -// return 0; -// } -// -// Compilers can use the information that a certain branch is not likely to be -// taken (for instance, a CHECK failure) to optimize for the common case in -// the absence of better information (ie. compiling gcc with `-fprofile-arcs`). -// -// Recommendation: Modern CPUs dynamically predict branch execution paths, -// typically with accuracy greater than 97%. As a result, annotating every -// branch in a codebase is likely counterproductive; however, annotating -// specific branches that are both hot and consistently mispredicted is likely -// to yield performance improvements. -#if ABSL_HAVE_BUILTIN(__builtin_expect) || \ - (defined(__GNUC__) && !defined(__clang__)) -#define ABSL_PREDICT_FALSE(x) (__builtin_expect(false || (x), false)) -#define ABSL_PREDICT_TRUE(x) (__builtin_expect(false || (x), true)) -#else -#define ABSL_PREDICT_FALSE(x) (x) -#define ABSL_PREDICT_TRUE(x) (x) -#endif - -// ABSL_ASSUME(cond) -// -// Informs the compiler that a condition is always true and that it can assume -// it to be true for optimization purposes. -// -// WARNING: If the condition is false, the program can produce undefined and -// potentially dangerous behavior. -// -// In !NDEBUG mode, the condition is checked with an assert(). -// -// NOTE: The expression must not have side effects, as it may only be evaluated -// in some compilation modes and not others. Some compilers may issue a warning -// if the compiler cannot prove the expression has no side effects. For example, -// the expression should not use a function call since the compiler cannot prove -// that a function call does not have side effects. -// -// Example: -// -// int x = ...; -// ABSL_ASSUME(x >= 0); -// // The compiler can optimize the division to a simple right shift using the -// // assumption specified above. -// int y = x / 16; -// -#if !defined(NDEBUG) -#define ABSL_ASSUME(cond) assert(cond) -#elif ABSL_HAVE_BUILTIN(__builtin_assume) -#define ABSL_ASSUME(cond) __builtin_assume(cond) -#elif defined(__GNUC__) || ABSL_HAVE_BUILTIN(__builtin_unreachable) -#define ABSL_ASSUME(cond) \ - do { \ - if (!(cond)) __builtin_unreachable(); \ - } while (0) -#elif defined(_MSC_VER) -#define ABSL_ASSUME(cond) __assume(cond) -#else -#define ABSL_ASSUME(cond) \ - do { \ - static_cast(false && (cond)); \ - } while (0) -#endif - -// ABSL_INTERNAL_UNIQUE_SMALL_NAME(cond) -// This macro forces small unique name on a static file level symbols like -// static local variables or static functions. This is intended to be used in -// macro definitions to optimize the cost of generated code. Do NOT use it on -// symbols exported from translation unit since it may cause a link time -// conflict. -// -// Example: -// -// #define MY_MACRO(txt) -// namespace { -// char VeryVeryLongVarName[] ABSL_INTERNAL_UNIQUE_SMALL_NAME() = txt; -// const char* VeryVeryLongFuncName() ABSL_INTERNAL_UNIQUE_SMALL_NAME(); -// const char* VeryVeryLongFuncName() { return txt; } -// } -// - -#if defined(__GNUC__) -#define ABSL_INTERNAL_UNIQUE_SMALL_NAME2(x) #x -#define ABSL_INTERNAL_UNIQUE_SMALL_NAME1(x) ABSL_INTERNAL_UNIQUE_SMALL_NAME2(x) -#define ABSL_INTERNAL_UNIQUE_SMALL_NAME() \ - asm(ABSL_INTERNAL_UNIQUE_SMALL_NAME1(.absl.__COUNTER__)) -#else -#define ABSL_INTERNAL_UNIQUE_SMALL_NAME() -#endif - -#endif // ABSL_BASE_OPTIMIZATION_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/options.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/options.h deleted file mode 100644 index bc59847..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/options.h +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright 2019 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: options.h -// ----------------------------------------------------------------------------- -// -// This file contains Abseil configuration options for setting specific -// implementations instead of letting Abseil determine which implementation to -// use at compile-time. Setting these options may be useful for package or build -// managers who wish to guarantee ABI stability within binary builds (which are -// otherwise difficult to enforce). -// -// *** IMPORTANT NOTICE FOR PACKAGE MANAGERS: It is important that -// maintainers of package managers who wish to package Abseil read and -// understand this file! *** -// -// Abseil contains a number of possible configuration endpoints, based on -// parameters such as the detected platform, language version, or command-line -// flags used to invoke the underlying binary. As is the case with all -// libraries, binaries which contain Abseil code must ensure that separate -// packages use the same compiled copy of Abseil to avoid a diamond dependency -// problem, which can occur if two packages built with different Abseil -// configuration settings are linked together. Diamond dependency problems in -// C++ may manifest as violations to the One Definition Rule (ODR) (resulting in -// linker errors), or undefined behavior (resulting in crashes). -// -// Diamond dependency problems can be avoided if all packages utilize the same -// exact version of Abseil. Building from source code with the same compilation -// parameters is the easiest way to avoid such dependency problems. However, for -// package managers who cannot control such compilation parameters, we are -// providing the file to allow you to inject ABI (Application Binary Interface) -// stability across builds. Settings options in this file will neither change -// API nor ABI, providing a stable copy of Abseil between packages. -// -// Care must be taken to keep options within these configurations isolated -// from any other dynamic settings, such as command-line flags which could alter -// these options. This file is provided specifically to help build and package -// managers provide a stable copy of Abseil within their libraries and binaries; -// other developers should not have need to alter the contents of this file. -// -// ----------------------------------------------------------------------------- -// Usage -// ----------------------------------------------------------------------------- -// -// For any particular package release, set the appropriate definitions within -// this file to whatever value makes the most sense for your package(s). Note -// that, by default, most of these options, at the moment, affect the -// implementation of types; future options may affect other implementation -// details. -// -// NOTE: the defaults within this file all assume that Abseil can select the -// proper Abseil implementation at compile-time, which will not be sufficient -// to guarantee ABI stability to package managers. - -#ifndef ABSL_BASE_OPTIONS_H_ -#define ABSL_BASE_OPTIONS_H_ - -// Include a standard library header to allow configuration based on the -// standard library in use. -#ifdef __cplusplus -#include -#endif - -// ----------------------------------------------------------------------------- -// Type Compatibility Options -// ----------------------------------------------------------------------------- -// -// ABSL_OPTION_USE_STD_ANY -// -// This option controls whether absl::any is implemented as an alias to -// std::any, or as an independent implementation. -// -// A value of 0 means to use Abseil's implementation. This requires only C++11 -// support, and is expected to work on every toolchain we support. -// -// A value of 1 means to use an alias to std::any. This requires that all code -// using Abseil is built in C++17 mode or later. -// -// A value of 2 means to detect the C++ version being used to compile Abseil, -// and use an alias only if a working std::any is available. This option is -// useful when you are building your entire program, including all of its -// dependencies, from source. It should not be used otherwise -- for example, -// if you are distributing Abseil in a binary package manager -- since in -// mode 2, absl::any will name a different type, with a different mangled name -// and binary layout, depending on the compiler flags passed by the end user. -// For more info, see https://abseil.io/about/design/dropin-types. -// -// User code should not inspect this macro. To check in the preprocessor if -// absl::any is a typedef of std::any, use the feature macro ABSL_USES_STD_ANY. - -#define ABSL_OPTION_USE_STD_ANY 2 - - -// ABSL_OPTION_USE_STD_OPTIONAL -// -// This option controls whether absl::optional is implemented as an alias to -// std::optional, or as an independent implementation. -// -// A value of 0 means to use Abseil's implementation. This requires only C++11 -// support, and is expected to work on every toolchain we support. -// -// A value of 1 means to use an alias to std::optional. This requires that all -// code using Abseil is built in C++17 mode or later. -// -// A value of 2 means to detect the C++ version being used to compile Abseil, -// and use an alias only if a working std::optional is available. This option -// is useful when you are building your program from source. It should not be -// used otherwise -- for example, if you are distributing Abseil in a binary -// package manager -- since in mode 2, absl::optional will name a different -// type, with a different mangled name and binary layout, depending on the -// compiler flags passed by the end user. For more info, see -// https://abseil.io/about/design/dropin-types. - -// User code should not inspect this macro. To check in the preprocessor if -// absl::optional is a typedef of std::optional, use the feature macro -// ABSL_USES_STD_OPTIONAL. - -#define ABSL_OPTION_USE_STD_OPTIONAL 2 - - -// ABSL_OPTION_USE_STD_STRING_VIEW -// -// This option controls whether absl::string_view is implemented as an alias to -// std::string_view, or as an independent implementation. -// -// A value of 0 means to use Abseil's implementation. This requires only C++11 -// support, and is expected to work on every toolchain we support. -// -// A value of 1 means to use an alias to std::string_view. This requires that -// all code using Abseil is built in C++17 mode or later. -// -// A value of 2 means to detect the C++ version being used to compile Abseil, -// and use an alias only if a working std::string_view is available. This -// option is useful when you are building your program from source. It should -// not be used otherwise -- for example, if you are distributing Abseil in a -// binary package manager -- since in mode 2, absl::string_view will name a -// different type, with a different mangled name and binary layout, depending on -// the compiler flags passed by the end user. For more info, see -// https://abseil.io/about/design/dropin-types. -// -// User code should not inspect this macro. To check in the preprocessor if -// absl::string_view is a typedef of std::string_view, use the feature macro -// ABSL_USES_STD_STRING_VIEW. - -#define ABSL_OPTION_USE_STD_STRING_VIEW 2 - -// ABSL_OPTION_USE_STD_VARIANT -// -// This option controls whether absl::variant is implemented as an alias to -// std::variant, or as an independent implementation. -// -// A value of 0 means to use Abseil's implementation. This requires only C++11 -// support, and is expected to work on every toolchain we support. -// -// A value of 1 means to use an alias to std::variant. This requires that all -// code using Abseil is built in C++17 mode or later. -// -// A value of 2 means to detect the C++ version being used to compile Abseil, -// and use an alias only if a working std::variant is available. This option -// is useful when you are building your program from source. It should not be -// used otherwise -- for example, if you are distributing Abseil in a binary -// package manager -- since in mode 2, absl::variant will name a different -// type, with a different mangled name and binary layout, depending on the -// compiler flags passed by the end user. For more info, see -// https://abseil.io/about/design/dropin-types. -// -// User code should not inspect this macro. To check in the preprocessor if -// absl::variant is a typedef of std::variant, use the feature macro -// ABSL_USES_STD_VARIANT. - -#define ABSL_OPTION_USE_STD_VARIANT 2 - - -// ABSL_OPTION_USE_INLINE_NAMESPACE -// ABSL_OPTION_INLINE_NAMESPACE_NAME -// -// These options controls whether all entities in the absl namespace are -// contained within an inner inline namespace. This does not affect the -// user-visible API of Abseil, but it changes the mangled names of all symbols. -// -// This can be useful as a version tag if you are distributing Abseil in -// precompiled form. This will prevent a binary library build of Abseil with -// one inline namespace being used with headers configured with a different -// inline namespace name. Binary packagers are reminded that Abseil does not -// guarantee any ABI stability in Abseil, so any update of Abseil or -// configuration change in such a binary package should be combined with a -// new, unique value for the inline namespace name. -// -// A value of 0 means not to use inline namespaces. -// -// A value of 1 means to use an inline namespace with the given name inside -// namespace absl. If this is set, ABSL_OPTION_INLINE_NAMESPACE_NAME must also -// be changed to a new, unique identifier name. In particular "head" is not -// allowed. - -#define ABSL_OPTION_USE_INLINE_NAMESPACE 1 -#define ABSL_OPTION_INLINE_NAMESPACE_NAME lts_20220623 - -// ABSL_OPTION_HARDENED -// -// This option enables a "hardened" build in release mode (in this context, -// release mode is defined as a build where the `NDEBUG` macro is defined). -// -// A value of 0 means that "hardened" mode is not enabled. -// -// A value of 1 means that "hardened" mode is enabled. -// -// Hardened builds have additional security checks enabled when `NDEBUG` is -// defined. Defining `NDEBUG` is normally used to turn `assert()` macro into a -// no-op, as well as disabling other bespoke program consistency checks. By -// defining ABSL_OPTION_HARDENED to 1, a select set of checks remain enabled in -// release mode. These checks guard against programming errors that may lead to -// security vulnerabilities. In release mode, when one of these programming -// errors is encountered, the program will immediately abort, possibly without -// any attempt at logging. -// -// The checks enabled by this option are not free; they do incur runtime cost. -// -// The checks enabled by this option are always active when `NDEBUG` is not -// defined, even in the case when ABSL_OPTION_HARDENED is defined to 0. The -// checks enabled by this option may abort the program in a different way and -// log additional information when `NDEBUG` is not defined. - -#define ABSL_OPTION_HARDENED 0 - -#endif // ABSL_BASE_OPTIONS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/policy_checks.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/policy_checks.h deleted file mode 100644 index 06b3243..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/policy_checks.h +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: policy_checks.h -// ----------------------------------------------------------------------------- -// -// This header enforces a minimum set of policies at build time, such as the -// supported compiler and library versions. Unsupported configurations are -// reported with `#error`. This enforcement is best effort, so successfully -// compiling this header does not guarantee a supported configuration. - -#ifndef ABSL_BASE_POLICY_CHECKS_H_ -#define ABSL_BASE_POLICY_CHECKS_H_ - -// Included for the __GLIBC_PREREQ macro used below. -#include - -// Included for the _STLPORT_VERSION macro used below. -#if defined(__cplusplus) -#include -#endif - -// ----------------------------------------------------------------------------- -// Operating System Check -// ----------------------------------------------------------------------------- - -#if defined(__CYGWIN__) -#error "Cygwin is not supported." -#endif - -// ----------------------------------------------------------------------------- -// Toolchain Check -// ----------------------------------------------------------------------------- - -// We support MSVC++ 14.0 update 2 and later. -// This minimum will go up. -#if defined(_MSC_FULL_VER) && _MSC_FULL_VER < 190023918 && !defined(__clang__) -#error "This package requires Visual Studio 2015 Update 2 or higher." -#endif - -// We support gcc 4.7 and later. -// This minimum will go up. -#if defined(__GNUC__) && !defined(__clang__) -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) -#error "This package requires gcc 4.7 or higher." -#endif -#endif - -// We support Apple Xcode clang 4.2.1 (version 421.11.65) and later. -// This corresponds to Apple Xcode version 4.5. -// This minimum will go up. -#if defined(__apple_build_version__) && __apple_build_version__ < 4211165 -#error "This package requires __apple_build_version__ of 4211165 or higher." -#endif - -// ----------------------------------------------------------------------------- -// C++ Version Check -// ----------------------------------------------------------------------------- - -// Enforce C++11 as the minimum. Note that Visual Studio has not -// advanced __cplusplus despite being good enough for our purposes, so -// so we exempt it from the check. -#if defined(__cplusplus) && !defined(_MSC_VER) -#if __cplusplus < 201103L -#error "C++ versions less than C++11 are not supported." -#endif -#endif - -// ----------------------------------------------------------------------------- -// Standard Library Check -// ----------------------------------------------------------------------------- - -#if defined(_STLPORT_VERSION) -#error "STLPort is not supported." -#endif - -// ----------------------------------------------------------------------------- -// `char` Size Check -// ----------------------------------------------------------------------------- - -// Abseil currently assumes CHAR_BIT == 8. If you would like to use Abseil on a -// platform where this is not the case, please provide us with the details about -// your platform so we can consider relaxing this requirement. -#if CHAR_BIT != 8 -#error "Abseil assumes CHAR_BIT == 8." -#endif - -// ----------------------------------------------------------------------------- -// `int` Size Check -// ----------------------------------------------------------------------------- - -// Abseil currently assumes that an int is 4 bytes. If you would like to use -// Abseil on a platform where this is not the case, please provide us with the -// details about your platform so we can consider relaxing this requirement. -#if INT_MAX < 2147483647 -#error "Abseil assumes that int is at least 4 bytes. " -#endif - -#endif // ABSL_BASE_POLICY_CHECKS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/port.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/port.h deleted file mode 100644 index 5bc4d6c..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/port.h +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This files is a forwarding header for other headers containing various -// portability macros and functions. - -#ifndef ABSL_BASE_PORT_H_ -#define ABSL_BASE_PORT_H_ - -#include "absl/base/attributes.h" -#include "absl/base/config.h" -#include "absl/base/optimization.h" - -#endif // ABSL_BASE_PORT_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/thread_annotations.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/thread_annotations.h deleted file mode 100644 index bc8a620..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/base/thread_annotations.h +++ /dev/null @@ -1,335 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: thread_annotations.h -// ----------------------------------------------------------------------------- -// -// This header file contains macro definitions for thread safety annotations -// that allow developers to document the locking policies of multi-threaded -// code. The annotations can also help program analysis tools to identify -// potential thread safety issues. -// -// These annotations are implemented using compiler attributes. Using the macros -// defined here instead of raw attributes allow for portability and future -// compatibility. -// -// When referring to mutexes in the arguments of the attributes, you should -// use variable names or more complex expressions (e.g. my_object->mutex_) -// that evaluate to a concrete mutex object whenever possible. If the mutex -// you want to refer to is not in scope, you may use a member pointer -// (e.g. &MyClass::mutex_) to refer to a mutex in some (unknown) object. - -#ifndef ABSL_BASE_THREAD_ANNOTATIONS_H_ -#define ABSL_BASE_THREAD_ANNOTATIONS_H_ - -#include "absl/base/attributes.h" -#include "absl/base/config.h" -// TODO(mbonadei): Remove after the backward compatibility period. -#include "absl/base/internal/thread_annotations.h" // IWYU pragma: export - -// ABSL_GUARDED_BY() -// -// Documents if a shared field or global variable needs to be protected by a -// mutex. ABSL_GUARDED_BY() allows the user to specify a particular mutex that -// should be held when accessing the annotated variable. -// -// Although this annotation (and ABSL_PT_GUARDED_BY, below) cannot be applied to -// local variables, a local variable and its associated mutex can often be -// combined into a small class or struct, thereby allowing the annotation. -// -// Example: -// -// class Foo { -// Mutex mu_; -// int p1_ ABSL_GUARDED_BY(mu_); -// ... -// }; -#if ABSL_HAVE_ATTRIBUTE(guarded_by) -#define ABSL_GUARDED_BY(x) __attribute__((guarded_by(x))) -#else -#define ABSL_GUARDED_BY(x) -#endif - -// ABSL_PT_GUARDED_BY() -// -// Documents if the memory location pointed to by a pointer should be guarded -// by a mutex when dereferencing the pointer. -// -// Example: -// class Foo { -// Mutex mu_; -// int *p1_ ABSL_PT_GUARDED_BY(mu_); -// ... -// }; -// -// Note that a pointer variable to a shared memory location could itself be a -// shared variable. -// -// Example: -// -// // `q_`, guarded by `mu1_`, points to a shared memory location that is -// // guarded by `mu2_`: -// int *q_ ABSL_GUARDED_BY(mu1_) ABSL_PT_GUARDED_BY(mu2_); -#if ABSL_HAVE_ATTRIBUTE(pt_guarded_by) -#define ABSL_PT_GUARDED_BY(x) __attribute__((pt_guarded_by(x))) -#else -#define ABSL_PT_GUARDED_BY(x) -#endif - -// ABSL_ACQUIRED_AFTER() / ABSL_ACQUIRED_BEFORE() -// -// Documents the acquisition order between locks that can be held -// simultaneously by a thread. For any two locks that need to be annotated -// to establish an acquisition order, only one of them needs the annotation. -// (i.e. You don't have to annotate both locks with both ABSL_ACQUIRED_AFTER -// and ABSL_ACQUIRED_BEFORE.) -// -// As with ABSL_GUARDED_BY, this is only applicable to mutexes that are shared -// fields or global variables. -// -// Example: -// -// Mutex m1_; -// Mutex m2_ ABSL_ACQUIRED_AFTER(m1_); -#if ABSL_HAVE_ATTRIBUTE(acquired_after) -#define ABSL_ACQUIRED_AFTER(...) __attribute__((acquired_after(__VA_ARGS__))) -#else -#define ABSL_ACQUIRED_AFTER(...) -#endif - -#if ABSL_HAVE_ATTRIBUTE(acquired_before) -#define ABSL_ACQUIRED_BEFORE(...) __attribute__((acquired_before(__VA_ARGS__))) -#else -#define ABSL_ACQUIRED_BEFORE(...) -#endif - -// ABSL_EXCLUSIVE_LOCKS_REQUIRED() / ABSL_SHARED_LOCKS_REQUIRED() -// -// Documents a function that expects a mutex to be held prior to entry. -// The mutex is expected to be held both on entry to, and exit from, the -// function. -// -// An exclusive lock allows read-write access to the guarded data member(s), and -// only one thread can acquire a lock exclusively at any one time. A shared lock -// allows read-only access, and any number of threads can acquire a shared lock -// concurrently. -// -// Generally, non-const methods should be annotated with -// ABSL_EXCLUSIVE_LOCKS_REQUIRED, while const methods should be annotated with -// ABSL_SHARED_LOCKS_REQUIRED. -// -// Example: -// -// Mutex mu1, mu2; -// int a ABSL_GUARDED_BY(mu1); -// int b ABSL_GUARDED_BY(mu2); -// -// void foo() ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu1, mu2) { ... } -// void bar() const ABSL_SHARED_LOCKS_REQUIRED(mu1, mu2) { ... } -#if ABSL_HAVE_ATTRIBUTE(exclusive_locks_required) -#define ABSL_EXCLUSIVE_LOCKS_REQUIRED(...) \ - __attribute__((exclusive_locks_required(__VA_ARGS__))) -#else -#define ABSL_EXCLUSIVE_LOCKS_REQUIRED(...) -#endif - -#if ABSL_HAVE_ATTRIBUTE(shared_locks_required) -#define ABSL_SHARED_LOCKS_REQUIRED(...) \ - __attribute__((shared_locks_required(__VA_ARGS__))) -#else -#define ABSL_SHARED_LOCKS_REQUIRED(...) -#endif - -// ABSL_LOCKS_EXCLUDED() -// -// Documents the locks that cannot be held by callers of this function, as they -// might be acquired by this function (Abseil's `Mutex` locks are -// non-reentrant). -#if ABSL_HAVE_ATTRIBUTE(locks_excluded) -#define ABSL_LOCKS_EXCLUDED(...) __attribute__((locks_excluded(__VA_ARGS__))) -#else -#define ABSL_LOCKS_EXCLUDED(...) -#endif - -// ABSL_LOCK_RETURNED() -// -// Documents a function that returns a mutex without acquiring it. For example, -// a public getter method that returns a pointer to a private mutex should -// be annotated with ABSL_LOCK_RETURNED. -#if ABSL_HAVE_ATTRIBUTE(lock_returned) -#define ABSL_LOCK_RETURNED(x) __attribute__((lock_returned(x))) -#else -#define ABSL_LOCK_RETURNED(x) -#endif - -// ABSL_LOCKABLE -// -// Documents if a class/type is a lockable type (such as the `Mutex` class). -#if ABSL_HAVE_ATTRIBUTE(lockable) -#define ABSL_LOCKABLE __attribute__((lockable)) -#else -#define ABSL_LOCKABLE -#endif - -// ABSL_SCOPED_LOCKABLE -// -// Documents if a class does RAII locking (such as the `MutexLock` class). -// The constructor should use `LOCK_FUNCTION()` to specify the mutex that is -// acquired, and the destructor should use `UNLOCK_FUNCTION()` with no -// arguments; the analysis will assume that the destructor unlocks whatever the -// constructor locked. -#if ABSL_HAVE_ATTRIBUTE(scoped_lockable) -#define ABSL_SCOPED_LOCKABLE __attribute__((scoped_lockable)) -#else -#define ABSL_SCOPED_LOCKABLE -#endif - -// ABSL_EXCLUSIVE_LOCK_FUNCTION() -// -// Documents functions that acquire a lock in the body of a function, and do -// not release it. -#if ABSL_HAVE_ATTRIBUTE(exclusive_lock_function) -#define ABSL_EXCLUSIVE_LOCK_FUNCTION(...) \ - __attribute__((exclusive_lock_function(__VA_ARGS__))) -#else -#define ABSL_EXCLUSIVE_LOCK_FUNCTION(...) -#endif - -// ABSL_SHARED_LOCK_FUNCTION() -// -// Documents functions that acquire a shared (reader) lock in the body of a -// function, and do not release it. -#if ABSL_HAVE_ATTRIBUTE(shared_lock_function) -#define ABSL_SHARED_LOCK_FUNCTION(...) \ - __attribute__((shared_lock_function(__VA_ARGS__))) -#else -#define ABSL_SHARED_LOCK_FUNCTION(...) -#endif - -// ABSL_UNLOCK_FUNCTION() -// -// Documents functions that expect a lock to be held on entry to the function, -// and release it in the body of the function. -#if ABSL_HAVE_ATTRIBUTE(unlock_function) -#define ABSL_UNLOCK_FUNCTION(...) __attribute__((unlock_function(__VA_ARGS__))) -#else -#define ABSL_UNLOCK_FUNCTION(...) -#endif - -// ABSL_EXCLUSIVE_TRYLOCK_FUNCTION() / ABSL_SHARED_TRYLOCK_FUNCTION() -// -// Documents functions that try to acquire a lock, and return success or failure -// (or a non-boolean value that can be interpreted as a boolean). -// The first argument should be `true` for functions that return `true` on -// success, or `false` for functions that return `false` on success. The second -// argument specifies the mutex that is locked on success. If unspecified, this -// mutex is assumed to be `this`. -#if ABSL_HAVE_ATTRIBUTE(exclusive_trylock_function) -#define ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(...) \ - __attribute__((exclusive_trylock_function(__VA_ARGS__))) -#else -#define ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(...) -#endif - -#if ABSL_HAVE_ATTRIBUTE(shared_trylock_function) -#define ABSL_SHARED_TRYLOCK_FUNCTION(...) \ - __attribute__((shared_trylock_function(__VA_ARGS__))) -#else -#define ABSL_SHARED_TRYLOCK_FUNCTION(...) -#endif - -// ABSL_ASSERT_EXCLUSIVE_LOCK() / ABSL_ASSERT_SHARED_LOCK() -// -// Documents functions that dynamically check to see if a lock is held, and fail -// if it is not held. -#if ABSL_HAVE_ATTRIBUTE(assert_exclusive_lock) -#define ABSL_ASSERT_EXCLUSIVE_LOCK(...) \ - __attribute__((assert_exclusive_lock(__VA_ARGS__))) -#else -#define ABSL_ASSERT_EXCLUSIVE_LOCK(...) -#endif - -#if ABSL_HAVE_ATTRIBUTE(assert_shared_lock) -#define ABSL_ASSERT_SHARED_LOCK(...) \ - __attribute__((assert_shared_lock(__VA_ARGS__))) -#else -#define ABSL_ASSERT_SHARED_LOCK(...) -#endif - -// ABSL_NO_THREAD_SAFETY_ANALYSIS -// -// Turns off thread safety checking within the body of a particular function. -// This annotation is used to mark functions that are known to be correct, but -// the locking behavior is more complicated than the analyzer can handle. -#if ABSL_HAVE_ATTRIBUTE(no_thread_safety_analysis) -#define ABSL_NO_THREAD_SAFETY_ANALYSIS \ - __attribute__((no_thread_safety_analysis)) -#else -#define ABSL_NO_THREAD_SAFETY_ANALYSIS -#endif - -//------------------------------------------------------------------------------ -// Tool-Supplied Annotations -//------------------------------------------------------------------------------ - -// ABSL_TS_UNCHECKED should be placed around lock expressions that are not valid -// C++ syntax, but which are present for documentation purposes. These -// annotations will be ignored by the analysis. -#define ABSL_TS_UNCHECKED(x) "" - -// ABSL_TS_FIXME is used to mark lock expressions that are not valid C++ syntax. -// It is used by automated tools to mark and disable invalid expressions. -// The annotation should either be fixed, or changed to ABSL_TS_UNCHECKED. -#define ABSL_TS_FIXME(x) "" - -// Like ABSL_NO_THREAD_SAFETY_ANALYSIS, this turns off checking within the body -// of a particular function. However, this attribute is used to mark functions -// that are incorrect and need to be fixed. It is used by automated tools to -// avoid breaking the build when the analysis is updated. -// Code owners are expected to eventually fix the routine. -#define ABSL_NO_THREAD_SAFETY_ANALYSIS_FIXME ABSL_NO_THREAD_SAFETY_ANALYSIS - -// Similar to ABSL_NO_THREAD_SAFETY_ANALYSIS_FIXME, this macro marks a -// ABSL_GUARDED_BY annotation that needs to be fixed, because it is producing -// thread safety warning. It disables the ABSL_GUARDED_BY. -#define ABSL_GUARDED_BY_FIXME(x) - -// Disables warnings for a single read operation. This can be used to avoid -// warnings when it is known that the read is not actually involved in a race, -// but the compiler cannot confirm that. -#define ABSL_TS_UNCHECKED_READ(x) absl::base_internal::ts_unchecked_read(x) - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace base_internal { - -// Takes a reference to a guarded data member, and returns an unguarded -// reference. -// Do not use this function directly, use ABSL_TS_UNCHECKED_READ instead. -template -inline const T& ts_unchecked_read(const T& v) ABSL_NO_THREAD_SAFETY_ANALYSIS { - return v; -} - -template -inline T& ts_unchecked_read(T& v) ABSL_NO_THREAD_SAFETY_ANALYSIS { - return v; -} - -} // namespace base_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_BASE_THREAD_ANNOTATIONS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/cleanup/cleanup.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/cleanup/cleanup.h deleted file mode 100644 index 960ccd0..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/cleanup/cleanup.h +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2021 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: cleanup.h -// ----------------------------------------------------------------------------- -// -// `absl::Cleanup` implements the scope guard idiom, invoking the contained -// callback's `operator()() &&` on scope exit. -// -// Example: -// -// ``` -// absl::Status CopyGoodData(const char* source_path, const char* sink_path) { -// FILE* source_file = fopen(source_path, "r"); -// if (source_file == nullptr) { -// return absl::NotFoundError("No source file"); // No cleanups execute -// } -// -// // C++17 style cleanup using class template argument deduction -// absl::Cleanup source_closer = [source_file] { fclose(source_file); }; -// -// FILE* sink_file = fopen(sink_path, "w"); -// if (sink_file == nullptr) { -// return absl::NotFoundError("No sink file"); // First cleanup executes -// } -// -// // C++11 style cleanup using the factory function -// auto sink_closer = absl::MakeCleanup([sink_file] { fclose(sink_file); }); -// -// Data data; -// while (ReadData(source_file, &data)) { -// if (!data.IsGood()) { -// absl::Status result = absl::FailedPreconditionError("Read bad data"); -// return result; // Both cleanups execute -// } -// SaveData(sink_file, &data); -// } -// -// return absl::OkStatus(); // Both cleanups execute -// } -// ``` -// -// Methods: -// -// `std::move(cleanup).Cancel()` will prevent the callback from executing. -// -// `std::move(cleanup).Invoke()` will execute the callback early, before -// destruction, and prevent the callback from executing in the destructor. -// -// Usage: -// -// `absl::Cleanup` is not an interface type. It is only intended to be used -// within the body of a function. It is not a value type and instead models a -// control flow construct. Check out `defer` in Golang for something similar. - -#ifndef ABSL_CLEANUP_CLEANUP_H_ -#define ABSL_CLEANUP_CLEANUP_H_ - -#include - -#include "absl/base/config.h" -#include "absl/base/macros.h" -#include "absl/cleanup/internal/cleanup.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -template -class ABSL_MUST_USE_RESULT Cleanup final { - static_assert(cleanup_internal::WasDeduced(), - "Explicit template parameters are not supported."); - - static_assert(cleanup_internal::ReturnsVoid(), - "Callbacks that return values are not supported."); - - public: - Cleanup(Callback callback) : storage_(std::move(callback)) {} // NOLINT - - Cleanup(Cleanup&& other) = default; - - void Cancel() && { - ABSL_HARDENING_ASSERT(storage_.IsCallbackEngaged()); - storage_.DestroyCallback(); - } - - void Invoke() && { - ABSL_HARDENING_ASSERT(storage_.IsCallbackEngaged()); - storage_.InvokeCallback(); - storage_.DestroyCallback(); - } - - ~Cleanup() { - if (storage_.IsCallbackEngaged()) { - storage_.InvokeCallback(); - storage_.DestroyCallback(); - } - } - - private: - cleanup_internal::Storage storage_; -}; - -// `absl::Cleanup c = /* callback */;` -// -// C++17 type deduction API for creating an instance of `absl::Cleanup` -#if defined(ABSL_HAVE_CLASS_TEMPLATE_ARGUMENT_DEDUCTION) -template -Cleanup(Callback callback) -> Cleanup; -#endif // defined(ABSL_HAVE_CLASS_TEMPLATE_ARGUMENT_DEDUCTION) - -// `auto c = absl::MakeCleanup(/* callback */);` -// -// C++11 type deduction API for creating an instance of `absl::Cleanup` -template -absl::Cleanup MakeCleanup(Callback callback) { - static_assert(cleanup_internal::WasDeduced(), - "Explicit template parameters are not supported."); - - static_assert(cleanup_internal::ReturnsVoid(), - "Callbacks that return values are not supported."); - - return {std::move(callback)}; -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CLEANUP_CLEANUP_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/cleanup/internal/cleanup.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/cleanup/internal/cleanup.h deleted file mode 100644 index 2783fcb..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/cleanup/internal/cleanup.h +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2021 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_CLEANUP_INTERNAL_CLEANUP_H_ -#define ABSL_CLEANUP_INTERNAL_CLEANUP_H_ - -#include -#include -#include - -#include "absl/base/internal/invoke.h" -#include "absl/base/macros.h" -#include "absl/base/thread_annotations.h" -#include "absl/utility/utility.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -namespace cleanup_internal { - -struct Tag {}; - -template -constexpr bool WasDeduced() { - return (std::is_same::value) && - (sizeof...(Args) == 0); -} - -template -constexpr bool ReturnsVoid() { - return (std::is_same, void>::value); -} - -template -class Storage { - public: - Storage() = delete; - - explicit Storage(Callback callback) { - // Placement-new into a character buffer is used for eager destruction when - // the cleanup is invoked or cancelled. To ensure this optimizes well, the - // behavior is implemented locally instead of using an absl::optional. - ::new (GetCallbackBuffer()) Callback(std::move(callback)); - is_callback_engaged_ = true; - } - - Storage(Storage&& other) { - ABSL_HARDENING_ASSERT(other.IsCallbackEngaged()); - - ::new (GetCallbackBuffer()) Callback(std::move(other.GetCallback())); - is_callback_engaged_ = true; - - other.DestroyCallback(); - } - - Storage(const Storage& other) = delete; - - Storage& operator=(Storage&& other) = delete; - - Storage& operator=(const Storage& other) = delete; - - void* GetCallbackBuffer() { return static_cast(+callback_buffer_); } - - Callback& GetCallback() { - return *reinterpret_cast(GetCallbackBuffer()); - } - - bool IsCallbackEngaged() const { return is_callback_engaged_; } - - void DestroyCallback() { - is_callback_engaged_ = false; - GetCallback().~Callback(); - } - - void InvokeCallback() ABSL_NO_THREAD_SAFETY_ANALYSIS { - std::move(GetCallback())(); - } - - private: - bool is_callback_engaged_; - alignas(Callback) char callback_buffer_[sizeof(Callback)]; -}; - -} // namespace cleanup_internal - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CLEANUP_INTERNAL_CLEANUP_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/fixed_array.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/fixed_array.h deleted file mode 100644 index 2aefae3..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/fixed_array.h +++ /dev/null @@ -1,529 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: fixed_array.h -// ----------------------------------------------------------------------------- -// -// A `FixedArray` represents a non-resizable array of `T` where the length of -// the array can be determined at run-time. It is a good replacement for -// non-standard and deprecated uses of `alloca()` and variable length arrays -// within the GCC extension. (See -// https://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html). -// -// `FixedArray` allocates small arrays inline, keeping performance fast by -// avoiding heap operations. It also helps reduce the chances of -// accidentally overflowing your stack if large input is passed to -// your function. - -#ifndef ABSL_CONTAINER_FIXED_ARRAY_H_ -#define ABSL_CONTAINER_FIXED_ARRAY_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/algorithm/algorithm.h" -#include "absl/base/config.h" -#include "absl/base/dynamic_annotations.h" -#include "absl/base/internal/throw_delegate.h" -#include "absl/base/macros.h" -#include "absl/base/optimization.h" -#include "absl/base/port.h" -#include "absl/container/internal/compressed_tuple.h" -#include "absl/memory/memory.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -constexpr static auto kFixedArrayUseDefault = static_cast(-1); - -// ----------------------------------------------------------------------------- -// FixedArray -// ----------------------------------------------------------------------------- -// -// A `FixedArray` provides a run-time fixed-size array, allocating a small array -// inline for efficiency. -// -// Most users should not specify an `inline_elements` argument and let -// `FixedArray` automatically determine the number of elements -// to store inline based on `sizeof(T)`. If `inline_elements` is specified, the -// `FixedArray` implementation will use inline storage for arrays with a -// length <= `inline_elements`. -// -// Note that a `FixedArray` constructed with a `size_type` argument will -// default-initialize its values by leaving trivially constructible types -// uninitialized (e.g. int, int[4], double), and others default-constructed. -// This matches the behavior of c-style arrays and `std::array`, but not -// `std::vector`. -template > -class FixedArray { - static_assert(!std::is_array::value || std::extent::value > 0, - "Arrays with unknown bounds cannot be used with FixedArray."); - - static constexpr size_t kInlineBytesDefault = 256; - - using AllocatorTraits = std::allocator_traits; - // std::iterator_traits isn't guaranteed to be SFINAE-friendly until C++17, - // but this seems to be mostly pedantic. - template - using EnableIfForwardIterator = absl::enable_if_t::iterator_category, - std::forward_iterator_tag>::value>; - static constexpr bool NoexceptCopyable() { - return std::is_nothrow_copy_constructible::value && - absl::allocator_is_nothrow::value; - } - static constexpr bool NoexceptMovable() { - return std::is_nothrow_move_constructible::value && - absl::allocator_is_nothrow::value; - } - static constexpr bool DefaultConstructorIsNonTrivial() { - return !absl::is_trivially_default_constructible::value; - } - - public: - using allocator_type = typename AllocatorTraits::allocator_type; - using value_type = typename AllocatorTraits::value_type; - using pointer = typename AllocatorTraits::pointer; - using const_pointer = typename AllocatorTraits::const_pointer; - using reference = value_type&; - using const_reference = const value_type&; - using size_type = typename AllocatorTraits::size_type; - using difference_type = typename AllocatorTraits::difference_type; - using iterator = pointer; - using const_iterator = const_pointer; - using reverse_iterator = std::reverse_iterator; - using const_reverse_iterator = std::reverse_iterator; - - static constexpr size_type inline_elements = - (N == kFixedArrayUseDefault ? kInlineBytesDefault / sizeof(value_type) - : static_cast(N)); - - FixedArray( - const FixedArray& other, - const allocator_type& a = allocator_type()) noexcept(NoexceptCopyable()) - : FixedArray(other.begin(), other.end(), a) {} - - FixedArray( - FixedArray&& other, - const allocator_type& a = allocator_type()) noexcept(NoexceptMovable()) - : FixedArray(std::make_move_iterator(other.begin()), - std::make_move_iterator(other.end()), a) {} - - // Creates an array object that can store `n` elements. - // Note that trivially constructible elements will be uninitialized. - explicit FixedArray(size_type n, const allocator_type& a = allocator_type()) - : storage_(n, a) { - if (DefaultConstructorIsNonTrivial()) { - memory_internal::ConstructRange(storage_.alloc(), storage_.begin(), - storage_.end()); - } - } - - // Creates an array initialized with `n` copies of `val`. - FixedArray(size_type n, const value_type& val, - const allocator_type& a = allocator_type()) - : storage_(n, a) { - memory_internal::ConstructRange(storage_.alloc(), storage_.begin(), - storage_.end(), val); - } - - // Creates an array initialized with the size and contents of `init_list`. - FixedArray(std::initializer_list init_list, - const allocator_type& a = allocator_type()) - : FixedArray(init_list.begin(), init_list.end(), a) {} - - // Creates an array initialized with the elements from the input - // range. The array's size will always be `std::distance(first, last)`. - // REQUIRES: Iterator must be a forward_iterator or better. - template * = nullptr> - FixedArray(Iterator first, Iterator last, - const allocator_type& a = allocator_type()) - : storage_(std::distance(first, last), a) { - memory_internal::CopyRange(storage_.alloc(), storage_.begin(), first, last); - } - - ~FixedArray() noexcept { - for (auto* cur = storage_.begin(); cur != storage_.end(); ++cur) { - AllocatorTraits::destroy(storage_.alloc(), cur); - } - } - - // Assignments are deleted because they break the invariant that the size of a - // `FixedArray` never changes. - void operator=(FixedArray&&) = delete; - void operator=(const FixedArray&) = delete; - - // FixedArray::size() - // - // Returns the length of the fixed array. - size_type size() const { return storage_.size(); } - - // FixedArray::max_size() - // - // Returns the largest possible value of `std::distance(begin(), end())` for a - // `FixedArray`. This is equivalent to the most possible addressable bytes - // over the number of bytes taken by T. - constexpr size_type max_size() const { - return (std::numeric_limits::max)() / sizeof(value_type); - } - - // FixedArray::empty() - // - // Returns whether or not the fixed array is empty. - bool empty() const { return size() == 0; } - - // FixedArray::memsize() - // - // Returns the memory size of the fixed array in bytes. - size_t memsize() const { return size() * sizeof(value_type); } - - // FixedArray::data() - // - // Returns a const T* pointer to elements of the `FixedArray`. This pointer - // can be used to access (but not modify) the contained elements. - const_pointer data() const { return AsValueType(storage_.begin()); } - - // Overload of FixedArray::data() to return a T* pointer to elements of the - // fixed array. This pointer can be used to access and modify the contained - // elements. - pointer data() { return AsValueType(storage_.begin()); } - - // FixedArray::operator[] - // - // Returns a reference the ith element of the fixed array. - // REQUIRES: 0 <= i < size() - reference operator[](size_type i) { - ABSL_HARDENING_ASSERT(i < size()); - return data()[i]; - } - - // Overload of FixedArray::operator()[] to return a const reference to the - // ith element of the fixed array. - // REQUIRES: 0 <= i < size() - const_reference operator[](size_type i) const { - ABSL_HARDENING_ASSERT(i < size()); - return data()[i]; - } - - // FixedArray::at - // - // Bounds-checked access. Returns a reference to the ith element of the fixed - // array, or throws std::out_of_range - reference at(size_type i) { - if (ABSL_PREDICT_FALSE(i >= size())) { - base_internal::ThrowStdOutOfRange("FixedArray::at failed bounds check"); - } - return data()[i]; - } - - // Overload of FixedArray::at() to return a const reference to the ith element - // of the fixed array. - const_reference at(size_type i) const { - if (ABSL_PREDICT_FALSE(i >= size())) { - base_internal::ThrowStdOutOfRange("FixedArray::at failed bounds check"); - } - return data()[i]; - } - - // FixedArray::front() - // - // Returns a reference to the first element of the fixed array. - reference front() { - ABSL_HARDENING_ASSERT(!empty()); - return data()[0]; - } - - // Overload of FixedArray::front() to return a reference to the first element - // of a fixed array of const values. - const_reference front() const { - ABSL_HARDENING_ASSERT(!empty()); - return data()[0]; - } - - // FixedArray::back() - // - // Returns a reference to the last element of the fixed array. - reference back() { - ABSL_HARDENING_ASSERT(!empty()); - return data()[size() - 1]; - } - - // Overload of FixedArray::back() to return a reference to the last element - // of a fixed array of const values. - const_reference back() const { - ABSL_HARDENING_ASSERT(!empty()); - return data()[size() - 1]; - } - - // FixedArray::begin() - // - // Returns an iterator to the beginning of the fixed array. - iterator begin() { return data(); } - - // Overload of FixedArray::begin() to return a const iterator to the - // beginning of the fixed array. - const_iterator begin() const { return data(); } - - // FixedArray::cbegin() - // - // Returns a const iterator to the beginning of the fixed array. - const_iterator cbegin() const { return begin(); } - - // FixedArray::end() - // - // Returns an iterator to the end of the fixed array. - iterator end() { return data() + size(); } - - // Overload of FixedArray::end() to return a const iterator to the end of the - // fixed array. - const_iterator end() const { return data() + size(); } - - // FixedArray::cend() - // - // Returns a const iterator to the end of the fixed array. - const_iterator cend() const { return end(); } - - // FixedArray::rbegin() - // - // Returns a reverse iterator from the end of the fixed array. - reverse_iterator rbegin() { return reverse_iterator(end()); } - - // Overload of FixedArray::rbegin() to return a const reverse iterator from - // the end of the fixed array. - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - - // FixedArray::crbegin() - // - // Returns a const reverse iterator from the end of the fixed array. - const_reverse_iterator crbegin() const { return rbegin(); } - - // FixedArray::rend() - // - // Returns a reverse iterator from the beginning of the fixed array. - reverse_iterator rend() { return reverse_iterator(begin()); } - - // Overload of FixedArray::rend() for returning a const reverse iterator - // from the beginning of the fixed array. - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - - // FixedArray::crend() - // - // Returns a reverse iterator from the beginning of the fixed array. - const_reverse_iterator crend() const { return rend(); } - - // FixedArray::fill() - // - // Assigns the given `value` to all elements in the fixed array. - void fill(const value_type& val) { std::fill(begin(), end(), val); } - - // Relational operators. Equality operators are elementwise using - // `operator==`, while order operators order FixedArrays lexicographically. - friend bool operator==(const FixedArray& lhs, const FixedArray& rhs) { - return absl::equal(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()); - } - - friend bool operator!=(const FixedArray& lhs, const FixedArray& rhs) { - return !(lhs == rhs); - } - - friend bool operator<(const FixedArray& lhs, const FixedArray& rhs) { - return std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), - rhs.end()); - } - - friend bool operator>(const FixedArray& lhs, const FixedArray& rhs) { - return rhs < lhs; - } - - friend bool operator<=(const FixedArray& lhs, const FixedArray& rhs) { - return !(rhs < lhs); - } - - friend bool operator>=(const FixedArray& lhs, const FixedArray& rhs) { - return !(lhs < rhs); - } - - template - friend H AbslHashValue(H h, const FixedArray& v) { - return H::combine(H::combine_contiguous(std::move(h), v.data(), v.size()), - v.size()); - } - - private: - // StorageElement - // - // For FixedArrays with a C-style-array value_type, StorageElement is a POD - // wrapper struct called StorageElementWrapper that holds the value_type - // instance inside. This is needed for construction and destruction of the - // entire array regardless of how many dimensions it has. For all other cases, - // StorageElement is just an alias of value_type. - // - // Maintainer's Note: The simpler solution would be to simply wrap value_type - // in a struct whether it's an array or not. That causes some paranoid - // diagnostics to misfire, believing that 'data()' returns a pointer to a - // single element, rather than the packed array that it really is. - // e.g.: - // - // FixedArray buf(1); - // sprintf(buf.data(), "foo"); - // - // error: call to int __builtin___sprintf_chk(etc...) - // will always overflow destination buffer [-Werror] - // - template , - size_t InnerN = std::extent::value> - struct StorageElementWrapper { - InnerT array[InnerN]; - }; - - using StorageElement = - absl::conditional_t::value, - StorageElementWrapper, value_type>; - - static pointer AsValueType(pointer ptr) { return ptr; } - static pointer AsValueType(StorageElementWrapper* ptr) { - return std::addressof(ptr->array); - } - - static_assert(sizeof(StorageElement) == sizeof(value_type), ""); - static_assert(alignof(StorageElement) == alignof(value_type), ""); - - class NonEmptyInlinedStorage { - public: - StorageElement* data() { return reinterpret_cast(buff_); } - void AnnotateConstruct(size_type n); - void AnnotateDestruct(size_type n); - -#ifdef ABSL_HAVE_ADDRESS_SANITIZER - void* RedzoneBegin() { return &redzone_begin_; } - void* RedzoneEnd() { return &redzone_end_ + 1; } -#endif // ABSL_HAVE_ADDRESS_SANITIZER - - private: - ABSL_ADDRESS_SANITIZER_REDZONE(redzone_begin_); - alignas(StorageElement) char buff_[sizeof(StorageElement[inline_elements])]; - ABSL_ADDRESS_SANITIZER_REDZONE(redzone_end_); - }; - - class EmptyInlinedStorage { - public: - StorageElement* data() { return nullptr; } - void AnnotateConstruct(size_type) {} - void AnnotateDestruct(size_type) {} - }; - - using InlinedStorage = - absl::conditional_t; - - // Storage - // - // An instance of Storage manages the inline and out-of-line memory for - // instances of FixedArray. This guarantees that even when construction of - // individual elements fails in the FixedArray constructor body, the - // destructor for Storage will still be called and out-of-line memory will be - // properly deallocated. - // - class Storage : public InlinedStorage { - public: - Storage(size_type n, const allocator_type& a) - : size_alloc_(n, a), data_(InitializeData()) {} - - ~Storage() noexcept { - if (UsingInlinedStorage(size())) { - InlinedStorage::AnnotateDestruct(size()); - } else { - AllocatorTraits::deallocate(alloc(), AsValueType(begin()), size()); - } - } - - size_type size() const { return size_alloc_.template get<0>(); } - StorageElement* begin() const { return data_; } - StorageElement* end() const { return begin() + size(); } - allocator_type& alloc() { return size_alloc_.template get<1>(); } - - private: - static bool UsingInlinedStorage(size_type n) { - return n <= inline_elements; - } - - StorageElement* InitializeData() { - if (UsingInlinedStorage(size())) { - InlinedStorage::AnnotateConstruct(size()); - return InlinedStorage::data(); - } else { - return reinterpret_cast( - AllocatorTraits::allocate(alloc(), size())); - } - } - - // `CompressedTuple` takes advantage of EBCO for stateless `allocator_type`s - container_internal::CompressedTuple size_alloc_; - StorageElement* data_; - }; - - Storage storage_; -}; - -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -template -constexpr size_t FixedArray::kInlineBytesDefault; - -template -constexpr typename FixedArray::size_type - FixedArray::inline_elements; -#endif - -template -void FixedArray::NonEmptyInlinedStorage::AnnotateConstruct( - typename FixedArray::size_type n) { -#ifdef ABSL_HAVE_ADDRESS_SANITIZER - if (!n) return; - ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(data(), RedzoneEnd(), RedzoneEnd(), - data() + n); - ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(RedzoneBegin(), data(), data(), - RedzoneBegin()); -#endif // ABSL_HAVE_ADDRESS_SANITIZER - static_cast(n); // Mark used when not in asan mode -} - -template -void FixedArray::NonEmptyInlinedStorage::AnnotateDestruct( - typename FixedArray::size_type n) { -#ifdef ABSL_HAVE_ADDRESS_SANITIZER - if (!n) return; - ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(data(), RedzoneEnd(), data() + n, - RedzoneEnd()); - ABSL_ANNOTATE_CONTIGUOUS_CONTAINER(RedzoneBegin(), data(), RedzoneBegin(), - data()); -#endif // ABSL_HAVE_ADDRESS_SANITIZER - static_cast(n); // Mark used when not in asan mode -} -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_FIXED_ARRAY_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/flat_hash_map.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/flat_hash_map.h deleted file mode 100644 index e6bdbd9..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/flat_hash_map.h +++ /dev/null @@ -1,613 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: flat_hash_map.h -// ----------------------------------------------------------------------------- -// -// An `absl::flat_hash_map` is an unordered associative container of -// unique keys and associated values designed to be a more efficient replacement -// for `std::unordered_map`. Like `unordered_map`, search, insertion, and -// deletion of map elements can be done as an `O(1)` operation. However, -// `flat_hash_map` (and other unordered associative containers known as the -// collection of Abseil "Swiss tables") contain other optimizations that result -// in both memory and computation advantages. -// -// In most cases, your default choice for a hash map should be a map of type -// `flat_hash_map`. - -#ifndef ABSL_CONTAINER_FLAT_HASH_MAP_H_ -#define ABSL_CONTAINER_FLAT_HASH_MAP_H_ - -#include -#include -#include -#include - -#include "absl/algorithm/container.h" -#include "absl/base/macros.h" -#include "absl/container/internal/container_memory.h" -#include "absl/container/internal/hash_function_defaults.h" // IWYU pragma: export -#include "absl/container/internal/raw_hash_map.h" // IWYU pragma: export -#include "absl/memory/memory.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { -template -struct FlatHashMapPolicy; -} // namespace container_internal - -// ----------------------------------------------------------------------------- -// absl::flat_hash_map -// ----------------------------------------------------------------------------- -// -// An `absl::flat_hash_map` is an unordered associative container which -// has been optimized for both speed and memory footprint in most common use -// cases. Its interface is similar to that of `std::unordered_map` with -// the following notable differences: -// -// * Requires keys that are CopyConstructible -// * Requires values that are MoveConstructible -// * Supports heterogeneous lookup, through `find()`, `operator[]()` and -// `insert()`, provided that the map is provided a compatible heterogeneous -// hashing function and equality operator. -// * Invalidates any references and pointers to elements within the table after -// `rehash()`. -// * Contains a `capacity()` member function indicating the number of element -// slots (open, deleted, and empty) within the hash map. -// * Returns `void` from the `erase(iterator)` overload. -// -// By default, `flat_hash_map` uses the `absl::Hash` hashing framework. -// All fundamental and Abseil types that support the `absl::Hash` framework have -// a compatible equality operator for comparing insertions into `flat_hash_map`. -// If your type is not yet supported by the `absl::Hash` framework, see -// absl/hash/hash.h for information on extending Abseil hashing to user-defined -// types. -// -// Using `absl::flat_hash_map` at interface boundaries in dynamically loaded -// libraries (e.g. .dll, .so) is unsupported due to way `absl::Hash` values may -// be randomized across dynamically loaded libraries. -// -// NOTE: A `flat_hash_map` stores its value types directly inside its -// implementation array to avoid memory indirection. Because a `flat_hash_map` -// is designed to move data when rehashed, map values will not retain pointer -// stability. If you require pointer stability, or if your values are large, -// consider using `absl::flat_hash_map>` instead. -// If your types are not moveable or you require pointer stability for keys, -// consider `absl::node_hash_map`. -// -// Example: -// -// // Create a flat hash map of three strings (that map to strings) -// absl::flat_hash_map ducks = -// {{"a", "huey"}, {"b", "dewey"}, {"c", "louie"}}; -// -// // Insert a new element into the flat hash map -// ducks.insert({"d", "donald"}); -// -// // Force a rehash of the flat hash map -// ducks.rehash(0); -// -// // Find the element with the key "b" -// std::string search_key = "b"; -// auto result = ducks.find(search_key); -// if (result != ducks.end()) { -// std::cout << "Result: " << result->second << std::endl; -// } -template , - class Eq = absl::container_internal::hash_default_eq, - class Allocator = std::allocator>> -class flat_hash_map : public absl::container_internal::raw_hash_map< - absl::container_internal::FlatHashMapPolicy, - Hash, Eq, Allocator> { - using Base = typename flat_hash_map::raw_hash_map; - - public: - // Constructors and Assignment Operators - // - // A flat_hash_map supports the same overload set as `std::unordered_map` - // for construction and assignment: - // - // * Default constructor - // - // // No allocation for the table's elements is made. - // absl::flat_hash_map map1; - // - // * Initializer List constructor - // - // absl::flat_hash_map map2 = - // {{1, "huey"}, {2, "dewey"}, {3, "louie"},}; - // - // * Copy constructor - // - // absl::flat_hash_map map3(map2); - // - // * Copy assignment operator - // - // // Hash functor and Comparator are copied as well - // absl::flat_hash_map map4; - // map4 = map3; - // - // * Move constructor - // - // // Move is guaranteed efficient - // absl::flat_hash_map map5(std::move(map4)); - // - // * Move assignment operator - // - // // May be efficient if allocators are compatible - // absl::flat_hash_map map6; - // map6 = std::move(map5); - // - // * Range constructor - // - // std::vector> v = {{1, "a"}, {2, "b"}}; - // absl::flat_hash_map map7(v.begin(), v.end()); - flat_hash_map() {} - using Base::Base; - - // flat_hash_map::begin() - // - // Returns an iterator to the beginning of the `flat_hash_map`. - using Base::begin; - - // flat_hash_map::cbegin() - // - // Returns a const iterator to the beginning of the `flat_hash_map`. - using Base::cbegin; - - // flat_hash_map::cend() - // - // Returns a const iterator to the end of the `flat_hash_map`. - using Base::cend; - - // flat_hash_map::end() - // - // Returns an iterator to the end of the `flat_hash_map`. - using Base::end; - - // flat_hash_map::capacity() - // - // Returns the number of element slots (assigned, deleted, and empty) - // available within the `flat_hash_map`. - // - // NOTE: this member function is particular to `absl::flat_hash_map` and is - // not provided in the `std::unordered_map` API. - using Base::capacity; - - // flat_hash_map::empty() - // - // Returns whether or not the `flat_hash_map` is empty. - using Base::empty; - - // flat_hash_map::max_size() - // - // Returns the largest theoretical possible number of elements within a - // `flat_hash_map` under current memory constraints. This value can be thought - // of the largest value of `std::distance(begin(), end())` for a - // `flat_hash_map`. - using Base::max_size; - - // flat_hash_map::size() - // - // Returns the number of elements currently within the `flat_hash_map`. - using Base::size; - - // flat_hash_map::clear() - // - // Removes all elements from the `flat_hash_map`. Invalidates any references, - // pointers, or iterators referring to contained elements. - // - // NOTE: this operation may shrink the underlying buffer. To avoid shrinking - // the underlying buffer call `erase(begin(), end())`. - using Base::clear; - - // flat_hash_map::erase() - // - // Erases elements within the `flat_hash_map`. Erasing does not trigger a - // rehash. Overloads are listed below. - // - // void erase(const_iterator pos): - // - // Erases the element at `position` of the `flat_hash_map`, returning - // `void`. - // - // NOTE: returning `void` in this case is different than that of STL - // containers in general and `std::unordered_map` in particular (which - // return an iterator to the element following the erased element). If that - // iterator is needed, simply post increment the iterator: - // - // map.erase(it++); - // - // iterator erase(const_iterator first, const_iterator last): - // - // Erases the elements in the open interval [`first`, `last`), returning an - // iterator pointing to `last`. - // - // size_type erase(const key_type& key): - // - // Erases the element with the matching key, if it exists, returning the - // number of elements erased (0 or 1). - using Base::erase; - - // flat_hash_map::insert() - // - // Inserts an element of the specified value into the `flat_hash_map`, - // returning an iterator pointing to the newly inserted element, provided that - // an element with the given key does not already exist. If rehashing occurs - // due to the insertion, all iterators are invalidated. Overloads are listed - // below. - // - // std::pair insert(const init_type& value): - // - // Inserts a value into the `flat_hash_map`. Returns a pair consisting of an - // iterator to the inserted element (or to the element that prevented the - // insertion) and a bool denoting whether the insertion took place. - // - // std::pair insert(T&& value): - // std::pair insert(init_type&& value): - // - // Inserts a moveable value into the `flat_hash_map`. Returns a pair - // consisting of an iterator to the inserted element (or to the element that - // prevented the insertion) and a bool denoting whether the insertion took - // place. - // - // iterator insert(const_iterator hint, const init_type& value): - // iterator insert(const_iterator hint, T&& value): - // iterator insert(const_iterator hint, init_type&& value); - // - // Inserts a value, using the position of `hint` as a non-binding suggestion - // for where to begin the insertion search. Returns an iterator to the - // inserted element, or to the existing element that prevented the - // insertion. - // - // void insert(InputIterator first, InputIterator last): - // - // Inserts a range of values [`first`, `last`). - // - // NOTE: Although the STL does not specify which element may be inserted if - // multiple keys compare equivalently, for `flat_hash_map` we guarantee the - // first match is inserted. - // - // void insert(std::initializer_list ilist): - // - // Inserts the elements within the initializer list `ilist`. - // - // NOTE: Although the STL does not specify which element may be inserted if - // multiple keys compare equivalently within the initializer list, for - // `flat_hash_map` we guarantee the first match is inserted. - using Base::insert; - - // flat_hash_map::insert_or_assign() - // - // Inserts an element of the specified value into the `flat_hash_map` provided - // that a value with the given key does not already exist, or replaces it with - // the element value if a key for that value already exists, returning an - // iterator pointing to the newly inserted element. If rehashing occurs due - // to the insertion, all existing iterators are invalidated. Overloads are - // listed below. - // - // pair insert_or_assign(const init_type& k, T&& obj): - // pair insert_or_assign(init_type&& k, T&& obj): - // - // Inserts/Assigns (or moves) the element of the specified key into the - // `flat_hash_map`. - // - // iterator insert_or_assign(const_iterator hint, - // const init_type& k, T&& obj): - // iterator insert_or_assign(const_iterator hint, init_type&& k, T&& obj): - // - // Inserts/Assigns (or moves) the element of the specified key into the - // `flat_hash_map` using the position of `hint` as a non-binding suggestion - // for where to begin the insertion search. - using Base::insert_or_assign; - - // flat_hash_map::emplace() - // - // Inserts an element of the specified value by constructing it in-place - // within the `flat_hash_map`, provided that no element with the given key - // already exists. - // - // The element may be constructed even if there already is an element with the - // key in the container, in which case the newly constructed element will be - // destroyed immediately. Prefer `try_emplace()` unless your key is not - // copyable or moveable. - // - // If rehashing occurs due to the insertion, all iterators are invalidated. - using Base::emplace; - - // flat_hash_map::emplace_hint() - // - // Inserts an element of the specified value by constructing it in-place - // within the `flat_hash_map`, using the position of `hint` as a non-binding - // suggestion for where to begin the insertion search, and only inserts - // provided that no element with the given key already exists. - // - // The element may be constructed even if there already is an element with the - // key in the container, in which case the newly constructed element will be - // destroyed immediately. Prefer `try_emplace()` unless your key is not - // copyable or moveable. - // - // If rehashing occurs due to the insertion, all iterators are invalidated. - using Base::emplace_hint; - - // flat_hash_map::try_emplace() - // - // Inserts an element of the specified value by constructing it in-place - // within the `flat_hash_map`, provided that no element with the given key - // already exists. Unlike `emplace()`, if an element with the given key - // already exists, we guarantee that no element is constructed. - // - // If rehashing occurs due to the insertion, all iterators are invalidated. - // Overloads are listed below. - // - // pair try_emplace(const key_type& k, Args&&... args): - // pair try_emplace(key_type&& k, Args&&... args): - // - // Inserts (via copy or move) the element of the specified key into the - // `flat_hash_map`. - // - // iterator try_emplace(const_iterator hint, - // const key_type& k, Args&&... args): - // iterator try_emplace(const_iterator hint, key_type&& k, Args&&... args): - // - // Inserts (via copy or move) the element of the specified key into the - // `flat_hash_map` using the position of `hint` as a non-binding suggestion - // for where to begin the insertion search. - // - // All `try_emplace()` overloads make the same guarantees regarding rvalue - // arguments as `std::unordered_map::try_emplace()`, namely that these - // functions will not move from rvalue arguments if insertions do not happen. - using Base::try_emplace; - - // flat_hash_map::extract() - // - // Extracts the indicated element, erasing it in the process, and returns it - // as a C++17-compatible node handle. Overloads are listed below. - // - // node_type extract(const_iterator position): - // - // Extracts the key,value pair of the element at the indicated position and - // returns a node handle owning that extracted data. - // - // node_type extract(const key_type& x): - // - // Extracts the key,value pair of the element with a key matching the passed - // key value and returns a node handle owning that extracted data. If the - // `flat_hash_map` does not contain an element with a matching key, this - // function returns an empty node handle. - // - // NOTE: when compiled in an earlier version of C++ than C++17, - // `node_type::key()` returns a const reference to the key instead of a - // mutable reference. We cannot safely return a mutable reference without - // std::launder (which is not available before C++17). - using Base::extract; - - // flat_hash_map::merge() - // - // Extracts elements from a given `source` flat hash map into this - // `flat_hash_map`. If the destination `flat_hash_map` already contains an - // element with an equivalent key, that element is not extracted. - using Base::merge; - - // flat_hash_map::swap(flat_hash_map& other) - // - // Exchanges the contents of this `flat_hash_map` with those of the `other` - // flat hash map, avoiding invocation of any move, copy, or swap operations on - // individual elements. - // - // All iterators and references on the `flat_hash_map` remain valid, excepting - // for the past-the-end iterator, which is invalidated. - // - // `swap()` requires that the flat hash map's hashing and key equivalence - // functions be Swappable, and are exchanged using unqualified calls to - // non-member `swap()`. If the map's allocator has - // `std::allocator_traits::propagate_on_container_swap::value` - // set to `true`, the allocators are also exchanged using an unqualified call - // to non-member `swap()`; otherwise, the allocators are not swapped. - using Base::swap; - - // flat_hash_map::rehash(count) - // - // Rehashes the `flat_hash_map`, setting the number of slots to be at least - // the passed value. If the new number of slots increases the load factor more - // than the current maximum load factor - // (`count` < `size()` / `max_load_factor()`), then the new number of slots - // will be at least `size()` / `max_load_factor()`. - // - // To force a rehash, pass rehash(0). - // - // NOTE: unlike behavior in `std::unordered_map`, references are also - // invalidated upon a `rehash()`. - using Base::rehash; - - // flat_hash_map::reserve(count) - // - // Sets the number of slots in the `flat_hash_map` to the number needed to - // accommodate at least `count` total elements without exceeding the current - // maximum load factor, and may rehash the container if needed. - using Base::reserve; - - // flat_hash_map::at() - // - // Returns a reference to the mapped value of the element with key equivalent - // to the passed key. - using Base::at; - - // flat_hash_map::contains() - // - // Determines whether an element with a key comparing equal to the given `key` - // exists within the `flat_hash_map`, returning `true` if so or `false` - // otherwise. - using Base::contains; - - // flat_hash_map::count(const Key& key) const - // - // Returns the number of elements with a key comparing equal to the given - // `key` within the `flat_hash_map`. note that this function will return - // either `1` or `0` since duplicate keys are not allowed within a - // `flat_hash_map`. - using Base::count; - - // flat_hash_map::equal_range() - // - // Returns a closed range [first, last], defined by a `std::pair` of two - // iterators, containing all elements with the passed key in the - // `flat_hash_map`. - using Base::equal_range; - - // flat_hash_map::find() - // - // Finds an element with the passed `key` within the `flat_hash_map`. - using Base::find; - - // flat_hash_map::operator[]() - // - // Returns a reference to the value mapped to the passed key within the - // `flat_hash_map`, performing an `insert()` if the key does not already - // exist. - // - // If an insertion occurs and results in a rehashing of the container, all - // iterators are invalidated. Otherwise iterators are not affected and - // references are not invalidated. Overloads are listed below. - // - // T& operator[](const Key& key): - // - // Inserts an init_type object constructed in-place if the element with the - // given key does not exist. - // - // T& operator[](Key&& key): - // - // Inserts an init_type object constructed in-place provided that an element - // with the given key does not exist. - using Base::operator[]; - - // flat_hash_map::bucket_count() - // - // Returns the number of "buckets" within the `flat_hash_map`. Note that - // because a flat hash map contains all elements within its internal storage, - // this value simply equals the current capacity of the `flat_hash_map`. - using Base::bucket_count; - - // flat_hash_map::load_factor() - // - // Returns the current load factor of the `flat_hash_map` (the average number - // of slots occupied with a value within the hash map). - using Base::load_factor; - - // flat_hash_map::max_load_factor() - // - // Manages the maximum load factor of the `flat_hash_map`. Overloads are - // listed below. - // - // float flat_hash_map::max_load_factor() - // - // Returns the current maximum load factor of the `flat_hash_map`. - // - // void flat_hash_map::max_load_factor(float ml) - // - // Sets the maximum load factor of the `flat_hash_map` to the passed value. - // - // NOTE: This overload is provided only for API compatibility with the STL; - // `flat_hash_map` will ignore any set load factor and manage its rehashing - // internally as an implementation detail. - using Base::max_load_factor; - - // flat_hash_map::get_allocator() - // - // Returns the allocator function associated with this `flat_hash_map`. - using Base::get_allocator; - - // flat_hash_map::hash_function() - // - // Returns the hashing function used to hash the keys within this - // `flat_hash_map`. - using Base::hash_function; - - // flat_hash_map::key_eq() - // - // Returns the function used for comparing keys equality. - using Base::key_eq; -}; - -// erase_if(flat_hash_map<>, Pred) -// -// Erases all elements that satisfy the predicate `pred` from the container `c`. -// Returns the number of erased elements. -template -typename flat_hash_map::size_type erase_if( - flat_hash_map& c, Predicate pred) { - return container_internal::EraseIf(pred, &c); -} - -namespace container_internal { - -template -struct FlatHashMapPolicy { - using slot_policy = container_internal::map_slot_policy; - using slot_type = typename slot_policy::slot_type; - using key_type = K; - using mapped_type = V; - using init_type = std::pair; - - template - static void construct(Allocator* alloc, slot_type* slot, Args&&... args) { - slot_policy::construct(alloc, slot, std::forward(args)...); - } - - template - static void destroy(Allocator* alloc, slot_type* slot) { - slot_policy::destroy(alloc, slot); - } - - template - static void transfer(Allocator* alloc, slot_type* new_slot, - slot_type* old_slot) { - slot_policy::transfer(alloc, new_slot, old_slot); - } - - template - static decltype(absl::container_internal::DecomposePair( - std::declval(), std::declval()...)) - apply(F&& f, Args&&... args) { - return absl::container_internal::DecomposePair(std::forward(f), - std::forward(args)...); - } - - static size_t space_used(const slot_type*) { return 0; } - - static std::pair& element(slot_type* slot) { return slot->value; } - - static V& value(std::pair* kv) { return kv->second; } - static const V& value(const std::pair* kv) { return kv->second; } -}; - -} // namespace container_internal - -namespace container_algorithm_internal { - -// Specialization of trait in absl/algorithm/container.h -template -struct IsUnorderedContainer< - absl::flat_hash_map> : std::true_type {}; - -} // namespace container_algorithm_internal - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_FLAT_HASH_MAP_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/flat_hash_set.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/flat_hash_set.h deleted file mode 100644 index 4938c70..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/flat_hash_set.h +++ /dev/null @@ -1,510 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: flat_hash_set.h -// ----------------------------------------------------------------------------- -// -// An `absl::flat_hash_set` is an unordered associative container designed to -// be a more efficient replacement for `std::unordered_set`. Like -// `unordered_set`, search, insertion, and deletion of set elements can be done -// as an `O(1)` operation. However, `flat_hash_set` (and other unordered -// associative containers known as the collection of Abseil "Swiss tables") -// contain other optimizations that result in both memory and computation -// advantages. -// -// In most cases, your default choice for a hash set should be a set of type -// `flat_hash_set`. -#ifndef ABSL_CONTAINER_FLAT_HASH_SET_H_ -#define ABSL_CONTAINER_FLAT_HASH_SET_H_ - -#include -#include - -#include "absl/algorithm/container.h" -#include "absl/base/macros.h" -#include "absl/container/internal/container_memory.h" -#include "absl/container/internal/hash_function_defaults.h" // IWYU pragma: export -#include "absl/container/internal/raw_hash_set.h" // IWYU pragma: export -#include "absl/memory/memory.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { -template -struct FlatHashSetPolicy; -} // namespace container_internal - -// ----------------------------------------------------------------------------- -// absl::flat_hash_set -// ----------------------------------------------------------------------------- -// -// An `absl::flat_hash_set` is an unordered associative container which has -// been optimized for both speed and memory footprint in most common use cases. -// Its interface is similar to that of `std::unordered_set` with the -// following notable differences: -// -// * Requires keys that are CopyConstructible -// * Supports heterogeneous lookup, through `find()` and `insert()`, provided -// that the set is provided a compatible heterogeneous hashing function and -// equality operator. -// * Invalidates any references and pointers to elements within the table after -// `rehash()`. -// * Contains a `capacity()` member function indicating the number of element -// slots (open, deleted, and empty) within the hash set. -// * Returns `void` from the `erase(iterator)` overload. -// -// By default, `flat_hash_set` uses the `absl::Hash` hashing framework. All -// fundamental and Abseil types that support the `absl::Hash` framework have a -// compatible equality operator for comparing insertions into `flat_hash_set`. -// If your type is not yet supported by the `absl::Hash` framework, see -// absl/hash/hash.h for information on extending Abseil hashing to user-defined -// types. -// -// Using `absl::flat_hash_set` at interface boundaries in dynamically loaded -// libraries (e.g. .dll, .so) is unsupported due to way `absl::Hash` values may -// be randomized across dynamically loaded libraries. -// -// NOTE: A `flat_hash_set` stores its keys directly inside its implementation -// array to avoid memory indirection. Because a `flat_hash_set` is designed to -// move data when rehashed, set keys will not retain pointer stability. If you -// require pointer stability, consider using -// `absl::flat_hash_set>`. If your type is not moveable and -// you require pointer stability, consider `absl::node_hash_set` instead. -// -// Example: -// -// // Create a flat hash set of three strings -// absl::flat_hash_set ducks = -// {"huey", "dewey", "louie"}; -// -// // Insert a new element into the flat hash set -// ducks.insert("donald"); -// -// // Force a rehash of the flat hash set -// ducks.rehash(0); -// -// // See if "dewey" is present -// if (ducks.contains("dewey")) { -// std::cout << "We found dewey!" << std::endl; -// } -template , - class Eq = absl::container_internal::hash_default_eq, - class Allocator = std::allocator> -class flat_hash_set - : public absl::container_internal::raw_hash_set< - absl::container_internal::FlatHashSetPolicy, Hash, Eq, Allocator> { - using Base = typename flat_hash_set::raw_hash_set; - - public: - // Constructors and Assignment Operators - // - // A flat_hash_set supports the same overload set as `std::unordered_set` - // for construction and assignment: - // - // * Default constructor - // - // // No allocation for the table's elements is made. - // absl::flat_hash_set set1; - // - // * Initializer List constructor - // - // absl::flat_hash_set set2 = - // {{"huey"}, {"dewey"}, {"louie"},}; - // - // * Copy constructor - // - // absl::flat_hash_set set3(set2); - // - // * Copy assignment operator - // - // // Hash functor and Comparator are copied as well - // absl::flat_hash_set set4; - // set4 = set3; - // - // * Move constructor - // - // // Move is guaranteed efficient - // absl::flat_hash_set set5(std::move(set4)); - // - // * Move assignment operator - // - // // May be efficient if allocators are compatible - // absl::flat_hash_set set6; - // set6 = std::move(set5); - // - // * Range constructor - // - // std::vector v = {"a", "b"}; - // absl::flat_hash_set set7(v.begin(), v.end()); - flat_hash_set() {} - using Base::Base; - - // flat_hash_set::begin() - // - // Returns an iterator to the beginning of the `flat_hash_set`. - using Base::begin; - - // flat_hash_set::cbegin() - // - // Returns a const iterator to the beginning of the `flat_hash_set`. - using Base::cbegin; - - // flat_hash_set::cend() - // - // Returns a const iterator to the end of the `flat_hash_set`. - using Base::cend; - - // flat_hash_set::end() - // - // Returns an iterator to the end of the `flat_hash_set`. - using Base::end; - - // flat_hash_set::capacity() - // - // Returns the number of element slots (assigned, deleted, and empty) - // available within the `flat_hash_set`. - // - // NOTE: this member function is particular to `absl::flat_hash_set` and is - // not provided in the `std::unordered_set` API. - using Base::capacity; - - // flat_hash_set::empty() - // - // Returns whether or not the `flat_hash_set` is empty. - using Base::empty; - - // flat_hash_set::max_size() - // - // Returns the largest theoretical possible number of elements within a - // `flat_hash_set` under current memory constraints. This value can be thought - // of the largest value of `std::distance(begin(), end())` for a - // `flat_hash_set`. - using Base::max_size; - - // flat_hash_set::size() - // - // Returns the number of elements currently within the `flat_hash_set`. - using Base::size; - - // flat_hash_set::clear() - // - // Removes all elements from the `flat_hash_set`. Invalidates any references, - // pointers, or iterators referring to contained elements. - // - // NOTE: this operation may shrink the underlying buffer. To avoid shrinking - // the underlying buffer call `erase(begin(), end())`. - using Base::clear; - - // flat_hash_set::erase() - // - // Erases elements within the `flat_hash_set`. Erasing does not trigger a - // rehash. Overloads are listed below. - // - // void erase(const_iterator pos): - // - // Erases the element at `position` of the `flat_hash_set`, returning - // `void`. - // - // NOTE: returning `void` in this case is different than that of STL - // containers in general and `std::unordered_set` in particular (which - // return an iterator to the element following the erased element). If that - // iterator is needed, simply post increment the iterator: - // - // set.erase(it++); - // - // iterator erase(const_iterator first, const_iterator last): - // - // Erases the elements in the open interval [`first`, `last`), returning an - // iterator pointing to `last`. - // - // size_type erase(const key_type& key): - // - // Erases the element with the matching key, if it exists, returning the - // number of elements erased (0 or 1). - using Base::erase; - - // flat_hash_set::insert() - // - // Inserts an element of the specified value into the `flat_hash_set`, - // returning an iterator pointing to the newly inserted element, provided that - // an element with the given key does not already exist. If rehashing occurs - // due to the insertion, all iterators are invalidated. Overloads are listed - // below. - // - // std::pair insert(const T& value): - // - // Inserts a value into the `flat_hash_set`. Returns a pair consisting of an - // iterator to the inserted element (or to the element that prevented the - // insertion) and a bool denoting whether the insertion took place. - // - // std::pair insert(T&& value): - // - // Inserts a moveable value into the `flat_hash_set`. Returns a pair - // consisting of an iterator to the inserted element (or to the element that - // prevented the insertion) and a bool denoting whether the insertion took - // place. - // - // iterator insert(const_iterator hint, const T& value): - // iterator insert(const_iterator hint, T&& value): - // - // Inserts a value, using the position of `hint` as a non-binding suggestion - // for where to begin the insertion search. Returns an iterator to the - // inserted element, or to the existing element that prevented the - // insertion. - // - // void insert(InputIterator first, InputIterator last): - // - // Inserts a range of values [`first`, `last`). - // - // NOTE: Although the STL does not specify which element may be inserted if - // multiple keys compare equivalently, for `flat_hash_set` we guarantee the - // first match is inserted. - // - // void insert(std::initializer_list ilist): - // - // Inserts the elements within the initializer list `ilist`. - // - // NOTE: Although the STL does not specify which element may be inserted if - // multiple keys compare equivalently within the initializer list, for - // `flat_hash_set` we guarantee the first match is inserted. - using Base::insert; - - // flat_hash_set::emplace() - // - // Inserts an element of the specified value by constructing it in-place - // within the `flat_hash_set`, provided that no element with the given key - // already exists. - // - // The element may be constructed even if there already is an element with the - // key in the container, in which case the newly constructed element will be - // destroyed immediately. - // - // If rehashing occurs due to the insertion, all iterators are invalidated. - using Base::emplace; - - // flat_hash_set::emplace_hint() - // - // Inserts an element of the specified value by constructing it in-place - // within the `flat_hash_set`, using the position of `hint` as a non-binding - // suggestion for where to begin the insertion search, and only inserts - // provided that no element with the given key already exists. - // - // The element may be constructed even if there already is an element with the - // key in the container, in which case the newly constructed element will be - // destroyed immediately. - // - // If rehashing occurs due to the insertion, all iterators are invalidated. - using Base::emplace_hint; - - // flat_hash_set::extract() - // - // Extracts the indicated element, erasing it in the process, and returns it - // as a C++17-compatible node handle. Overloads are listed below. - // - // node_type extract(const_iterator position): - // - // Extracts the element at the indicated position and returns a node handle - // owning that extracted data. - // - // node_type extract(const key_type& x): - // - // Extracts the element with the key matching the passed key value and - // returns a node handle owning that extracted data. If the `flat_hash_set` - // does not contain an element with a matching key, this function returns an - // empty node handle. - using Base::extract; - - // flat_hash_set::merge() - // - // Extracts elements from a given `source` flat hash set into this - // `flat_hash_set`. If the destination `flat_hash_set` already contains an - // element with an equivalent key, that element is not extracted. - using Base::merge; - - // flat_hash_set::swap(flat_hash_set& other) - // - // Exchanges the contents of this `flat_hash_set` with those of the `other` - // flat hash set, avoiding invocation of any move, copy, or swap operations on - // individual elements. - // - // All iterators and references on the `flat_hash_set` remain valid, excepting - // for the past-the-end iterator, which is invalidated. - // - // `swap()` requires that the flat hash set's hashing and key equivalence - // functions be Swappable, and are exchaged using unqualified calls to - // non-member `swap()`. If the set's allocator has - // `std::allocator_traits::propagate_on_container_swap::value` - // set to `true`, the allocators are also exchanged using an unqualified call - // to non-member `swap()`; otherwise, the allocators are not swapped. - using Base::swap; - - // flat_hash_set::rehash(count) - // - // Rehashes the `flat_hash_set`, setting the number of slots to be at least - // the passed value. If the new number of slots increases the load factor more - // than the current maximum load factor - // (`count` < `size()` / `max_load_factor()`), then the new number of slots - // will be at least `size()` / `max_load_factor()`. - // - // To force a rehash, pass rehash(0). - // - // NOTE: unlike behavior in `std::unordered_set`, references are also - // invalidated upon a `rehash()`. - using Base::rehash; - - // flat_hash_set::reserve(count) - // - // Sets the number of slots in the `flat_hash_set` to the number needed to - // accommodate at least `count` total elements without exceeding the current - // maximum load factor, and may rehash the container if needed. - using Base::reserve; - - // flat_hash_set::contains() - // - // Determines whether an element comparing equal to the given `key` exists - // within the `flat_hash_set`, returning `true` if so or `false` otherwise. - using Base::contains; - - // flat_hash_set::count(const Key& key) const - // - // Returns the number of elements comparing equal to the given `key` within - // the `flat_hash_set`. note that this function will return either `1` or `0` - // since duplicate elements are not allowed within a `flat_hash_set`. - using Base::count; - - // flat_hash_set::equal_range() - // - // Returns a closed range [first, last], defined by a `std::pair` of two - // iterators, containing all elements with the passed key in the - // `flat_hash_set`. - using Base::equal_range; - - // flat_hash_set::find() - // - // Finds an element with the passed `key` within the `flat_hash_set`. - using Base::find; - - // flat_hash_set::bucket_count() - // - // Returns the number of "buckets" within the `flat_hash_set`. Note that - // because a flat hash set contains all elements within its internal storage, - // this value simply equals the current capacity of the `flat_hash_set`. - using Base::bucket_count; - - // flat_hash_set::load_factor() - // - // Returns the current load factor of the `flat_hash_set` (the average number - // of slots occupied with a value within the hash set). - using Base::load_factor; - - // flat_hash_set::max_load_factor() - // - // Manages the maximum load factor of the `flat_hash_set`. Overloads are - // listed below. - // - // float flat_hash_set::max_load_factor() - // - // Returns the current maximum load factor of the `flat_hash_set`. - // - // void flat_hash_set::max_load_factor(float ml) - // - // Sets the maximum load factor of the `flat_hash_set` to the passed value. - // - // NOTE: This overload is provided only for API compatibility with the STL; - // `flat_hash_set` will ignore any set load factor and manage its rehashing - // internally as an implementation detail. - using Base::max_load_factor; - - // flat_hash_set::get_allocator() - // - // Returns the allocator function associated with this `flat_hash_set`. - using Base::get_allocator; - - // flat_hash_set::hash_function() - // - // Returns the hashing function used to hash the keys within this - // `flat_hash_set`. - using Base::hash_function; - - // flat_hash_set::key_eq() - // - // Returns the function used for comparing keys equality. - using Base::key_eq; -}; - -// erase_if(flat_hash_set<>, Pred) -// -// Erases all elements that satisfy the predicate `pred` from the container `c`. -// Returns the number of erased elements. -template -typename flat_hash_set::size_type erase_if( - flat_hash_set& c, Predicate pred) { - return container_internal::EraseIf(pred, &c); -} - -namespace container_internal { - -template -struct FlatHashSetPolicy { - using slot_type = T; - using key_type = T; - using init_type = T; - using constant_iterators = std::true_type; - - template - static void construct(Allocator* alloc, slot_type* slot, Args&&... args) { - absl::allocator_traits::construct(*alloc, slot, - std::forward(args)...); - } - - template - static void destroy(Allocator* alloc, slot_type* slot) { - absl::allocator_traits::destroy(*alloc, slot); - } - - template - static void transfer(Allocator* alloc, slot_type* new_slot, - slot_type* old_slot) { - construct(alloc, new_slot, std::move(*old_slot)); - destroy(alloc, old_slot); - } - - static T& element(slot_type* slot) { return *slot; } - - template - static decltype(absl::container_internal::DecomposeValue( - std::declval(), std::declval()...)) - apply(F&& f, Args&&... args) { - return absl::container_internal::DecomposeValue( - std::forward(f), std::forward(args)...); - } - - static size_t space_used(const T*) { return 0; } -}; -} // namespace container_internal - -namespace container_algorithm_internal { - -// Specialization of trait in absl/algorithm/container.h -template -struct IsUnorderedContainer> - : std::true_type {}; - -} // namespace container_algorithm_internal - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_FLAT_HASH_SET_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/inlined_vector.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/inlined_vector.h deleted file mode 100644 index bc1c4a7..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/inlined_vector.h +++ /dev/null @@ -1,866 +0,0 @@ -// Copyright 2019 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: inlined_vector.h -// ----------------------------------------------------------------------------- -// -// This header file contains the declaration and definition of an "inlined -// vector" which behaves in an equivalent fashion to a `std::vector`, except -// that storage for small sequences of the vector are provided inline without -// requiring any heap allocation. -// -// An `absl::InlinedVector` specifies the default capacity `N` as one of -// its template parameters. Instances where `size() <= N` hold contained -// elements in inline space. Typically `N` is very small so that sequences that -// are expected to be short do not require allocations. -// -// An `absl::InlinedVector` does not usually require a specific allocator. If -// the inlined vector grows beyond its initial constraints, it will need to -// allocate (as any normal `std::vector` would). This is usually performed with -// the default allocator (defined as `std::allocator`). Optionally, a custom -// allocator type may be specified as `A` in `absl::InlinedVector`. - -#ifndef ABSL_CONTAINER_INLINED_VECTOR_H_ -#define ABSL_CONTAINER_INLINED_VECTOR_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/algorithm/algorithm.h" -#include "absl/base/internal/throw_delegate.h" -#include "absl/base/macros.h" -#include "absl/base/optimization.h" -#include "absl/base/port.h" -#include "absl/container/internal/inlined_vector.h" -#include "absl/memory/memory.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -// ----------------------------------------------------------------------------- -// InlinedVector -// ----------------------------------------------------------------------------- -// -// An `absl::InlinedVector` is designed to be a drop-in replacement for -// `std::vector` for use cases where the vector's size is sufficiently small -// that it can be inlined. If the inlined vector does grow beyond its estimated -// capacity, it will trigger an initial allocation on the heap, and will behave -// as a `std::vector`. The API of the `absl::InlinedVector` within this file is -// designed to cover the same API footprint as covered by `std::vector`. -template > -class InlinedVector { - static_assert(N > 0, "`absl::InlinedVector` requires an inlined capacity."); - - using Storage = inlined_vector_internal::Storage; - - template - using AllocatorTraits = inlined_vector_internal::AllocatorTraits; - template - using MoveIterator = inlined_vector_internal::MoveIterator; - template - using IsMemcpyOk = inlined_vector_internal::IsMemcpyOk; - - template - using IteratorValueAdapter = - inlined_vector_internal::IteratorValueAdapter; - template - using CopyValueAdapter = inlined_vector_internal::CopyValueAdapter; - template - using DefaultValueAdapter = - inlined_vector_internal::DefaultValueAdapter; - - template - using EnableIfAtLeastForwardIterator = absl::enable_if_t< - inlined_vector_internal::IsAtLeastForwardIterator::value, int>; - template - using DisableIfAtLeastForwardIterator = absl::enable_if_t< - !inlined_vector_internal::IsAtLeastForwardIterator::value, int>; - - public: - using allocator_type = A; - using value_type = inlined_vector_internal::ValueType; - using pointer = inlined_vector_internal::Pointer; - using const_pointer = inlined_vector_internal::ConstPointer; - using size_type = inlined_vector_internal::SizeType; - using difference_type = inlined_vector_internal::DifferenceType; - using reference = inlined_vector_internal::Reference; - using const_reference = inlined_vector_internal::ConstReference; - using iterator = inlined_vector_internal::Iterator; - using const_iterator = inlined_vector_internal::ConstIterator; - using reverse_iterator = inlined_vector_internal::ReverseIterator; - using const_reverse_iterator = - inlined_vector_internal::ConstReverseIterator; - - // --------------------------------------------------------------------------- - // InlinedVector Constructors and Destructor - // --------------------------------------------------------------------------- - - // Creates an empty inlined vector with a value-initialized allocator. - InlinedVector() noexcept(noexcept(allocator_type())) : storage_() {} - - // Creates an empty inlined vector with a copy of `allocator`. - explicit InlinedVector(const allocator_type& allocator) noexcept - : storage_(allocator) {} - - // Creates an inlined vector with `n` copies of `value_type()`. - explicit InlinedVector(size_type n, - const allocator_type& allocator = allocator_type()) - : storage_(allocator) { - storage_.Initialize(DefaultValueAdapter(), n); - } - - // Creates an inlined vector with `n` copies of `v`. - InlinedVector(size_type n, const_reference v, - const allocator_type& allocator = allocator_type()) - : storage_(allocator) { - storage_.Initialize(CopyValueAdapter(std::addressof(v)), n); - } - - // Creates an inlined vector with copies of the elements of `list`. - InlinedVector(std::initializer_list list, - const allocator_type& allocator = allocator_type()) - : InlinedVector(list.begin(), list.end(), allocator) {} - - // Creates an inlined vector with elements constructed from the provided - // forward iterator range [`first`, `last`). - // - // NOTE: the `enable_if` prevents ambiguous interpretation between a call to - // this constructor with two integral arguments and a call to the above - // `InlinedVector(size_type, const_reference)` constructor. - template = 0> - InlinedVector(ForwardIterator first, ForwardIterator last, - const allocator_type& allocator = allocator_type()) - : storage_(allocator) { - storage_.Initialize(IteratorValueAdapter(first), - static_cast(std::distance(first, last))); - } - - // Creates an inlined vector with elements constructed from the provided input - // iterator range [`first`, `last`). - template = 0> - InlinedVector(InputIterator first, InputIterator last, - const allocator_type& allocator = allocator_type()) - : storage_(allocator) { - std::copy(first, last, std::back_inserter(*this)); - } - - // Creates an inlined vector by copying the contents of `other` using - // `other`'s allocator. - InlinedVector(const InlinedVector& other) - : InlinedVector(other, other.storage_.GetAllocator()) {} - - // Creates an inlined vector by copying the contents of `other` using the - // provided `allocator`. - InlinedVector(const InlinedVector& other, const allocator_type& allocator) - : storage_(allocator) { - if (other.empty()) { - // Empty; nothing to do. - } else if (IsMemcpyOk::value && !other.storage_.GetIsAllocated()) { - // Memcpy-able and do not need allocation. - storage_.MemcpyFrom(other.storage_); - } else { - storage_.InitFrom(other.storage_); - } - } - - // Creates an inlined vector by moving in the contents of `other` without - // allocating. If `other` contains allocated memory, the newly-created inlined - // vector will take ownership of that memory. However, if `other` does not - // contain allocated memory, the newly-created inlined vector will perform - // element-wise move construction of the contents of `other`. - // - // NOTE: since no allocation is performed for the inlined vector in either - // case, the `noexcept(...)` specification depends on whether moving the - // underlying objects can throw. It is assumed assumed that... - // a) move constructors should only throw due to allocation failure. - // b) if `value_type`'s move constructor allocates, it uses the same - // allocation function as the inlined vector's allocator. - // Thus, the move constructor is non-throwing if the allocator is non-throwing - // or `value_type`'s move constructor is specified as `noexcept`. - InlinedVector(InlinedVector&& other) noexcept( - absl::allocator_is_nothrow::value || - std::is_nothrow_move_constructible::value) - : storage_(other.storage_.GetAllocator()) { - if (IsMemcpyOk::value) { - storage_.MemcpyFrom(other.storage_); - - other.storage_.SetInlinedSize(0); - } else if (other.storage_.GetIsAllocated()) { - storage_.SetAllocation({other.storage_.GetAllocatedData(), - other.storage_.GetAllocatedCapacity()}); - storage_.SetAllocatedSize(other.storage_.GetSize()); - - other.storage_.SetInlinedSize(0); - } else { - IteratorValueAdapter> other_values( - MoveIterator(other.storage_.GetInlinedData())); - - inlined_vector_internal::ConstructElements( - storage_.GetAllocator(), storage_.GetInlinedData(), other_values, - other.storage_.GetSize()); - - storage_.SetInlinedSize(other.storage_.GetSize()); - } - } - - // Creates an inlined vector by moving in the contents of `other` with a copy - // of `allocator`. - // - // NOTE: if `other`'s allocator is not equal to `allocator`, even if `other` - // contains allocated memory, this move constructor will still allocate. Since - // allocation is performed, this constructor can only be `noexcept` if the - // specified allocator is also `noexcept`. - InlinedVector( - InlinedVector&& other, - const allocator_type& - allocator) noexcept(absl::allocator_is_nothrow::value) - : storage_(allocator) { - if (IsMemcpyOk::value) { - storage_.MemcpyFrom(other.storage_); - - other.storage_.SetInlinedSize(0); - } else if ((storage_.GetAllocator() == other.storage_.GetAllocator()) && - other.storage_.GetIsAllocated()) { - storage_.SetAllocation({other.storage_.GetAllocatedData(), - other.storage_.GetAllocatedCapacity()}); - storage_.SetAllocatedSize(other.storage_.GetSize()); - - other.storage_.SetInlinedSize(0); - } else { - storage_.Initialize(IteratorValueAdapter>( - MoveIterator(other.data())), - other.size()); - } - } - - ~InlinedVector() {} - - // --------------------------------------------------------------------------- - // InlinedVector Member Accessors - // --------------------------------------------------------------------------- - - // `InlinedVector::empty()` - // - // Returns whether the inlined vector contains no elements. - bool empty() const noexcept { return !size(); } - - // `InlinedVector::size()` - // - // Returns the number of elements in the inlined vector. - size_type size() const noexcept { return storage_.GetSize(); } - - // `InlinedVector::max_size()` - // - // Returns the maximum number of elements the inlined vector can hold. - size_type max_size() const noexcept { - // One bit of the size storage is used to indicate whether the inlined - // vector contains allocated memory. As a result, the maximum size that the - // inlined vector can express is half of the max for `size_type`. - return (std::numeric_limits::max)() / 2; - } - - // `InlinedVector::capacity()` - // - // Returns the number of elements that could be stored in the inlined vector - // without requiring a reallocation. - // - // NOTE: for most inlined vectors, `capacity()` should be equal to the - // template parameter `N`. For inlined vectors which exceed this capacity, - // they will no longer be inlined and `capacity()` will equal the capactity of - // the allocated memory. - size_type capacity() const noexcept { - return storage_.GetIsAllocated() ? storage_.GetAllocatedCapacity() - : storage_.GetInlinedCapacity(); - } - - // `InlinedVector::data()` - // - // Returns a `pointer` to the elements of the inlined vector. This pointer - // can be used to access and modify the contained elements. - // - // NOTE: only elements within [`data()`, `data() + size()`) are valid. - pointer data() noexcept { - return storage_.GetIsAllocated() ? storage_.GetAllocatedData() - : storage_.GetInlinedData(); - } - - // Overload of `InlinedVector::data()` that returns a `const_pointer` to the - // elements of the inlined vector. This pointer can be used to access but not - // modify the contained elements. - // - // NOTE: only elements within [`data()`, `data() + size()`) are valid. - const_pointer data() const noexcept { - return storage_.GetIsAllocated() ? storage_.GetAllocatedData() - : storage_.GetInlinedData(); - } - - // `InlinedVector::operator[](...)` - // - // Returns a `reference` to the `i`th element of the inlined vector. - reference operator[](size_type i) { - ABSL_HARDENING_ASSERT(i < size()); - return data()[i]; - } - - // Overload of `InlinedVector::operator[](...)` that returns a - // `const_reference` to the `i`th element of the inlined vector. - const_reference operator[](size_type i) const { - ABSL_HARDENING_ASSERT(i < size()); - return data()[i]; - } - - // `InlinedVector::at(...)` - // - // Returns a `reference` to the `i`th element of the inlined vector. - // - // NOTE: if `i` is not within the required range of `InlinedVector::at(...)`, - // in both debug and non-debug builds, `std::out_of_range` will be thrown. - reference at(size_type i) { - if (ABSL_PREDICT_FALSE(i >= size())) { - base_internal::ThrowStdOutOfRange( - "`InlinedVector::at(size_type)` failed bounds check"); - } - return data()[i]; - } - - // Overload of `InlinedVector::at(...)` that returns a `const_reference` to - // the `i`th element of the inlined vector. - // - // NOTE: if `i` is not within the required range of `InlinedVector::at(...)`, - // in both debug and non-debug builds, `std::out_of_range` will be thrown. - const_reference at(size_type i) const { - if (ABSL_PREDICT_FALSE(i >= size())) { - base_internal::ThrowStdOutOfRange( - "`InlinedVector::at(size_type) const` failed bounds check"); - } - return data()[i]; - } - - // `InlinedVector::front()` - // - // Returns a `reference` to the first element of the inlined vector. - reference front() { - ABSL_HARDENING_ASSERT(!empty()); - return data()[0]; - } - - // Overload of `InlinedVector::front()` that returns a `const_reference` to - // the first element of the inlined vector. - const_reference front() const { - ABSL_HARDENING_ASSERT(!empty()); - return data()[0]; - } - - // `InlinedVector::back()` - // - // Returns a `reference` to the last element of the inlined vector. - reference back() { - ABSL_HARDENING_ASSERT(!empty()); - return data()[size() - 1]; - } - - // Overload of `InlinedVector::back()` that returns a `const_reference` to the - // last element of the inlined vector. - const_reference back() const { - ABSL_HARDENING_ASSERT(!empty()); - return data()[size() - 1]; - } - - // `InlinedVector::begin()` - // - // Returns an `iterator` to the beginning of the inlined vector. - iterator begin() noexcept { return data(); } - - // Overload of `InlinedVector::begin()` that returns a `const_iterator` to - // the beginning of the inlined vector. - const_iterator begin() const noexcept { return data(); } - - // `InlinedVector::end()` - // - // Returns an `iterator` to the end of the inlined vector. - iterator end() noexcept { return data() + size(); } - - // Overload of `InlinedVector::end()` that returns a `const_iterator` to the - // end of the inlined vector. - const_iterator end() const noexcept { return data() + size(); } - - // `InlinedVector::cbegin()` - // - // Returns a `const_iterator` to the beginning of the inlined vector. - const_iterator cbegin() const noexcept { return begin(); } - - // `InlinedVector::cend()` - // - // Returns a `const_iterator` to the end of the inlined vector. - const_iterator cend() const noexcept { return end(); } - - // `InlinedVector::rbegin()` - // - // Returns a `reverse_iterator` from the end of the inlined vector. - reverse_iterator rbegin() noexcept { return reverse_iterator(end()); } - - // Overload of `InlinedVector::rbegin()` that returns a - // `const_reverse_iterator` from the end of the inlined vector. - const_reverse_iterator rbegin() const noexcept { - return const_reverse_iterator(end()); - } - - // `InlinedVector::rend()` - // - // Returns a `reverse_iterator` from the beginning of the inlined vector. - reverse_iterator rend() noexcept { return reverse_iterator(begin()); } - - // Overload of `InlinedVector::rend()` that returns a `const_reverse_iterator` - // from the beginning of the inlined vector. - const_reverse_iterator rend() const noexcept { - return const_reverse_iterator(begin()); - } - - // `InlinedVector::crbegin()` - // - // Returns a `const_reverse_iterator` from the end of the inlined vector. - const_reverse_iterator crbegin() const noexcept { return rbegin(); } - - // `InlinedVector::crend()` - // - // Returns a `const_reverse_iterator` from the beginning of the inlined - // vector. - const_reverse_iterator crend() const noexcept { return rend(); } - - // `InlinedVector::get_allocator()` - // - // Returns a copy of the inlined vector's allocator. - allocator_type get_allocator() const { return storage_.GetAllocator(); } - - // --------------------------------------------------------------------------- - // InlinedVector Member Mutators - // --------------------------------------------------------------------------- - - // `InlinedVector::operator=(...)` - // - // Replaces the elements of the inlined vector with copies of the elements of - // `list`. - InlinedVector& operator=(std::initializer_list list) { - assign(list.begin(), list.end()); - - return *this; - } - - // Overload of `InlinedVector::operator=(...)` that replaces the elements of - // the inlined vector with copies of the elements of `other`. - InlinedVector& operator=(const InlinedVector& other) { - if (ABSL_PREDICT_TRUE(this != std::addressof(other))) { - const_pointer other_data = other.data(); - assign(other_data, other_data + other.size()); - } - - return *this; - } - - // Overload of `InlinedVector::operator=(...)` that moves the elements of - // `other` into the inlined vector. - // - // NOTE: as a result of calling this overload, `other` is left in a valid but - // unspecified state. - InlinedVector& operator=(InlinedVector&& other) { - if (ABSL_PREDICT_TRUE(this != std::addressof(other))) { - if (IsMemcpyOk::value || other.storage_.GetIsAllocated()) { - inlined_vector_internal::DestroyAdapter::DestroyElements( - storage_.GetAllocator(), data(), size()); - storage_.DeallocateIfAllocated(); - storage_.MemcpyFrom(other.storage_); - - other.storage_.SetInlinedSize(0); - } else { - storage_.Assign(IteratorValueAdapter>( - MoveIterator(other.storage_.GetInlinedData())), - other.size()); - } - } - - return *this; - } - - // `InlinedVector::assign(...)` - // - // Replaces the contents of the inlined vector with `n` copies of `v`. - void assign(size_type n, const_reference v) { - storage_.Assign(CopyValueAdapter(std::addressof(v)), n); - } - - // Overload of `InlinedVector::assign(...)` that replaces the contents of the - // inlined vector with copies of the elements of `list`. - void assign(std::initializer_list list) { - assign(list.begin(), list.end()); - } - - // Overload of `InlinedVector::assign(...)` to replace the contents of the - // inlined vector with the range [`first`, `last`). - // - // NOTE: this overload is for iterators that are "forward" category or better. - template = 0> - void assign(ForwardIterator first, ForwardIterator last) { - storage_.Assign(IteratorValueAdapter(first), - static_cast(std::distance(first, last))); - } - - // Overload of `InlinedVector::assign(...)` to replace the contents of the - // inlined vector with the range [`first`, `last`). - // - // NOTE: this overload is for iterators that are "input" category. - template = 0> - void assign(InputIterator first, InputIterator last) { - size_type i = 0; - for (; i < size() && first != last; ++i, static_cast(++first)) { - data()[i] = *first; - } - - erase(data() + i, data() + size()); - std::copy(first, last, std::back_inserter(*this)); - } - - // `InlinedVector::resize(...)` - // - // Resizes the inlined vector to contain `n` elements. - // - // NOTE: If `n` is smaller than `size()`, extra elements are destroyed. If `n` - // is larger than `size()`, new elements are value-initialized. - void resize(size_type n) { - ABSL_HARDENING_ASSERT(n <= max_size()); - storage_.Resize(DefaultValueAdapter(), n); - } - - // Overload of `InlinedVector::resize(...)` that resizes the inlined vector to - // contain `n` elements. - // - // NOTE: if `n` is smaller than `size()`, extra elements are destroyed. If `n` - // is larger than `size()`, new elements are copied-constructed from `v`. - void resize(size_type n, const_reference v) { - ABSL_HARDENING_ASSERT(n <= max_size()); - storage_.Resize(CopyValueAdapter(std::addressof(v)), n); - } - - // `InlinedVector::insert(...)` - // - // Inserts a copy of `v` at `pos`, returning an `iterator` to the newly - // inserted element. - iterator insert(const_iterator pos, const_reference v) { - return emplace(pos, v); - } - - // Overload of `InlinedVector::insert(...)` that inserts `v` at `pos` using - // move semantics, returning an `iterator` to the newly inserted element. - iterator insert(const_iterator pos, value_type&& v) { - return emplace(pos, std::move(v)); - } - - // Overload of `InlinedVector::insert(...)` that inserts `n` contiguous copies - // of `v` starting at `pos`, returning an `iterator` pointing to the first of - // the newly inserted elements. - iterator insert(const_iterator pos, size_type n, const_reference v) { - ABSL_HARDENING_ASSERT(pos >= begin()); - ABSL_HARDENING_ASSERT(pos <= end()); - - if (ABSL_PREDICT_TRUE(n != 0)) { - value_type dealias = v; - // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102329#c2 - // It appears that GCC thinks that since `pos` is a const pointer and may - // point to uninitialized memory at this point, a warning should be - // issued. But `pos` is actually only used to compute an array index to - // write to. -#if !defined(__clang__) && defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" -#endif - return storage_.Insert(pos, CopyValueAdapter(std::addressof(dealias)), - n); -#if !defined(__clang__) && defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - } else { - return const_cast(pos); - } - } - - // Overload of `InlinedVector::insert(...)` that inserts copies of the - // elements of `list` starting at `pos`, returning an `iterator` pointing to - // the first of the newly inserted elements. - iterator insert(const_iterator pos, std::initializer_list list) { - return insert(pos, list.begin(), list.end()); - } - - // Overload of `InlinedVector::insert(...)` that inserts the range [`first`, - // `last`) starting at `pos`, returning an `iterator` pointing to the first - // of the newly inserted elements. - // - // NOTE: this overload is for iterators that are "forward" category or better. - template = 0> - iterator insert(const_iterator pos, ForwardIterator first, - ForwardIterator last) { - ABSL_HARDENING_ASSERT(pos >= begin()); - ABSL_HARDENING_ASSERT(pos <= end()); - - if (ABSL_PREDICT_TRUE(first != last)) { - return storage_.Insert(pos, - IteratorValueAdapter(first), - std::distance(first, last)); - } else { - return const_cast(pos); - } - } - - // Overload of `InlinedVector::insert(...)` that inserts the range [`first`, - // `last`) starting at `pos`, returning an `iterator` pointing to the first - // of the newly inserted elements. - // - // NOTE: this overload is for iterators that are "input" category. - template = 0> - iterator insert(const_iterator pos, InputIterator first, InputIterator last) { - ABSL_HARDENING_ASSERT(pos >= begin()); - ABSL_HARDENING_ASSERT(pos <= end()); - - size_type index = std::distance(cbegin(), pos); - for (size_type i = index; first != last; ++i, static_cast(++first)) { - insert(data() + i, *first); - } - - return iterator(data() + index); - } - - // `InlinedVector::emplace(...)` - // - // Constructs and inserts an element using `args...` in the inlined vector at - // `pos`, returning an `iterator` pointing to the newly emplaced element. - template - iterator emplace(const_iterator pos, Args&&... args) { - ABSL_HARDENING_ASSERT(pos >= begin()); - ABSL_HARDENING_ASSERT(pos <= end()); - - value_type dealias(std::forward(args)...); - return storage_.Insert(pos, - IteratorValueAdapter>( - MoveIterator(std::addressof(dealias))), - 1); - } - - // `InlinedVector::emplace_back(...)` - // - // Constructs and inserts an element using `args...` in the inlined vector at - // `end()`, returning a `reference` to the newly emplaced element. - template - reference emplace_back(Args&&... args) { - return storage_.EmplaceBack(std::forward(args)...); - } - - // `InlinedVector::push_back(...)` - // - // Inserts a copy of `v` in the inlined vector at `end()`. - void push_back(const_reference v) { static_cast(emplace_back(v)); } - - // Overload of `InlinedVector::push_back(...)` for inserting `v` at `end()` - // using move semantics. - void push_back(value_type&& v) { - static_cast(emplace_back(std::move(v))); - } - - // `InlinedVector::pop_back()` - // - // Destroys the element at `back()`, reducing the size by `1`. - void pop_back() noexcept { - ABSL_HARDENING_ASSERT(!empty()); - - AllocatorTraits::destroy(storage_.GetAllocator(), data() + (size() - 1)); - storage_.SubtractSize(1); - } - - // `InlinedVector::erase(...)` - // - // Erases the element at `pos`, returning an `iterator` pointing to where the - // erased element was located. - // - // NOTE: may return `end()`, which is not dereferencable. - iterator erase(const_iterator pos) { - ABSL_HARDENING_ASSERT(pos >= begin()); - ABSL_HARDENING_ASSERT(pos < end()); - - return storage_.Erase(pos, pos + 1); - } - - // Overload of `InlinedVector::erase(...)` that erases every element in the - // range [`from`, `to`), returning an `iterator` pointing to where the first - // erased element was located. - // - // NOTE: may return `end()`, which is not dereferencable. - iterator erase(const_iterator from, const_iterator to) { - ABSL_HARDENING_ASSERT(from >= begin()); - ABSL_HARDENING_ASSERT(from <= to); - ABSL_HARDENING_ASSERT(to <= end()); - - if (ABSL_PREDICT_TRUE(from != to)) { - return storage_.Erase(from, to); - } else { - return const_cast(from); - } - } - - // `InlinedVector::clear()` - // - // Destroys all elements in the inlined vector, setting the size to `0` and - // deallocating any held memory. - void clear() noexcept { - inlined_vector_internal::DestroyAdapter::DestroyElements( - storage_.GetAllocator(), data(), size()); - storage_.DeallocateIfAllocated(); - - storage_.SetInlinedSize(0); - } - - // `InlinedVector::reserve(...)` - // - // Ensures that there is enough room for at least `n` elements. - void reserve(size_type n) { storage_.Reserve(n); } - - // `InlinedVector::shrink_to_fit()` - // - // Attempts to reduce memory usage by moving elements to (or keeping elements - // in) the smallest available buffer sufficient for containing `size()` - // elements. - // - // If `size()` is sufficiently small, the elements will be moved into (or kept - // in) the inlined space. - void shrink_to_fit() { - if (storage_.GetIsAllocated()) { - storage_.ShrinkToFit(); - } - } - - // `InlinedVector::swap(...)` - // - // Swaps the contents of the inlined vector with `other`. - void swap(InlinedVector& other) { - if (ABSL_PREDICT_TRUE(this != std::addressof(other))) { - storage_.Swap(std::addressof(other.storage_)); - } - } - - private: - template - friend H AbslHashValue(H h, const absl::InlinedVector& a); - - Storage storage_; -}; - -// ----------------------------------------------------------------------------- -// InlinedVector Non-Member Functions -// ----------------------------------------------------------------------------- - -// `swap(...)` -// -// Swaps the contents of two inlined vectors. -template -void swap(absl::InlinedVector& a, - absl::InlinedVector& b) noexcept(noexcept(a.swap(b))) { - a.swap(b); -} - -// `operator==(...)` -// -// Tests for value-equality of two inlined vectors. -template -bool operator==(const absl::InlinedVector& a, - const absl::InlinedVector& b) { - auto a_data = a.data(); - auto b_data = b.data(); - return absl::equal(a_data, a_data + a.size(), b_data, b_data + b.size()); -} - -// `operator!=(...)` -// -// Tests for value-inequality of two inlined vectors. -template -bool operator!=(const absl::InlinedVector& a, - const absl::InlinedVector& b) { - return !(a == b); -} - -// `operator<(...)` -// -// Tests whether the value of an inlined vector is less than the value of -// another inlined vector using a lexicographical comparison algorithm. -template -bool operator<(const absl::InlinedVector& a, - const absl::InlinedVector& b) { - auto a_data = a.data(); - auto b_data = b.data(); - return std::lexicographical_compare(a_data, a_data + a.size(), b_data, - b_data + b.size()); -} - -// `operator>(...)` -// -// Tests whether the value of an inlined vector is greater than the value of -// another inlined vector using a lexicographical comparison algorithm. -template -bool operator>(const absl::InlinedVector& a, - const absl::InlinedVector& b) { - return b < a; -} - -// `operator<=(...)` -// -// Tests whether the value of an inlined vector is less than or equal to the -// value of another inlined vector using a lexicographical comparison algorithm. -template -bool operator<=(const absl::InlinedVector& a, - const absl::InlinedVector& b) { - return !(b < a); -} - -// `operator>=(...)` -// -// Tests whether the value of an inlined vector is greater than or equal to the -// value of another inlined vector using a lexicographical comparison algorithm. -template -bool operator>=(const absl::InlinedVector& a, - const absl::InlinedVector& b) { - return !(a < b); -} - -// `AbslHashValue(...)` -// -// Provides `absl::Hash` support for `absl::InlinedVector`. It is uncommon to -// call this directly. -template -H AbslHashValue(H h, const absl::InlinedVector& a) { - auto size = a.size(); - return H::combine(H::combine_contiguous(std::move(h), a.data(), size), size); -} - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INLINED_VECTOR_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/common.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/common.h deleted file mode 100644 index 416d9aa..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/common.h +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_CONTAINER_INTERNAL_CONTAINER_H_ -#define ABSL_CONTAINER_INTERNAL_CONTAINER_H_ - -#include -#include - -#include "absl/meta/type_traits.h" -#include "absl/types/optional.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -template -struct IsTransparent : std::false_type {}; -template -struct IsTransparent> - : std::true_type {}; - -template -struct KeyArg { - // Transparent. Forward `K`. - template - using type = K; -}; - -template <> -struct KeyArg { - // Not transparent. Always use `key_type`. - template - using type = key_type; -}; - -// The node_handle concept from C++17. -// We specialize node_handle for sets and maps. node_handle_base holds the -// common API of both. -template -class node_handle_base { - protected: - using slot_type = typename PolicyTraits::slot_type; - - public: - using allocator_type = Alloc; - - constexpr node_handle_base() = default; - node_handle_base(node_handle_base&& other) noexcept { - *this = std::move(other); - } - ~node_handle_base() { destroy(); } - node_handle_base& operator=(node_handle_base&& other) noexcept { - destroy(); - if (!other.empty()) { - alloc_ = other.alloc_; - PolicyTraits::transfer(alloc(), slot(), other.slot()); - other.reset(); - } - return *this; - } - - bool empty() const noexcept { return !alloc_; } - explicit operator bool() const noexcept { return !empty(); } - allocator_type get_allocator() const { return *alloc_; } - - protected: - friend struct CommonAccess; - - struct transfer_tag_t {}; - node_handle_base(transfer_tag_t, const allocator_type& a, slot_type* s) - : alloc_(a) { - PolicyTraits::transfer(alloc(), slot(), s); - } - - struct construct_tag_t {}; - template - node_handle_base(construct_tag_t, const allocator_type& a, Args&&... args) - : alloc_(a) { - PolicyTraits::construct(alloc(), slot(), std::forward(args)...); - } - - void destroy() { - if (!empty()) { - PolicyTraits::destroy(alloc(), slot()); - reset(); - } - } - - void reset() { - assert(alloc_.has_value()); - alloc_ = absl::nullopt; - } - - slot_type* slot() const { - assert(!empty()); - return reinterpret_cast(std::addressof(slot_space_)); - } - allocator_type* alloc() { return std::addressof(*alloc_); } - - private: - absl::optional alloc_ = {}; - alignas(slot_type) mutable unsigned char slot_space_[sizeof(slot_type)] = {}; -}; - -// For sets. -template -class node_handle : public node_handle_base { - using Base = node_handle_base; - - public: - using value_type = typename PolicyTraits::value_type; - - constexpr node_handle() {} - - value_type& value() const { return PolicyTraits::element(this->slot()); } - - private: - friend struct CommonAccess; - - using Base::Base; -}; - -// For maps. -template -class node_handle> - : public node_handle_base { - using Base = node_handle_base; - using slot_type = typename PolicyTraits::slot_type; - - public: - using key_type = typename Policy::key_type; - using mapped_type = typename Policy::mapped_type; - - constexpr node_handle() {} - - // When C++17 is available, we can use std::launder to provide mutable - // access to the key. Otherwise, we provide const access. - auto key() const - -> decltype(PolicyTraits::mutable_key(std::declval())) { - return PolicyTraits::mutable_key(this->slot()); - } - - mapped_type& mapped() const { - return PolicyTraits::value(&PolicyTraits::element(this->slot())); - } - - private: - friend struct CommonAccess; - - using Base::Base; -}; - -// Provide access to non-public node-handle functions. -struct CommonAccess { - template - static auto GetSlot(const Node& node) -> decltype(node.slot()) { - return node.slot(); - } - - template - static void Destroy(Node* node) { - node->destroy(); - } - - template - static void Reset(Node* node) { - node->reset(); - } - - template - static T Transfer(Args&&... args) { - return T(typename T::transfer_tag_t{}, std::forward(args)...); - } - - template - static T Construct(Args&&... args) { - return T(typename T::construct_tag_t{}, std::forward(args)...); - } -}; - -// Implement the insert_return_type<> concept of C++17. -template -struct InsertReturnType { - Iterator position; - bool inserted; - NodeType node; -}; - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_CONTAINER_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/compressed_tuple.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/compressed_tuple.h deleted file mode 100644 index 5ebe164..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/compressed_tuple.h +++ /dev/null @@ -1,290 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Helper class to perform the Empty Base Optimization. -// Ts can contain classes and non-classes, empty or not. For the ones that -// are empty classes, we perform the optimization. If all types in Ts are empty -// classes, then CompressedTuple is itself an empty class. -// -// To access the members, use member get() function. -// -// Eg: -// absl::container_internal::CompressedTuple value(7, t1, t2, -// t3); -// assert(value.get<0>() == 7); -// T1& t1 = value.get<1>(); -// const T2& t2 = value.get<2>(); -// ... -// -// https://en.cppreference.com/w/cpp/language/ebo - -#ifndef ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_ -#define ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_ - -#include -#include -#include -#include - -#include "absl/utility/utility.h" - -#if defined(_MSC_VER) && !defined(__NVCC__) -// We need to mark these classes with this declspec to ensure that -// CompressedTuple happens. -#define ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC __declspec(empty_bases) -#else -#define ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -template -class CompressedTuple; - -namespace internal_compressed_tuple { - -template -struct Elem; -template -struct Elem, I> - : std::tuple_element> {}; -template -using ElemT = typename Elem::type; - -// Use the __is_final intrinsic if available. Where it's not available, classes -// declared with the 'final' specifier cannot be used as CompressedTuple -// elements. -// TODO(sbenza): Replace this with std::is_final in C++14. -template -constexpr bool IsFinal() { -#if defined(__clang__) || defined(__GNUC__) - return __is_final(T); -#else - return false; -#endif -} - -// We can't use EBCO on other CompressedTuples because that would mean that we -// derive from multiple Storage<> instantiations with the same I parameter, -// and potentially from multiple identical Storage<> instantiations. So anytime -// we use type inheritance rather than encapsulation, we mark -// CompressedTupleImpl, to make this easy to detect. -struct uses_inheritance {}; - -template -constexpr bool ShouldUseBase() { - return std::is_class::value && std::is_empty::value && !IsFinal() && - !std::is_base_of::value; -} - -// The storage class provides two specializations: -// - For empty classes, it stores T as a base class. -// - For everything else, it stores T as a member. -template ::type>()> -#else - bool UseBase = ShouldUseBase()> -#endif -struct Storage { - T value; - constexpr Storage() = default; - template - explicit constexpr Storage(absl::in_place_t, V&& v) - : value(absl::forward(v)) {} - constexpr const T& get() const& { return value; } - T& get() & { return value; } - constexpr const T&& get() const&& { return absl::move(*this).value; } - T&& get() && { return std::move(*this).value; } -}; - -template -struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC Storage : T { - constexpr Storage() = default; - - template - explicit constexpr Storage(absl::in_place_t, V&& v) - : T(absl::forward(v)) {} - - constexpr const T& get() const& { return *this; } - T& get() & { return *this; } - constexpr const T&& get() const&& { return absl::move(*this); } - T&& get() && { return std::move(*this); } -}; - -template -struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTupleImpl; - -template -struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTupleImpl< - CompressedTuple, absl::index_sequence, ShouldAnyUseBase> - // We use the dummy identity function through std::integral_constant to - // convince MSVC of accepting and expanding I in that context. Without it - // you would get: - // error C3548: 'I': parameter pack cannot be used in this context - : uses_inheritance, - Storage::value>... { - constexpr CompressedTupleImpl() = default; - template - explicit constexpr CompressedTupleImpl(absl::in_place_t, Vs&&... args) - : Storage(absl::in_place, absl::forward(args))... {} - friend CompressedTuple; -}; - -template -struct ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTupleImpl< - CompressedTuple, absl::index_sequence, false> - // We use the dummy identity function as above... - : Storage::value, false>... { - constexpr CompressedTupleImpl() = default; - template - explicit constexpr CompressedTupleImpl(absl::in_place_t, Vs&&... args) - : Storage(absl::in_place, absl::forward(args))... {} - friend CompressedTuple; -}; - -std::false_type Or(std::initializer_list); -std::true_type Or(std::initializer_list); - -// MSVC requires this to be done separately rather than within the declaration -// of CompressedTuple below. -template -constexpr bool ShouldAnyUseBase() { - return decltype( - Or({std::integral_constant()>()...})){}; -} - -template -using TupleElementMoveConstructible = - typename std::conditional::value, - std::is_convertible, - std::is_constructible>::type; - -template -struct TupleMoveConstructible : std::false_type {}; - -template -struct TupleMoveConstructible, Vs...> - : std::integral_constant< - bool, absl::conjunction< - TupleElementMoveConstructible...>::value> {}; - -template -struct compressed_tuple_size; - -template -struct compressed_tuple_size> - : public std::integral_constant {}; - -template -struct TupleItemsMoveConstructible - : std::integral_constant< - bool, TupleMoveConstructible::value == - sizeof...(Vs), - T, Vs...>::value> {}; - -} // namespace internal_compressed_tuple - -// Helper class to perform the Empty Base Class Optimization. -// Ts can contain classes and non-classes, empty or not. For the ones that -// are empty classes, we perform the CompressedTuple. If all types in Ts are -// empty classes, then CompressedTuple is itself an empty class. (This -// does not apply when one or more of those empty classes is itself an empty -// CompressedTuple.) -// -// To access the members, use member .get() function. -// -// Eg: -// absl::container_internal::CompressedTuple value(7, t1, t2, -// t3); -// assert(value.get<0>() == 7); -// T1& t1 = value.get<1>(); -// const T2& t2 = value.get<2>(); -// ... -// -// https://en.cppreference.com/w/cpp/language/ebo -template -class ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTuple - : private internal_compressed_tuple::CompressedTupleImpl< - CompressedTuple, absl::index_sequence_for, - internal_compressed_tuple::ShouldAnyUseBase()> { - private: - template - using ElemT = internal_compressed_tuple::ElemT; - - template - using StorageT = internal_compressed_tuple::Storage, I>; - - public: - // There seems to be a bug in MSVC dealing in which using '=default' here will - // cause the compiler to ignore the body of other constructors. The work- - // around is to explicitly implement the default constructor. -#if defined(_MSC_VER) - constexpr CompressedTuple() : CompressedTuple::CompressedTupleImpl() {} -#else - constexpr CompressedTuple() = default; -#endif - explicit constexpr CompressedTuple(const Ts&... base) - : CompressedTuple::CompressedTupleImpl(absl::in_place, base...) {} - - template )>>, - internal_compressed_tuple::TupleItemsMoveConstructible< - CompressedTuple, First, Vs...>>::value, - bool> = true> - explicit constexpr CompressedTuple(First&& first, Vs&&... base) - : CompressedTuple::CompressedTupleImpl(absl::in_place, - absl::forward(first), - absl::forward(base)...) {} - - template - ElemT& get() & { - return StorageT::get(); - } - - template - constexpr const ElemT& get() const& { - return StorageT::get(); - } - - template - ElemT&& get() && { - return std::move(*this).StorageT::get(); - } - - template - constexpr const ElemT&& get() const&& { - return absl::move(*this).StorageT::get(); - } -}; - -// Explicit specialization for a zero-element tuple -// (needed to avoid ambiguous overloads for the default constructor). -template <> -class ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC CompressedTuple<> {}; - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#undef ABSL_INTERNAL_COMPRESSED_TUPLE_DECLSPEC - -#endif // ABSL_CONTAINER_INTERNAL_COMPRESSED_TUPLE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/container_memory.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/container_memory.h deleted file mode 100644 index 00e9f6d..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/container_memory.h +++ /dev/null @@ -1,442 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_CONTAINER_INTERNAL_CONTAINER_MEMORY_H_ -#define ABSL_CONTAINER_INTERNAL_CONTAINER_MEMORY_H_ - -#include -#include -#include -#include -#include -#include -#include - -#include "absl/base/config.h" -#include "absl/memory/memory.h" -#include "absl/meta/type_traits.h" -#include "absl/utility/utility.h" - -#ifdef ABSL_HAVE_ADDRESS_SANITIZER -#include -#endif - -#ifdef ABSL_HAVE_MEMORY_SANITIZER -#include -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -template -struct alignas(Alignment) AlignedType {}; - -// Allocates at least n bytes aligned to the specified alignment. -// Alignment must be a power of 2. It must be positive. -// -// Note that many allocators don't honor alignment requirements above certain -// threshold (usually either alignof(std::max_align_t) or alignof(void*)). -// Allocate() doesn't apply alignment corrections. If the underlying allocator -// returns insufficiently alignment pointer, that's what you are going to get. -template -void* Allocate(Alloc* alloc, size_t n) { - static_assert(Alignment > 0, ""); - assert(n && "n must be positive"); - using M = AlignedType; - using A = typename absl::allocator_traits::template rebind_alloc; - using AT = typename absl::allocator_traits::template rebind_traits; - // On macOS, "mem_alloc" is a #define with one argument defined in - // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it - // with the "foo(bar)" syntax. - A my_mem_alloc(*alloc); - void* p = AT::allocate(my_mem_alloc, (n + sizeof(M) - 1) / sizeof(M)); - assert(reinterpret_cast(p) % Alignment == 0 && - "allocator does not respect alignment"); - return p; -} - -// The pointer must have been previously obtained by calling -// Allocate(alloc, n). -template -void Deallocate(Alloc* alloc, void* p, size_t n) { - static_assert(Alignment > 0, ""); - assert(n && "n must be positive"); - using M = AlignedType; - using A = typename absl::allocator_traits::template rebind_alloc; - using AT = typename absl::allocator_traits::template rebind_traits; - // On macOS, "mem_alloc" is a #define with one argument defined in - // rpc/types.h, so we can't name the variable "mem_alloc" and initialize it - // with the "foo(bar)" syntax. - A my_mem_alloc(*alloc); - AT::deallocate(my_mem_alloc, static_cast(p), - (n + sizeof(M) - 1) / sizeof(M)); -} - -namespace memory_internal { - -// Constructs T into uninitialized storage pointed by `ptr` using the args -// specified in the tuple. -template -void ConstructFromTupleImpl(Alloc* alloc, T* ptr, Tuple&& t, - absl::index_sequence) { - absl::allocator_traits::construct( - *alloc, ptr, std::get(std::forward(t))...); -} - -template -struct WithConstructedImplF { - template - decltype(std::declval()(std::declval())) operator()( - Args&&... args) const { - return std::forward(f)(T(std::forward(args)...)); - } - F&& f; -}; - -template -decltype(std::declval()(std::declval())) WithConstructedImpl( - Tuple&& t, absl::index_sequence, F&& f) { - return WithConstructedImplF{std::forward(f)}( - std::get(std::forward(t))...); -} - -template -auto TupleRefImpl(T&& t, absl::index_sequence) - -> decltype(std::forward_as_tuple(std::get(std::forward(t))...)) { - return std::forward_as_tuple(std::get(std::forward(t))...); -} - -// Returns a tuple of references to the elements of the input tuple. T must be a -// tuple. -template -auto TupleRef(T&& t) -> decltype( - TupleRefImpl(std::forward(t), - absl::make_index_sequence< - std::tuple_size::type>::value>())) { - return TupleRefImpl( - std::forward(t), - absl::make_index_sequence< - std::tuple_size::type>::value>()); -} - -template -decltype(std::declval()(std::declval(), std::piecewise_construct, - std::declval>(), std::declval())) -DecomposePairImpl(F&& f, std::pair, V> p) { - const auto& key = std::get<0>(p.first); - return std::forward(f)(key, std::piecewise_construct, std::move(p.first), - std::move(p.second)); -} - -} // namespace memory_internal - -// Constructs T into uninitialized storage pointed by `ptr` using the args -// specified in the tuple. -template -void ConstructFromTuple(Alloc* alloc, T* ptr, Tuple&& t) { - memory_internal::ConstructFromTupleImpl( - alloc, ptr, std::forward(t), - absl::make_index_sequence< - std::tuple_size::type>::value>()); -} - -// Constructs T using the args specified in the tuple and calls F with the -// constructed value. -template -decltype(std::declval()(std::declval())) WithConstructed( - Tuple&& t, F&& f) { - return memory_internal::WithConstructedImpl( - std::forward(t), - absl::make_index_sequence< - std::tuple_size::type>::value>(), - std::forward(f)); -} - -// Given arguments of an std::pair's consructor, PairArgs() returns a pair of -// tuples with references to the passed arguments. The tuples contain -// constructor arguments for the first and the second elements of the pair. -// -// The following two snippets are equivalent. -// -// 1. std::pair p(args...); -// -// 2. auto a = PairArgs(args...); -// std::pair p(std::piecewise_construct, -// std::move(a.first), std::move(a.second)); -inline std::pair, std::tuple<>> PairArgs() { return {}; } -template -std::pair, std::tuple> PairArgs(F&& f, S&& s) { - return {std::piecewise_construct, std::forward_as_tuple(std::forward(f)), - std::forward_as_tuple(std::forward(s))}; -} -template -std::pair, std::tuple> PairArgs( - const std::pair& p) { - return PairArgs(p.first, p.second); -} -template -std::pair, std::tuple> PairArgs(std::pair&& p) { - return PairArgs(std::forward(p.first), std::forward(p.second)); -} -template -auto PairArgs(std::piecewise_construct_t, F&& f, S&& s) - -> decltype(std::make_pair(memory_internal::TupleRef(std::forward(f)), - memory_internal::TupleRef(std::forward(s)))) { - return std::make_pair(memory_internal::TupleRef(std::forward(f)), - memory_internal::TupleRef(std::forward(s))); -} - -// A helper function for implementing apply() in map policies. -template -auto DecomposePair(F&& f, Args&&... args) - -> decltype(memory_internal::DecomposePairImpl( - std::forward(f), PairArgs(std::forward(args)...))) { - return memory_internal::DecomposePairImpl( - std::forward(f), PairArgs(std::forward(args)...)); -} - -// A helper function for implementing apply() in set policies. -template -decltype(std::declval()(std::declval(), std::declval())) -DecomposeValue(F&& f, Arg&& arg) { - const auto& key = arg; - return std::forward(f)(key, std::forward(arg)); -} - -// Helper functions for asan and msan. -inline void SanitizerPoisonMemoryRegion(const void* m, size_t s) { -#ifdef ABSL_HAVE_ADDRESS_SANITIZER - ASAN_POISON_MEMORY_REGION(m, s); -#endif -#ifdef ABSL_HAVE_MEMORY_SANITIZER - __msan_poison(m, s); -#endif - (void)m; - (void)s; -} - -inline void SanitizerUnpoisonMemoryRegion(const void* m, size_t s) { -#ifdef ABSL_HAVE_ADDRESS_SANITIZER - ASAN_UNPOISON_MEMORY_REGION(m, s); -#endif -#ifdef ABSL_HAVE_MEMORY_SANITIZER - __msan_unpoison(m, s); -#endif - (void)m; - (void)s; -} - -template -inline void SanitizerPoisonObject(const T* object) { - SanitizerPoisonMemoryRegion(object, sizeof(T)); -} - -template -inline void SanitizerUnpoisonObject(const T* object) { - SanitizerUnpoisonMemoryRegion(object, sizeof(T)); -} - -namespace memory_internal { - -// If Pair is a standard-layout type, OffsetOf::kFirst and -// OffsetOf::kSecond are equivalent to offsetof(Pair, first) and -// offsetof(Pair, second) respectively. Otherwise they are -1. -// -// The purpose of OffsetOf is to avoid calling offsetof() on non-standard-layout -// type, which is non-portable. -template -struct OffsetOf { - static constexpr size_t kFirst = static_cast(-1); - static constexpr size_t kSecond = static_cast(-1); -}; - -template -struct OffsetOf::type> { - static constexpr size_t kFirst = offsetof(Pair, first); - static constexpr size_t kSecond = offsetof(Pair, second); -}; - -template -struct IsLayoutCompatible { - private: - struct Pair { - K first; - V second; - }; - - // Is P layout-compatible with Pair? - template - static constexpr bool LayoutCompatible() { - return std::is_standard_layout

() && sizeof(P) == sizeof(Pair) && - alignof(P) == alignof(Pair) && - memory_internal::OffsetOf

::kFirst == - memory_internal::OffsetOf::kFirst && - memory_internal::OffsetOf

at(const key_arg& key) { - auto it = this->find(key); - if (it == this->end()) { - base_internal::ThrowStdOutOfRange( - "absl::container_internal::raw_hash_map<>::at"); - } - return Policy::value(&*it); - } - - template - MappedConstReference

at(const key_arg& key) const { - auto it = this->find(key); - if (it == this->end()) { - base_internal::ThrowStdOutOfRange( - "absl::container_internal::raw_hash_map<>::at"); - } - return Policy::value(&*it); - } - - template - MappedReference

operator[](key_arg&& key) { - return Policy::value(&*try_emplace(std::forward(key)).first); - } - - template - MappedReference

operator[](const key_arg& key) { - return Policy::value(&*try_emplace(key).first); - } - - private: - template - std::pair insert_or_assign_impl(K&& k, V&& v) { - auto res = this->find_or_prepare_insert(k); - if (res.second) - this->emplace_at(res.first, std::forward(k), std::forward(v)); - else - Policy::value(&*this->iterator_at(res.first)) = std::forward(v); - return {this->iterator_at(res.first), res.second}; - } - - template - std::pair try_emplace_impl(K&& k, Args&&... args) { - auto res = this->find_or_prepare_insert(k); - if (res.second) - this->emplace_at(res.first, std::piecewise_construct, - std::forward_as_tuple(std::forward(k)), - std::forward_as_tuple(std::forward(args)...)); - return {this->iterator_at(res.first), res.second}; - } -}; - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_RAW_HASH_MAP_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/raw_hash_set.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/raw_hash_set.h deleted file mode 100644 index ea912f8..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/raw_hash_set.h +++ /dev/null @@ -1,2365 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// An open-addressing -// hashtable with quadratic probing. -// -// This is a low level hashtable on top of which different interfaces can be -// implemented, like flat_hash_set, node_hash_set, string_hash_set, etc. -// -// The table interface is similar to that of std::unordered_set. Notable -// differences are that most member functions support heterogeneous keys when -// BOTH the hash and eq functions are marked as transparent. They do so by -// providing a typedef called `is_transparent`. -// -// When heterogeneous lookup is enabled, functions that take key_type act as if -// they have an overload set like: -// -// iterator find(const key_type& key); -// template -// iterator find(const K& key); -// -// size_type erase(const key_type& key); -// template -// size_type erase(const K& key); -// -// std::pair equal_range(const key_type& key); -// template -// std::pair equal_range(const K& key); -// -// When heterogeneous lookup is disabled, only the explicit `key_type` overloads -// exist. -// -// find() also supports passing the hash explicitly: -// -// iterator find(const key_type& key, size_t hash); -// template -// iterator find(const U& key, size_t hash); -// -// In addition the pointer to element and iterator stability guarantees are -// weaker: all iterators and pointers are invalidated after a new element is -// inserted. -// -// IMPLEMENTATION DETAILS -// -// # Table Layout -// -// A raw_hash_set's backing array consists of control bytes followed by slots -// that may or may not contain objects. -// -// The layout of the backing array, for `capacity` slots, is thus, as a -// pseudo-struct: -// -// struct BackingArray { -// // Control bytes for the "real" slots. -// ctrl_t ctrl[capacity]; -// // Always `ctrl_t::kSentinel`. This is used by iterators to find when to -// // stop and serves no other purpose. -// ctrl_t sentinel; -// // A copy of the first `kWidth - 1` elements of `ctrl`. This is used so -// // that if a probe sequence picks a value near the end of `ctrl`, -// // `Group` will have valid control bytes to look at. -// ctrl_t clones[kWidth - 1]; -// // The actual slot data. -// slot_type slots[capacity]; -// }; -// -// The length of this array is computed by `AllocSize()` below. -// -// Control bytes (`ctrl_t`) are bytes (collected into groups of a -// platform-specific size) that define the state of the corresponding slot in -// the slot array. Group manipulation is tightly optimized to be as efficient -// as possible: SSE and friends on x86, clever bit operations on other arches. -// -// Group 1 Group 2 Group 3 -// +---------------+---------------+---------------+ -// | | | | | | | | | | | | | | | | | | | | | | | | | -// +---------------+---------------+---------------+ -// -// Each control byte is either a special value for empty slots, deleted slots -// (sometimes called *tombstones*), and a special end-of-table marker used by -// iterators, or, if occupied, seven bits (H2) from the hash of the value in the -// corresponding slot. -// -// Storing control bytes in a separate array also has beneficial cache effects, -// since more logical slots will fit into a cache line. -// -// # Hashing -// -// We compute two separate hashes, `H1` and `H2`, from the hash of an object. -// `H1(hash(x))` is an index into `slots`, and essentially the starting point -// for the probe sequence. `H2(hash(x))` is a 7-bit value used to filter out -// objects that cannot possibly be the one we are looking for. -// -// # Table operations. -// -// The key operations are `insert`, `find`, and `erase`. -// -// Since `insert` and `erase` are implemented in terms of `find`, we describe -// `find` first. To `find` a value `x`, we compute `hash(x)`. From -// `H1(hash(x))` and the capacity, we construct a `probe_seq` that visits every -// group of slots in some interesting order. -// -// We now walk through these indices. At each index, we select the entire group -// starting with that index and extract potential candidates: occupied slots -// with a control byte equal to `H2(hash(x))`. If we find an empty slot in the -// group, we stop and return an error. Each candidate slot `y` is compared with -// `x`; if `x == y`, we are done and return `&y`; otherwise we contine to the -// next probe index. Tombstones effectively behave like full slots that never -// match the value we're looking for. -// -// The `H2` bits ensure when we compare a slot to an object with `==`, we are -// likely to have actually found the object. That is, the chance is low that -// `==` is called and returns `false`. Thus, when we search for an object, we -// are unlikely to call `==` many times. This likelyhood can be analyzed as -// follows (assuming that H2 is a random enough hash function). -// -// Let's assume that there are `k` "wrong" objects that must be examined in a -// probe sequence. For example, when doing a `find` on an object that is in the -// table, `k` is the number of objects between the start of the probe sequence -// and the final found object (not including the final found object). The -// expected number of objects with an H2 match is then `k/128`. Measurements -// and analysis indicate that even at high load factors, `k` is less than 32, -// meaning that the number of "false positive" comparisons we must perform is -// less than 1/8 per `find`. - -// `insert` is implemented in terms of `unchecked_insert`, which inserts a -// value presumed to not be in the table (violating this requirement will cause -// the table to behave erratically). Given `x` and its hash `hash(x)`, to insert -// it, we construct a `probe_seq` once again, and use it to find the first -// group with an unoccupied (empty *or* deleted) slot. We place `x` into the -// first such slot in the group and mark it as full with `x`'s H2. -// -// To `insert`, we compose `unchecked_insert` with `find`. We compute `h(x)` and -// perform a `find` to see if it's already present; if it is, we're done. If -// it's not, we may decide the table is getting overcrowded (i.e. the load -// factor is greater than 7/8 for big tables; `is_small()` tables use a max load -// factor of 1); in this case, we allocate a bigger array, `unchecked_insert` -// each element of the table into the new array (we know that no insertion here -// will insert an already-present value), and discard the old backing array. At -// this point, we may `unchecked_insert` the value `x`. -// -// Below, `unchecked_insert` is partly implemented by `prepare_insert`, which -// presents a viable, initialized slot pointee to the caller. -// -// `erase` is implemented in terms of `erase_at`, which takes an index to a -// slot. Given an offset, we simply create a tombstone and destroy its contents. -// If we can prove that the slot would not appear in a probe sequence, we can -// make the slot as empty, instead. We can prove this by observing that if a -// group has any empty slots, it has never been full (assuming we never create -// an empty slot in a group with no empties, which this heuristic guarantees we -// never do) and find would stop at this group anyways (since it does not probe -// beyond groups with empties). -// -// `erase` is `erase_at` composed with `find`: if we -// have a value `x`, we can perform a `find`, and then `erase_at` the resulting -// slot. -// -// To iterate, we simply traverse the array, skipping empty and deleted slots -// and stopping when we hit a `kSentinel`. - -#ifndef ABSL_CONTAINER_INTERNAL_RAW_HASH_SET_H_ -#define ABSL_CONTAINER_INTERNAL_RAW_HASH_SET_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/base/config.h" -#include "absl/base/internal/endian.h" -#include "absl/base/internal/prefetch.h" -#include "absl/base/optimization.h" -#include "absl/base/port.h" -#include "absl/container/internal/common.h" -#include "absl/container/internal/compressed_tuple.h" -#include "absl/container/internal/container_memory.h" -#include "absl/container/internal/hash_policy_traits.h" -#include "absl/container/internal/hashtable_debug_hooks.h" -#include "absl/container/internal/hashtablez_sampler.h" -#include "absl/memory/memory.h" -#include "absl/meta/type_traits.h" -#include "absl/numeric/bits.h" -#include "absl/utility/utility.h" - -#ifdef ABSL_INTERNAL_HAVE_SSE2 -#include -#endif - -#ifdef ABSL_INTERNAL_HAVE_SSSE3 -#include -#endif - -#ifdef _MSC_VER -#include -#endif - -#ifdef ABSL_INTERNAL_HAVE_ARM_NEON -#include -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -template -void SwapAlloc(AllocType& lhs, AllocType& rhs, - std::true_type /* propagate_on_container_swap */) { - using std::swap; - swap(lhs, rhs); -} -template -void SwapAlloc(AllocType& /*lhs*/, AllocType& /*rhs*/, - std::false_type /* propagate_on_container_swap */) {} - -// The state for a probe sequence. -// -// Currently, the sequence is a triangular progression of the form -// -// p(i) := Width * (i^2 + i)/2 + hash (mod mask + 1) -// -// The use of `Width` ensures that each probe step does not overlap groups; -// the sequence effectively outputs the addresses of *groups* (although not -// necessarily aligned to any boundary). The `Group` machinery allows us -// to check an entire group with minimal branching. -// -// Wrapping around at `mask + 1` is important, but not for the obvious reason. -// As described above, the first few entries of the control byte array -// are mirrored at the end of the array, which `Group` will find and use -// for selecting candidates. However, when those candidates' slots are -// actually inspected, there are no corresponding slots for the cloned bytes, -// so we need to make sure we've treated those offsets as "wrapping around". -// -// It turns out that this probe sequence visits every group exactly once if the -// number of groups is a power of two, since (i^2+i)/2 is a bijection in -// Z/(2^m). See https://en.wikipedia.org/wiki/Quadratic_probing -template -class probe_seq { - public: - // Creates a new probe sequence using `hash` as the initial value of the - // sequence and `mask` (usually the capacity of the table) as the mask to - // apply to each value in the progression. - probe_seq(size_t hash, size_t mask) { - assert(((mask + 1) & mask) == 0 && "not a mask"); - mask_ = mask; - offset_ = hash & mask_; - } - - // The offset within the table, i.e., the value `p(i)` above. - size_t offset() const { return offset_; } - size_t offset(size_t i) const { return (offset_ + i) & mask_; } - - void next() { - index_ += Width; - offset_ += index_; - offset_ &= mask_; - } - // 0-based probe index, a multiple of `Width`. - size_t index() const { return index_; } - - private: - size_t mask_; - size_t offset_; - size_t index_ = 0; -}; - -template -struct RequireUsableKey { - template - std::pair< - decltype(std::declval()(std::declval())), - decltype(std::declval()(std::declval(), - std::declval()))>* - operator()(const PassedKey&, const Args&...) const; -}; - -template -struct IsDecomposable : std::false_type {}; - -template -struct IsDecomposable< - absl::void_t(), - std::declval()...))>, - Policy, Hash, Eq, Ts...> : std::true_type {}; - -// TODO(alkis): Switch to std::is_nothrow_swappable when gcc/clang supports it. -template -constexpr bool IsNoThrowSwappable(std::true_type = {} /* is_swappable */) { - using std::swap; - return noexcept(swap(std::declval(), std::declval())); -} -template -constexpr bool IsNoThrowSwappable(std::false_type /* is_swappable */) { - return false; -} - -template -uint32_t TrailingZeros(T x) { - ABSL_ASSUME(x != 0); - return static_cast(countr_zero(x)); -} - -// An abstract bitmask, such as that emitted by a SIMD instruction. -// -// Specifically, this type implements a simple bitset whose representation is -// controlled by `SignificantBits` and `Shift`. `SignificantBits` is the number -// of abstract bits in the bitset, while `Shift` is the log-base-two of the -// width of an abstract bit in the representation. -// This mask provides operations for any number of real bits set in an abstract -// bit. To add iteration on top of that, implementation must guarantee no more -// than one real bit is set in an abstract bit. -template -class NonIterableBitMask { - public: - explicit NonIterableBitMask(T mask) : mask_(mask) {} - - explicit operator bool() const { return this->mask_ != 0; } - - // Returns the index of the lowest *abstract* bit set in `self`. - uint32_t LowestBitSet() const { - return container_internal::TrailingZeros(mask_) >> Shift; - } - - // Returns the index of the highest *abstract* bit set in `self`. - uint32_t HighestBitSet() const { - return static_cast((bit_width(mask_) - 1) >> Shift); - } - - // Return the number of trailing zero *abstract* bits. - uint32_t TrailingZeros() const { - return container_internal::TrailingZeros(mask_) >> Shift; - } - - // Return the number of leading zero *abstract* bits. - uint32_t LeadingZeros() const { - constexpr int total_significant_bits = SignificantBits << Shift; - constexpr int extra_bits = sizeof(T) * 8 - total_significant_bits; - return static_cast(countl_zero(mask_ << extra_bits)) >> Shift; - } - - T mask_; -}; - -// Mask that can be iterable -// -// For example, when `SignificantBits` is 16 and `Shift` is zero, this is just -// an ordinary 16-bit bitset occupying the low 16 bits of `mask`. When -// `SignificantBits` is 8 and `Shift` is 3, abstract bits are represented as -// the bytes `0x00` and `0x80`, and it occupies all 64 bits of the bitmask. -// -// For example: -// for (int i : BitMask(0b101)) -> yields 0, 2 -// for (int i : BitMask(0x0000000080800000)) -> yields 2, 3 -template -class BitMask : public NonIterableBitMask { - using Base = NonIterableBitMask; - static_assert(std::is_unsigned::value, ""); - static_assert(Shift == 0 || Shift == 3, ""); - - public: - explicit BitMask(T mask) : Base(mask) {} - // BitMask is an iterator over the indices of its abstract bits. - using value_type = int; - using iterator = BitMask; - using const_iterator = BitMask; - - BitMask& operator++() { - this->mask_ &= (this->mask_ - 1); - return *this; - } - - uint32_t operator*() const { return Base::LowestBitSet(); } - - BitMask begin() const { return *this; } - BitMask end() const { return BitMask(0); } - - private: - friend bool operator==(const BitMask& a, const BitMask& b) { - return a.mask_ == b.mask_; - } - friend bool operator!=(const BitMask& a, const BitMask& b) { - return a.mask_ != b.mask_; - } -}; - -using h2_t = uint8_t; - -// The values here are selected for maximum performance. See the static asserts -// below for details. - -// A `ctrl_t` is a single control byte, which can have one of four -// states: empty, deleted, full (which has an associated seven-bit h2_t value) -// and the sentinel. They have the following bit patterns: -// -// empty: 1 0 0 0 0 0 0 0 -// deleted: 1 1 1 1 1 1 1 0 -// full: 0 h h h h h h h // h represents the hash bits. -// sentinel: 1 1 1 1 1 1 1 1 -// -// These values are specifically tuned for SSE-flavored SIMD. -// The static_asserts below detail the source of these choices. -// -// We use an enum class so that when strict aliasing is enabled, the compiler -// knows ctrl_t doesn't alias other types. -enum class ctrl_t : int8_t { - kEmpty = -128, // 0b10000000 - kDeleted = -2, // 0b11111110 - kSentinel = -1, // 0b11111111 -}; -static_assert( - (static_cast(ctrl_t::kEmpty) & - static_cast(ctrl_t::kDeleted) & - static_cast(ctrl_t::kSentinel) & 0x80) != 0, - "Special markers need to have the MSB to make checking for them efficient"); -static_assert( - ctrl_t::kEmpty < ctrl_t::kSentinel && ctrl_t::kDeleted < ctrl_t::kSentinel, - "ctrl_t::kEmpty and ctrl_t::kDeleted must be smaller than " - "ctrl_t::kSentinel to make the SIMD test of IsEmptyOrDeleted() efficient"); -static_assert( - ctrl_t::kSentinel == static_cast(-1), - "ctrl_t::kSentinel must be -1 to elide loading it from memory into SIMD " - "registers (pcmpeqd xmm, xmm)"); -static_assert(ctrl_t::kEmpty == static_cast(-128), - "ctrl_t::kEmpty must be -128 to make the SIMD check for its " - "existence efficient (psignb xmm, xmm)"); -static_assert( - (~static_cast(ctrl_t::kEmpty) & - ~static_cast(ctrl_t::kDeleted) & - static_cast(ctrl_t::kSentinel) & 0x7F) != 0, - "ctrl_t::kEmpty and ctrl_t::kDeleted must share an unset bit that is not " - "shared by ctrl_t::kSentinel to make the scalar test for " - "MaskEmptyOrDeleted() efficient"); -static_assert(ctrl_t::kDeleted == static_cast(-2), - "ctrl_t::kDeleted must be -2 to make the implementation of " - "ConvertSpecialToEmptyAndFullToDeleted efficient"); - -ABSL_DLL extern const ctrl_t kEmptyGroup[16]; - -// Returns a pointer to a control byte group that can be used by empty tables. -inline ctrl_t* EmptyGroup() { - // Const must be cast away here; no uses of this function will actually write - // to it, because it is only used for empty tables. - return const_cast(kEmptyGroup); -} - -// Mixes a randomly generated per-process seed with `hash` and `ctrl` to -// randomize insertion order within groups. -bool ShouldInsertBackwards(size_t hash, const ctrl_t* ctrl); - -// Returns a per-table, hash salt, which changes on resize. This gets mixed into -// H1 to randomize iteration order per-table. -// -// The seed consists of the ctrl_ pointer, which adds enough entropy to ensure -// non-determinism of iteration order in most cases. -inline size_t PerTableSalt(const ctrl_t* ctrl) { - // The low bits of the pointer have little or no entropy because of - // alignment. We shift the pointer to try to use higher entropy bits. A - // good number seems to be 12 bits, because that aligns with page size. - return reinterpret_cast(ctrl) >> 12; -} -// Extracts the H1 portion of a hash: 57 bits mixed with a per-table salt. -inline size_t H1(size_t hash, const ctrl_t* ctrl) { - return (hash >> 7) ^ PerTableSalt(ctrl); -} - -// Extracts the H2 portion of a hash: the 7 bits not used for H1. -// -// These are used as an occupied control byte. -inline h2_t H2(size_t hash) { return hash & 0x7F; } - -// Helpers for checking the state of a control byte. -inline bool IsEmpty(ctrl_t c) { return c == ctrl_t::kEmpty; } -inline bool IsFull(ctrl_t c) { return c >= static_cast(0); } -inline bool IsDeleted(ctrl_t c) { return c == ctrl_t::kDeleted; } -inline bool IsEmptyOrDeleted(ctrl_t c) { return c < ctrl_t::kSentinel; } - -#ifdef ABSL_INTERNAL_HAVE_SSE2 -// Quick reference guide for intrinsics used below: -// -// * __m128i: An XMM (128-bit) word. -// -// * _mm_setzero_si128: Returns a zero vector. -// * _mm_set1_epi8: Returns a vector with the same i8 in each lane. -// -// * _mm_subs_epi8: Saturating-subtracts two i8 vectors. -// * _mm_and_si128: Ands two i128s together. -// * _mm_or_si128: Ors two i128s together. -// * _mm_andnot_si128: And-nots two i128s together. -// -// * _mm_cmpeq_epi8: Component-wise compares two i8 vectors for equality, -// filling each lane with 0x00 or 0xff. -// * _mm_cmpgt_epi8: Same as above, but using > rather than ==. -// -// * _mm_loadu_si128: Performs an unaligned load of an i128. -// * _mm_storeu_si128: Performs an unaligned store of an i128. -// -// * _mm_sign_epi8: Retains, negates, or zeroes each i8 lane of the first -// argument if the corresponding lane of the second -// argument is positive, negative, or zero, respectively. -// * _mm_movemask_epi8: Selects the sign bit out of each i8 lane and produces a -// bitmask consisting of those bits. -// * _mm_shuffle_epi8: Selects i8s from the first argument, using the low -// four bits of each i8 lane in the second argument as -// indices. - -// https://github.com/abseil/abseil-cpp/issues/209 -// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87853 -// _mm_cmpgt_epi8 is broken under GCC with -funsigned-char -// Work around this by using the portable implementation of Group -// when using -funsigned-char under GCC. -inline __m128i _mm_cmpgt_epi8_fixed(__m128i a, __m128i b) { -#if defined(__GNUC__) && !defined(__clang__) - if (std::is_unsigned::value) { - const __m128i mask = _mm_set1_epi8(0x80); - const __m128i diff = _mm_subs_epi8(b, a); - return _mm_cmpeq_epi8(_mm_and_si128(diff, mask), mask); - } -#endif - return _mm_cmpgt_epi8(a, b); -} - -struct GroupSse2Impl { - static constexpr size_t kWidth = 16; // the number of slots per group - - explicit GroupSse2Impl(const ctrl_t* pos) { - ctrl = _mm_loadu_si128(reinterpret_cast(pos)); - } - - // Returns a bitmask representing the positions of slots that match hash. - BitMask Match(h2_t hash) const { - auto match = _mm_set1_epi8(hash); - return BitMask( - static_cast(_mm_movemask_epi8(_mm_cmpeq_epi8(match, ctrl)))); - } - - // Returns a bitmask representing the positions of empty slots. - NonIterableBitMask MaskEmpty() const { -#ifdef ABSL_INTERNAL_HAVE_SSSE3 - // This only works because ctrl_t::kEmpty is -128. - return NonIterableBitMask( - static_cast(_mm_movemask_epi8(_mm_sign_epi8(ctrl, ctrl)))); -#else - auto match = _mm_set1_epi8(static_cast(ctrl_t::kEmpty)); - return NonIterableBitMask( - static_cast(_mm_movemask_epi8(_mm_cmpeq_epi8(match, ctrl)))); -#endif - } - - // Returns a bitmask representing the positions of empty or deleted slots. - NonIterableBitMask MaskEmptyOrDeleted() const { - auto special = _mm_set1_epi8(static_cast(ctrl_t::kSentinel)); - return NonIterableBitMask(static_cast( - _mm_movemask_epi8(_mm_cmpgt_epi8_fixed(special, ctrl)))); - } - - // Returns the number of trailing empty or deleted elements in the group. - uint32_t CountLeadingEmptyOrDeleted() const { - auto special = _mm_set1_epi8(static_cast(ctrl_t::kSentinel)); - return TrailingZeros(static_cast( - _mm_movemask_epi8(_mm_cmpgt_epi8_fixed(special, ctrl)) + 1)); - } - - void ConvertSpecialToEmptyAndFullToDeleted(ctrl_t* dst) const { - auto msbs = _mm_set1_epi8(static_cast(-128)); - auto x126 = _mm_set1_epi8(126); -#ifdef ABSL_INTERNAL_HAVE_SSSE3 - auto res = _mm_or_si128(_mm_shuffle_epi8(x126, ctrl), msbs); -#else - auto zero = _mm_setzero_si128(); - auto special_mask = _mm_cmpgt_epi8_fixed(zero, ctrl); - auto res = _mm_or_si128(msbs, _mm_andnot_si128(special_mask, x126)); -#endif - _mm_storeu_si128(reinterpret_cast<__m128i*>(dst), res); - } - - __m128i ctrl; -}; -#endif // ABSL_INTERNAL_RAW_HASH_SET_HAVE_SSE2 - -#if defined(ABSL_INTERNAL_HAVE_ARM_NEON) && defined(ABSL_IS_LITTLE_ENDIAN) -struct GroupAArch64Impl { - static constexpr size_t kWidth = 8; - - explicit GroupAArch64Impl(const ctrl_t* pos) { - ctrl = vld1_u8(reinterpret_cast(pos)); - } - - BitMask Match(h2_t hash) const { - uint8x8_t dup = vdup_n_u8(hash); - auto mask = vceq_u8(ctrl, dup); - constexpr uint64_t msbs = 0x8080808080808080ULL; - return BitMask( - vget_lane_u64(vreinterpret_u64_u8(mask), 0) & msbs); - } - - NonIterableBitMask MaskEmpty() const { - uint64_t mask = - vget_lane_u64(vreinterpret_u64_u8( - vceq_s8(vdup_n_s8(static_cast(ctrl_t::kEmpty)), - vreinterpret_s8_u8(ctrl))), - 0); - return NonIterableBitMask(mask); - } - - NonIterableBitMask MaskEmptyOrDeleted() const { - uint64_t mask = - vget_lane_u64(vreinterpret_u64_u8(vcgt_s8( - vdup_n_s8(static_cast(ctrl_t::kSentinel)), - vreinterpret_s8_u8(ctrl))), - 0); - return NonIterableBitMask(mask); - } - - uint32_t CountLeadingEmptyOrDeleted() const { - uint64_t mask = vget_lane_u64(vreinterpret_u64_u8(ctrl), 0); - // ctrl | ~(ctrl >> 7) will have the lowest bit set to zero for kEmpty and - // kDeleted. We lower all other bits and count number of trailing zeros. - // Clang and GCC optimize countr_zero to rbit+clz without any check for 0, - // so we should be fine. - constexpr uint64_t bits = 0x0101010101010101ULL; - return countr_zero((mask | ~(mask >> 7)) & bits) >> 3; - } - - void ConvertSpecialToEmptyAndFullToDeleted(ctrl_t* dst) const { - uint64_t mask = vget_lane_u64(vreinterpret_u64_u8(ctrl), 0); - constexpr uint64_t msbs = 0x8080808080808080ULL; - constexpr uint64_t lsbs = 0x0101010101010101ULL; - auto x = mask & msbs; - auto res = (~x + (x >> 7)) & ~lsbs; - little_endian::Store64(dst, res); - } - - uint8x8_t ctrl; -}; -#endif // ABSL_INTERNAL_HAVE_ARM_NEON && ABSL_IS_LITTLE_ENDIAN - -struct GroupPortableImpl { - static constexpr size_t kWidth = 8; - - explicit GroupPortableImpl(const ctrl_t* pos) - : ctrl(little_endian::Load64(pos)) {} - - BitMask Match(h2_t hash) const { - // For the technique, see: - // http://graphics.stanford.edu/~seander/bithacks.html##ValueInWord - // (Determine if a word has a byte equal to n). - // - // Caveat: there are false positives but: - // - they only occur if there is a real match - // - they never occur on ctrl_t::kEmpty, ctrl_t::kDeleted, ctrl_t::kSentinel - // - they will be handled gracefully by subsequent checks in code - // - // Example: - // v = 0x1716151413121110 - // hash = 0x12 - // retval = (v - lsbs) & ~v & msbs = 0x0000000080800000 - constexpr uint64_t msbs = 0x8080808080808080ULL; - constexpr uint64_t lsbs = 0x0101010101010101ULL; - auto x = ctrl ^ (lsbs * hash); - return BitMask((x - lsbs) & ~x & msbs); - } - - NonIterableBitMask MaskEmpty() const { - constexpr uint64_t msbs = 0x8080808080808080ULL; - return NonIterableBitMask((ctrl & (~ctrl << 6)) & - msbs); - } - - NonIterableBitMask MaskEmptyOrDeleted() const { - constexpr uint64_t msbs = 0x8080808080808080ULL; - return NonIterableBitMask((ctrl & (~ctrl << 7)) & - msbs); - } - - uint32_t CountLeadingEmptyOrDeleted() const { - // ctrl | ~(ctrl >> 7) will have the lowest bit set to zero for kEmpty and - // kDeleted. We lower all other bits and count number of trailing zeros. - constexpr uint64_t bits = 0x0101010101010101ULL; - return countr_zero((ctrl | ~(ctrl >> 7)) & bits) >> 3; - } - - void ConvertSpecialToEmptyAndFullToDeleted(ctrl_t* dst) const { - constexpr uint64_t msbs = 0x8080808080808080ULL; - constexpr uint64_t lsbs = 0x0101010101010101ULL; - auto x = ctrl & msbs; - auto res = (~x + (x >> 7)) & ~lsbs; - little_endian::Store64(dst, res); - } - - uint64_t ctrl; -}; - -#ifdef ABSL_INTERNAL_HAVE_SSE2 -using Group = GroupSse2Impl; -#elif defined(ABSL_INTERNAL_HAVE_ARM_NEON) && defined(ABSL_IS_LITTLE_ENDIAN) -using Group = GroupAArch64Impl; -#else -using Group = GroupPortableImpl; -#endif - -// Returns he number of "cloned control bytes". -// -// This is the number of control bytes that are present both at the beginning -// of the control byte array and at the end, such that we can create a -// `Group::kWidth`-width probe window starting from any control byte. -constexpr size_t NumClonedBytes() { return Group::kWidth - 1; } - -template -class raw_hash_set; - -// Returns whether `n` is a valid capacity (i.e., number of slots). -// -// A valid capacity is a non-zero integer `2^m - 1`. -inline bool IsValidCapacity(size_t n) { return ((n + 1) & n) == 0 && n > 0; } - -// Applies the following mapping to every byte in the control array: -// * kDeleted -> kEmpty -// * kEmpty -> kEmpty -// * _ -> kDeleted -// PRECONDITION: -// IsValidCapacity(capacity) -// ctrl[capacity] == ctrl_t::kSentinel -// ctrl[i] != ctrl_t::kSentinel for all i < capacity -void ConvertDeletedToEmptyAndFullToDeleted(ctrl_t* ctrl, size_t capacity); - -// Converts `n` into the next valid capacity, per `IsValidCapacity`. -inline size_t NormalizeCapacity(size_t n) { - return n ? ~size_t{} >> countl_zero(n) : 1; -} - -// General notes on capacity/growth methods below: -// - We use 7/8th as maximum load factor. For 16-wide groups, that gives an -// average of two empty slots per group. -// - For (capacity+1) >= Group::kWidth, growth is 7/8*capacity. -// - For (capacity+1) < Group::kWidth, growth == capacity. In this case, we -// never need to probe (the whole table fits in one group) so we don't need a -// load factor less than 1. - -// Given `capacity`, applies the load factor; i.e., it returns the maximum -// number of values we should put into the table before a resizing rehash. -inline size_t CapacityToGrowth(size_t capacity) { - assert(IsValidCapacity(capacity)); - // `capacity*7/8` - if (Group::kWidth == 8 && capacity == 7) { - // x-x/8 does not work when x==7. - return 6; - } - return capacity - capacity / 8; -} - -// Given `growth`, "unapplies" the load factor to find how large the capacity -// should be to stay within the load factor. -// -// This might not be a valid capacity and `NormalizeCapacity()` should be -// called on this. -inline size_t GrowthToLowerboundCapacity(size_t growth) { - // `growth*8/7` - if (Group::kWidth == 8 && growth == 7) { - // x+(x-1)/7 does not work when x==7. - return 8; - } - return growth + static_cast((static_cast(growth) - 1) / 7); -} - -template -size_t SelectBucketCountForIterRange(InputIter first, InputIter last, - size_t bucket_count) { - if (bucket_count != 0) { - return bucket_count; - } - using InputIterCategory = - typename std::iterator_traits::iterator_category; - if (std::is_base_of::value) { - return GrowthToLowerboundCapacity( - static_cast(std::distance(first, last))); - } - return 0; -} - -#define ABSL_INTERNAL_ASSERT_IS_FULL(ctrl, msg) \ - ABSL_HARDENING_ASSERT((ctrl != nullptr && IsFull(*ctrl)) && msg) - -inline void AssertIsValid(ctrl_t* ctrl) { - ABSL_HARDENING_ASSERT( - (ctrl == nullptr || IsFull(*ctrl)) && - "Invalid operation on iterator. The element might have " - "been erased, the table might have rehashed, or this may " - "be an end() iterator."); -} - -struct FindInfo { - size_t offset; - size_t probe_length; -}; - -// Whether a table is "small". A small table fits entirely into a probing -// group, i.e., has a capacity < `Group::kWidth`. -// -// In small mode we are able to use the whole capacity. The extra control -// bytes give us at least one "empty" control byte to stop the iteration. -// This is important to make 1 a valid capacity. -// -// In small mode only the first `capacity` control bytes after the sentinel -// are valid. The rest contain dummy ctrl_t::kEmpty values that do not -// represent a real slot. This is important to take into account on -// `find_first_non_full()`, where we never try -// `ShouldInsertBackwards()` for small tables. -inline bool is_small(size_t capacity) { return capacity < Group::kWidth - 1; } - -// Begins a probing operation on `ctrl`, using `hash`. -inline probe_seq probe(const ctrl_t* ctrl, size_t hash, - size_t capacity) { - return probe_seq(H1(hash, ctrl), capacity); -} - -// Probes an array of control bits using a probe sequence derived from `hash`, -// and returns the offset corresponding to the first deleted or empty slot. -// -// Behavior when the entire table is full is undefined. -// -// NOTE: this function must work with tables having both empty and deleted -// slots in the same group. Such tables appear during `erase()`. -template -inline FindInfo find_first_non_full(const ctrl_t* ctrl, size_t hash, - size_t capacity) { - auto seq = probe(ctrl, hash, capacity); - while (true) { - Group g{ctrl + seq.offset()}; - auto mask = g.MaskEmptyOrDeleted(); - if (mask) { -#if !defined(NDEBUG) - // We want to add entropy even when ASLR is not enabled. - // In debug build we will randomly insert in either the front or back of - // the group. - // TODO(kfm,sbenza): revisit after we do unconditional mixing - if (!is_small(capacity) && ShouldInsertBackwards(hash, ctrl)) { - return {seq.offset(mask.HighestBitSet()), seq.index()}; - } -#endif - return {seq.offset(mask.LowestBitSet()), seq.index()}; - } - seq.next(); - assert(seq.index() <= capacity && "full table!"); - } -} - -// Extern template for inline function keep possibility of inlining. -// When compiler decided to not inline, no symbols will be added to the -// corresponding translation unit. -extern template FindInfo find_first_non_full(const ctrl_t*, size_t, size_t); - -// Sets `ctrl` to `{kEmpty, kSentinel, ..., kEmpty}`, marking the entire -// array as marked as empty. -inline void ResetCtrl(size_t capacity, ctrl_t* ctrl, const void* slot, - size_t slot_size) { - std::memset(ctrl, static_cast(ctrl_t::kEmpty), - capacity + 1 + NumClonedBytes()); - ctrl[capacity] = ctrl_t::kSentinel; - SanitizerPoisonMemoryRegion(slot, slot_size * capacity); -} - -// Sets `ctrl[i]` to `h`. -// -// Unlike setting it directly, this function will perform bounds checks and -// mirror the value to the cloned tail if necessary. -inline void SetCtrl(size_t i, ctrl_t h, size_t capacity, ctrl_t* ctrl, - const void* slot, size_t slot_size) { - assert(i < capacity); - - auto* slot_i = static_cast(slot) + i * slot_size; - if (IsFull(h)) { - SanitizerUnpoisonMemoryRegion(slot_i, slot_size); - } else { - SanitizerPoisonMemoryRegion(slot_i, slot_size); - } - - ctrl[i] = h; - ctrl[((i - NumClonedBytes()) & capacity) + (NumClonedBytes() & capacity)] = h; -} - -// Overload for setting to an occupied `h2_t` rather than a special `ctrl_t`. -inline void SetCtrl(size_t i, h2_t h, size_t capacity, ctrl_t* ctrl, - const void* slot, size_t slot_size) { - SetCtrl(i, static_cast(h), capacity, ctrl, slot, slot_size); -} - -// Given the capacity of a table, computes the offset (from the start of the -// backing allocation) at which the slots begin. -inline size_t SlotOffset(size_t capacity, size_t slot_align) { - assert(IsValidCapacity(capacity)); - const size_t num_control_bytes = capacity + 1 + NumClonedBytes(); - return (num_control_bytes + slot_align - 1) & (~slot_align + 1); -} - -// Given the capacity of a table, computes the total size of the backing -// array. -inline size_t AllocSize(size_t capacity, size_t slot_size, size_t slot_align) { - return SlotOffset(capacity, slot_align) + capacity * slot_size; -} - -// A SwissTable. -// -// Policy: a policy defines how to perform different operations on -// the slots of the hashtable (see hash_policy_traits.h for the full interface -// of policy). -// -// Hash: a (possibly polymorphic) functor that hashes keys of the hashtable. The -// functor should accept a key and return size_t as hash. For best performance -// it is important that the hash function provides high entropy across all bits -// of the hash. -// -// Eq: a (possibly polymorphic) functor that compares two keys for equality. It -// should accept two (of possibly different type) keys and return a bool: true -// if they are equal, false if they are not. If two keys compare equal, then -// their hash values as defined by Hash MUST be equal. -// -// Allocator: an Allocator -// [https://en.cppreference.com/w/cpp/named_req/Allocator] with which -// the storage of the hashtable will be allocated and the elements will be -// constructed and destroyed. -template -class raw_hash_set { - using PolicyTraits = hash_policy_traits; - using KeyArgImpl = - KeyArg::value && IsTransparent::value>; - - public: - using init_type = typename PolicyTraits::init_type; - using key_type = typename PolicyTraits::key_type; - // TODO(sbenza): Hide slot_type as it is an implementation detail. Needs user - // code fixes! - using slot_type = typename PolicyTraits::slot_type; - using allocator_type = Alloc; - using size_type = size_t; - using difference_type = ptrdiff_t; - using hasher = Hash; - using key_equal = Eq; - using policy_type = Policy; - using value_type = typename PolicyTraits::value_type; - using reference = value_type&; - using const_reference = const value_type&; - using pointer = typename absl::allocator_traits< - allocator_type>::template rebind_traits::pointer; - using const_pointer = typename absl::allocator_traits< - allocator_type>::template rebind_traits::const_pointer; - - // Alias used for heterogeneous lookup functions. - // `key_arg` evaluates to `K` when the functors are transparent and to - // `key_type` otherwise. It permits template argument deduction on `K` for the - // transparent case. - template - using key_arg = typename KeyArgImpl::template type; - - private: - // Give an early error when key_type is not hashable/eq. - auto KeyTypeCanBeHashed(const Hash& h, const key_type& k) -> decltype(h(k)); - auto KeyTypeCanBeEq(const Eq& eq, const key_type& k) -> decltype(eq(k, k)); - - using AllocTraits = absl::allocator_traits; - using SlotAlloc = typename absl::allocator_traits< - allocator_type>::template rebind_alloc; - using SlotAllocTraits = typename absl::allocator_traits< - allocator_type>::template rebind_traits; - - static_assert(std::is_lvalue_reference::value, - "Policy::element() must return a reference"); - - template - struct SameAsElementReference - : std::is_same::type>::type, - typename std::remove_cv< - typename std::remove_reference::type>::type> {}; - - // An enabler for insert(T&&): T must be convertible to init_type or be the - // same as [cv] value_type [ref]. - // Note: we separate SameAsElementReference into its own type to avoid using - // reference unless we need to. MSVC doesn't seem to like it in some - // cases. - template - using RequiresInsertable = typename std::enable_if< - absl::disjunction, - SameAsElementReference>::value, - int>::type; - - // RequiresNotInit is a workaround for gcc prior to 7.1. - // See https://godbolt.org/g/Y4xsUh. - template - using RequiresNotInit = - typename std::enable_if::value, int>::type; - - template - using IsDecomposable = IsDecomposable; - - public: - static_assert(std::is_same::value, - "Allocators with custom pointer types are not supported"); - static_assert(std::is_same::value, - "Allocators with custom pointer types are not supported"); - - class iterator { - friend class raw_hash_set; - - public: - using iterator_category = std::forward_iterator_tag; - using value_type = typename raw_hash_set::value_type; - using reference = - absl::conditional_t; - using pointer = absl::remove_reference_t*; - using difference_type = typename raw_hash_set::difference_type; - - iterator() {} - - // PRECONDITION: not an end() iterator. - reference operator*() const { - ABSL_INTERNAL_ASSERT_IS_FULL(ctrl_, - "operator*() called on invalid iterator."); - return PolicyTraits::element(slot_); - } - - // PRECONDITION: not an end() iterator. - pointer operator->() const { - ABSL_INTERNAL_ASSERT_IS_FULL(ctrl_, - "operator-> called on invalid iterator."); - return &operator*(); - } - - // PRECONDITION: not an end() iterator. - iterator& operator++() { - ABSL_INTERNAL_ASSERT_IS_FULL(ctrl_, - "operator++ called on invalid iterator."); - ++ctrl_; - ++slot_; - skip_empty_or_deleted(); - return *this; - } - // PRECONDITION: not an end() iterator. - iterator operator++(int) { - auto tmp = *this; - ++*this; - return tmp; - } - - friend bool operator==(const iterator& a, const iterator& b) { - AssertIsValid(a.ctrl_); - AssertIsValid(b.ctrl_); - return a.ctrl_ == b.ctrl_; - } - friend bool operator!=(const iterator& a, const iterator& b) { - return !(a == b); - } - - private: - iterator(ctrl_t* ctrl, slot_type* slot) : ctrl_(ctrl), slot_(slot) { - // This assumption helps the compiler know that any non-end iterator is - // not equal to any end iterator. - ABSL_ASSUME(ctrl != nullptr); - } - - // Fixes up `ctrl_` to point to a full by advancing it and `slot_` until - // they reach one. - // - // If a sentinel is reached, we null both of them out instead. - void skip_empty_or_deleted() { - while (IsEmptyOrDeleted(*ctrl_)) { - uint32_t shift = Group{ctrl_}.CountLeadingEmptyOrDeleted(); - ctrl_ += shift; - slot_ += shift; - } - if (ABSL_PREDICT_FALSE(*ctrl_ == ctrl_t::kSentinel)) ctrl_ = nullptr; - } - - ctrl_t* ctrl_ = nullptr; - // To avoid uninitialized member warnings, put slot_ in an anonymous union. - // The member is not initialized on singleton and end iterators. - union { - slot_type* slot_; - }; - }; - - class const_iterator { - friend class raw_hash_set; - - public: - using iterator_category = typename iterator::iterator_category; - using value_type = typename raw_hash_set::value_type; - using reference = typename raw_hash_set::const_reference; - using pointer = typename raw_hash_set::const_pointer; - using difference_type = typename raw_hash_set::difference_type; - - const_iterator() {} - // Implicit construction from iterator. - const_iterator(iterator i) : inner_(std::move(i)) {} - - reference operator*() const { return *inner_; } - pointer operator->() const { return inner_.operator->(); } - - const_iterator& operator++() { - ++inner_; - return *this; - } - const_iterator operator++(int) { return inner_++; } - - friend bool operator==(const const_iterator& a, const const_iterator& b) { - return a.inner_ == b.inner_; - } - friend bool operator!=(const const_iterator& a, const const_iterator& b) { - return !(a == b); - } - - private: - const_iterator(const ctrl_t* ctrl, const slot_type* slot) - : inner_(const_cast(ctrl), const_cast(slot)) {} - - iterator inner_; - }; - - using node_type = node_handle, Alloc>; - using insert_return_type = InsertReturnType; - - raw_hash_set() noexcept( - std::is_nothrow_default_constructible::value&& - std::is_nothrow_default_constructible::value&& - std::is_nothrow_default_constructible::value) {} - - explicit raw_hash_set(size_t bucket_count, const hasher& hash = hasher(), - const key_equal& eq = key_equal(), - const allocator_type& alloc = allocator_type()) - : ctrl_(EmptyGroup()), - settings_(0, HashtablezInfoHandle(), hash, eq, alloc) { - if (bucket_count) { - capacity_ = NormalizeCapacity(bucket_count); - initialize_slots(); - } - } - - raw_hash_set(size_t bucket_count, const hasher& hash, - const allocator_type& alloc) - : raw_hash_set(bucket_count, hash, key_equal(), alloc) {} - - raw_hash_set(size_t bucket_count, const allocator_type& alloc) - : raw_hash_set(bucket_count, hasher(), key_equal(), alloc) {} - - explicit raw_hash_set(const allocator_type& alloc) - : raw_hash_set(0, hasher(), key_equal(), alloc) {} - - template - raw_hash_set(InputIter first, InputIter last, size_t bucket_count = 0, - const hasher& hash = hasher(), const key_equal& eq = key_equal(), - const allocator_type& alloc = allocator_type()) - : raw_hash_set(SelectBucketCountForIterRange(first, last, bucket_count), - hash, eq, alloc) { - insert(first, last); - } - - template - raw_hash_set(InputIter first, InputIter last, size_t bucket_count, - const hasher& hash, const allocator_type& alloc) - : raw_hash_set(first, last, bucket_count, hash, key_equal(), alloc) {} - - template - raw_hash_set(InputIter first, InputIter last, size_t bucket_count, - const allocator_type& alloc) - : raw_hash_set(first, last, bucket_count, hasher(), key_equal(), alloc) {} - - template - raw_hash_set(InputIter first, InputIter last, const allocator_type& alloc) - : raw_hash_set(first, last, 0, hasher(), key_equal(), alloc) {} - - // Instead of accepting std::initializer_list as the first - // argument like std::unordered_set does, we have two overloads - // that accept std::initializer_list and std::initializer_list. - // This is advantageous for performance. - // - // // Turns {"abc", "def"} into std::initializer_list, then - // // copies the strings into the set. - // std::unordered_set s = {"abc", "def"}; - // - // // Turns {"abc", "def"} into std::initializer_list, then - // // copies the strings into the set. - // absl::flat_hash_set s = {"abc", "def"}; - // - // The same trick is used in insert(). - // - // The enabler is necessary to prevent this constructor from triggering where - // the copy constructor is meant to be called. - // - // absl::flat_hash_set a, b{a}; - // - // RequiresNotInit is a workaround for gcc prior to 7.1. - template = 0, RequiresInsertable = 0> - raw_hash_set(std::initializer_list init, size_t bucket_count = 0, - const hasher& hash = hasher(), const key_equal& eq = key_equal(), - const allocator_type& alloc = allocator_type()) - : raw_hash_set(init.begin(), init.end(), bucket_count, hash, eq, alloc) {} - - raw_hash_set(std::initializer_list init, size_t bucket_count = 0, - const hasher& hash = hasher(), const key_equal& eq = key_equal(), - const allocator_type& alloc = allocator_type()) - : raw_hash_set(init.begin(), init.end(), bucket_count, hash, eq, alloc) {} - - template = 0, RequiresInsertable = 0> - raw_hash_set(std::initializer_list init, size_t bucket_count, - const hasher& hash, const allocator_type& alloc) - : raw_hash_set(init, bucket_count, hash, key_equal(), alloc) {} - - raw_hash_set(std::initializer_list init, size_t bucket_count, - const hasher& hash, const allocator_type& alloc) - : raw_hash_set(init, bucket_count, hash, key_equal(), alloc) {} - - template = 0, RequiresInsertable = 0> - raw_hash_set(std::initializer_list init, size_t bucket_count, - const allocator_type& alloc) - : raw_hash_set(init, bucket_count, hasher(), key_equal(), alloc) {} - - raw_hash_set(std::initializer_list init, size_t bucket_count, - const allocator_type& alloc) - : raw_hash_set(init, bucket_count, hasher(), key_equal(), alloc) {} - - template = 0, RequiresInsertable = 0> - raw_hash_set(std::initializer_list init, const allocator_type& alloc) - : raw_hash_set(init, 0, hasher(), key_equal(), alloc) {} - - raw_hash_set(std::initializer_list init, - const allocator_type& alloc) - : raw_hash_set(init, 0, hasher(), key_equal(), alloc) {} - - raw_hash_set(const raw_hash_set& that) - : raw_hash_set(that, AllocTraits::select_on_container_copy_construction( - that.alloc_ref())) {} - - raw_hash_set(const raw_hash_set& that, const allocator_type& a) - : raw_hash_set(0, that.hash_ref(), that.eq_ref(), a) { - reserve(that.size()); - // Because the table is guaranteed to be empty, we can do something faster - // than a full `insert`. - for (const auto& v : that) { - const size_t hash = PolicyTraits::apply(HashElement{hash_ref()}, v); - auto target = find_first_non_full(ctrl_, hash, capacity_); - SetCtrl(target.offset, H2(hash), capacity_, ctrl_, slots_, - sizeof(slot_type)); - emplace_at(target.offset, v); - infoz().RecordInsert(hash, target.probe_length); - } - size_ = that.size(); - growth_left() -= that.size(); - } - - raw_hash_set(raw_hash_set&& that) noexcept( - std::is_nothrow_copy_constructible::value&& - std::is_nothrow_copy_constructible::value&& - std::is_nothrow_copy_constructible::value) - : ctrl_(absl::exchange(that.ctrl_, EmptyGroup())), - slots_(absl::exchange(that.slots_, nullptr)), - size_(absl::exchange(that.size_, 0)), - capacity_(absl::exchange(that.capacity_, 0)), - // Hash, equality and allocator are copied instead of moved because - // `that` must be left valid. If Hash is std::function, moving it - // would create a nullptr functor that cannot be called. - settings_(absl::exchange(that.growth_left(), 0), - absl::exchange(that.infoz(), HashtablezInfoHandle()), - that.hash_ref(), that.eq_ref(), that.alloc_ref()) {} - - raw_hash_set(raw_hash_set&& that, const allocator_type& a) - : ctrl_(EmptyGroup()), - slots_(nullptr), - size_(0), - capacity_(0), - settings_(0, HashtablezInfoHandle(), that.hash_ref(), that.eq_ref(), - a) { - if (a == that.alloc_ref()) { - std::swap(ctrl_, that.ctrl_); - std::swap(slots_, that.slots_); - std::swap(size_, that.size_); - std::swap(capacity_, that.capacity_); - std::swap(growth_left(), that.growth_left()); - std::swap(infoz(), that.infoz()); - } else { - reserve(that.size()); - // Note: this will copy elements of dense_set and unordered_set instead of - // moving them. This can be fixed if it ever becomes an issue. - for (auto& elem : that) insert(std::move(elem)); - } - } - - raw_hash_set& operator=(const raw_hash_set& that) { - raw_hash_set tmp(that, - AllocTraits::propagate_on_container_copy_assignment::value - ? that.alloc_ref() - : alloc_ref()); - swap(tmp); - return *this; - } - - raw_hash_set& operator=(raw_hash_set&& that) noexcept( - absl::allocator_traits::is_always_equal::value&& - std::is_nothrow_move_assignable::value&& - std::is_nothrow_move_assignable::value) { - // TODO(sbenza): We should only use the operations from the noexcept clause - // to make sure we actually adhere to that contract. - return move_assign( - std::move(that), - typename AllocTraits::propagate_on_container_move_assignment()); - } - - ~raw_hash_set() { destroy_slots(); } - - iterator begin() { - auto it = iterator_at(0); - it.skip_empty_or_deleted(); - return it; - } - iterator end() { return {}; } - - const_iterator begin() const { - return const_cast(this)->begin(); - } - const_iterator end() const { return {}; } - const_iterator cbegin() const { return begin(); } - const_iterator cend() const { return end(); } - - bool empty() const { return !size(); } - size_t size() const { return size_; } - size_t capacity() const { return capacity_; } - size_t max_size() const { return (std::numeric_limits::max)(); } - - ABSL_ATTRIBUTE_REINITIALIZES void clear() { - // Iterating over this container is O(bucket_count()). When bucket_count() - // is much greater than size(), iteration becomes prohibitively expensive. - // For clear() it is more important to reuse the allocated array when the - // container is small because allocation takes comparatively long time - // compared to destruction of the elements of the container. So we pick the - // largest bucket_count() threshold for which iteration is still fast and - // past that we simply deallocate the array. - if (capacity_ > 127) { - destroy_slots(); - - infoz().RecordClearedReservation(); - } else if (capacity_) { - for (size_t i = 0; i != capacity_; ++i) { - if (IsFull(ctrl_[i])) { - PolicyTraits::destroy(&alloc_ref(), slots_ + i); - } - } - size_ = 0; - ResetCtrl(capacity_, ctrl_, slots_, sizeof(slot_type)); - reset_growth_left(); - } - assert(empty()); - infoz().RecordStorageChanged(0, capacity_); - } - - // This overload kicks in when the argument is an rvalue of insertable and - // decomposable type other than init_type. - // - // flat_hash_map m; - // m.insert(std::make_pair("abc", 42)); - // TODO(cheshire): A type alias T2 is introduced as a workaround for the nvcc - // bug. - template = 0, class T2 = T, - typename std::enable_if::value, int>::type = 0, - T* = nullptr> - std::pair insert(T&& value) { - return emplace(std::forward(value)); - } - - // This overload kicks in when the argument is a bitfield or an lvalue of - // insertable and decomposable type. - // - // union { int n : 1; }; - // flat_hash_set s; - // s.insert(n); - // - // flat_hash_set s; - // const char* p = "hello"; - // s.insert(p); - // - // TODO(romanp): Once we stop supporting gcc 5.1 and below, replace - // RequiresInsertable with RequiresInsertable. - // We are hitting this bug: https://godbolt.org/g/1Vht4f. - template < - class T, RequiresInsertable = 0, - typename std::enable_if::value, int>::type = 0> - std::pair insert(const T& value) { - return emplace(value); - } - - // This overload kicks in when the argument is an rvalue of init_type. Its - // purpose is to handle brace-init-list arguments. - // - // flat_hash_map s; - // s.insert({"abc", 42}); - std::pair insert(init_type&& value) { - return emplace(std::move(value)); - } - - // TODO(cheshire): A type alias T2 is introduced as a workaround for the nvcc - // bug. - template = 0, class T2 = T, - typename std::enable_if::value, int>::type = 0, - T* = nullptr> - iterator insert(const_iterator, T&& value) { - return insert(std::forward(value)).first; - } - - // TODO(romanp): Once we stop supporting gcc 5.1 and below, replace - // RequiresInsertable with RequiresInsertable. - // We are hitting this bug: https://godbolt.org/g/1Vht4f. - template < - class T, RequiresInsertable = 0, - typename std::enable_if::value, int>::type = 0> - iterator insert(const_iterator, const T& value) { - return insert(value).first; - } - - iterator insert(const_iterator, init_type&& value) { - return insert(std::move(value)).first; - } - - template - void insert(InputIt first, InputIt last) { - for (; first != last; ++first) emplace(*first); - } - - template = 0, RequiresInsertable = 0> - void insert(std::initializer_list ilist) { - insert(ilist.begin(), ilist.end()); - } - - void insert(std::initializer_list ilist) { - insert(ilist.begin(), ilist.end()); - } - - insert_return_type insert(node_type&& node) { - if (!node) return {end(), false, node_type()}; - const auto& elem = PolicyTraits::element(CommonAccess::GetSlot(node)); - auto res = PolicyTraits::apply( - InsertSlot{*this, std::move(*CommonAccess::GetSlot(node))}, - elem); - if (res.second) { - CommonAccess::Reset(&node); - return {res.first, true, node_type()}; - } else { - return {res.first, false, std::move(node)}; - } - } - - iterator insert(const_iterator, node_type&& node) { - auto res = insert(std::move(node)); - node = std::move(res.node); - return res.position; - } - - // This overload kicks in if we can deduce the key from args. This enables us - // to avoid constructing value_type if an entry with the same key already - // exists. - // - // For example: - // - // flat_hash_map m = {{"abc", "def"}}; - // // Creates no std::string copies and makes no heap allocations. - // m.emplace("abc", "xyz"); - template ::value, int>::type = 0> - std::pair emplace(Args&&... args) { - return PolicyTraits::apply(EmplaceDecomposable{*this}, - std::forward(args)...); - } - - // This overload kicks in if we cannot deduce the key from args. It constructs - // value_type unconditionally and then either moves it into the table or - // destroys. - template ::value, int>::type = 0> - std::pair emplace(Args&&... args) { - alignas(slot_type) unsigned char raw[sizeof(slot_type)]; - slot_type* slot = reinterpret_cast(&raw); - - PolicyTraits::construct(&alloc_ref(), slot, std::forward(args)...); - const auto& elem = PolicyTraits::element(slot); - return PolicyTraits::apply(InsertSlot{*this, std::move(*slot)}, elem); - } - - template - iterator emplace_hint(const_iterator, Args&&... args) { - return emplace(std::forward(args)...).first; - } - - // Extension API: support for lazy emplace. - // - // Looks up key in the table. If found, returns the iterator to the element. - // Otherwise calls `f` with one argument of type `raw_hash_set::constructor`. - // - // `f` must abide by several restrictions: - // - it MUST call `raw_hash_set::constructor` with arguments as if a - // `raw_hash_set::value_type` is constructed, - // - it MUST NOT access the container before the call to - // `raw_hash_set::constructor`, and - // - it MUST NOT erase the lazily emplaced element. - // Doing any of these is undefined behavior. - // - // For example: - // - // std::unordered_set s; - // // Makes ArenaStr even if "abc" is in the map. - // s.insert(ArenaString(&arena, "abc")); - // - // flat_hash_set s; - // // Makes ArenaStr only if "abc" is not in the map. - // s.lazy_emplace("abc", [&](const constructor& ctor) { - // ctor(&arena, "abc"); - // }); - // - // WARNING: This API is currently experimental. If there is a way to implement - // the same thing with the rest of the API, prefer that. - class constructor { - friend class raw_hash_set; - - public: - template - void operator()(Args&&... args) const { - assert(*slot_); - PolicyTraits::construct(alloc_, *slot_, std::forward(args)...); - *slot_ = nullptr; - } - - private: - constructor(allocator_type* a, slot_type** slot) : alloc_(a), slot_(slot) {} - - allocator_type* alloc_; - slot_type** slot_; - }; - - template - iterator lazy_emplace(const key_arg& key, F&& f) { - auto res = find_or_prepare_insert(key); - if (res.second) { - slot_type* slot = slots_ + res.first; - std::forward(f)(constructor(&alloc_ref(), &slot)); - assert(!slot); - } - return iterator_at(res.first); - } - - // Extension API: support for heterogeneous keys. - // - // std::unordered_set s; - // // Turns "abc" into std::string. - // s.erase("abc"); - // - // flat_hash_set s; - // // Uses "abc" directly without copying it into std::string. - // s.erase("abc"); - template - size_type erase(const key_arg& key) { - auto it = find(key); - if (it == end()) return 0; - erase(it); - return 1; - } - - // Erases the element pointed to by `it`. Unlike `std::unordered_set::erase`, - // this method returns void to reduce algorithmic complexity to O(1). The - // iterator is invalidated, so any increment should be done before calling - // erase. In order to erase while iterating across a map, use the following - // idiom (which also works for standard containers): - // - // for (auto it = m.begin(), end = m.end(); it != end;) { - // // `erase()` will invalidate `it`, so advance `it` first. - // auto copy_it = it++; - // if () { - // m.erase(copy_it); - // } - // } - void erase(const_iterator cit) { erase(cit.inner_); } - - // This overload is necessary because otherwise erase(const K&) would be - // a better match if non-const iterator is passed as an argument. - void erase(iterator it) { - ABSL_INTERNAL_ASSERT_IS_FULL(it.ctrl_, - "erase() called on invalid iterator."); - PolicyTraits::destroy(&alloc_ref(), it.slot_); - erase_meta_only(it); - } - - iterator erase(const_iterator first, const_iterator last) { - while (first != last) { - erase(first++); - } - return last.inner_; - } - - // Moves elements from `src` into `this`. - // If the element already exists in `this`, it is left unmodified in `src`. - template - void merge(raw_hash_set& src) { // NOLINT - assert(this != &src); - for (auto it = src.begin(), e = src.end(); it != e;) { - auto next = std::next(it); - if (PolicyTraits::apply(InsertSlot{*this, std::move(*it.slot_)}, - PolicyTraits::element(it.slot_)) - .second) { - src.erase_meta_only(it); - } - it = next; - } - } - - template - void merge(raw_hash_set&& src) { - merge(src); - } - - node_type extract(const_iterator position) { - ABSL_INTERNAL_ASSERT_IS_FULL(position.inner_.ctrl_, - "extract() called on invalid iterator."); - auto node = - CommonAccess::Transfer(alloc_ref(), position.inner_.slot_); - erase_meta_only(position); - return node; - } - - template < - class K = key_type, - typename std::enable_if::value, int>::type = 0> - node_type extract(const key_arg& key) { - auto it = find(key); - return it == end() ? node_type() : extract(const_iterator{it}); - } - - void swap(raw_hash_set& that) noexcept( - IsNoThrowSwappable() && IsNoThrowSwappable() && - IsNoThrowSwappable( - typename AllocTraits::propagate_on_container_swap{})) { - using std::swap; - swap(ctrl_, that.ctrl_); - swap(slots_, that.slots_); - swap(size_, that.size_); - swap(capacity_, that.capacity_); - swap(growth_left(), that.growth_left()); - swap(hash_ref(), that.hash_ref()); - swap(eq_ref(), that.eq_ref()); - swap(infoz(), that.infoz()); - SwapAlloc(alloc_ref(), that.alloc_ref(), - typename AllocTraits::propagate_on_container_swap{}); - } - - void rehash(size_t n) { - if (n == 0 && capacity_ == 0) return; - if (n == 0 && size_ == 0) { - destroy_slots(); - infoz().RecordStorageChanged(0, 0); - infoz().RecordClearedReservation(); - return; - } - - // bitor is a faster way of doing `max` here. We will round up to the next - // power-of-2-minus-1, so bitor is good enough. - auto m = NormalizeCapacity(n | GrowthToLowerboundCapacity(size())); - // n == 0 unconditionally rehashes as per the standard. - if (n == 0 || m > capacity_) { - resize(m); - - // This is after resize, to ensure that we have completed the allocation - // and have potentially sampled the hashtable. - infoz().RecordReservation(n); - } - } - - void reserve(size_t n) { - if (n > size() + growth_left()) { - size_t m = GrowthToLowerboundCapacity(n); - resize(NormalizeCapacity(m)); - - // This is after resize, to ensure that we have completed the allocation - // and have potentially sampled the hashtable. - infoz().RecordReservation(n); - } - } - - // Extension API: support for heterogeneous keys. - // - // std::unordered_set s; - // // Turns "abc" into std::string. - // s.count("abc"); - // - // ch_set s; - // // Uses "abc" directly without copying it into std::string. - // s.count("abc"); - template - size_t count(const key_arg& key) const { - return find(key) == end() ? 0 : 1; - } - - // Issues CPU prefetch instructions for the memory needed to find or insert - // a key. Like all lookup functions, this support heterogeneous keys. - // - // NOTE: This is a very low level operation and should not be used without - // specific benchmarks indicating its importance. - template - void prefetch(const key_arg& key) const { - (void)key; - // Avoid probing if we won't be able to prefetch the addresses received. -#ifdef ABSL_INTERNAL_HAVE_PREFETCH - prefetch_heap_block(); - auto seq = probe(ctrl_, hash_ref()(key), capacity_); - base_internal::PrefetchT0(ctrl_ + seq.offset()); - base_internal::PrefetchT0(slots_ + seq.offset()); -#endif // ABSL_INTERNAL_HAVE_PREFETCH - } - - // The API of find() has two extensions. - // - // 1. The hash can be passed by the user. It must be equal to the hash of the - // key. - // - // 2. The type of the key argument doesn't have to be key_type. This is so - // called heterogeneous key support. - template - iterator find(const key_arg& key, size_t hash) { - auto seq = probe(ctrl_, hash, capacity_); - while (true) { - Group g{ctrl_ + seq.offset()}; - for (uint32_t i : g.Match(H2(hash))) { - if (ABSL_PREDICT_TRUE(PolicyTraits::apply( - EqualElement{key, eq_ref()}, - PolicyTraits::element(slots_ + seq.offset(i))))) - return iterator_at(seq.offset(i)); - } - if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return end(); - seq.next(); - assert(seq.index() <= capacity_ && "full table!"); - } - } - template - iterator find(const key_arg& key) { - prefetch_heap_block(); - return find(key, hash_ref()(key)); - } - - template - const_iterator find(const key_arg& key, size_t hash) const { - return const_cast(this)->find(key, hash); - } - template - const_iterator find(const key_arg& key) const { - prefetch_heap_block(); - return find(key, hash_ref()(key)); - } - - template - bool contains(const key_arg& key) const { - return find(key) != end(); - } - - template - std::pair equal_range(const key_arg& key) { - auto it = find(key); - if (it != end()) return {it, std::next(it)}; - return {it, it}; - } - template - std::pair equal_range( - const key_arg& key) const { - auto it = find(key); - if (it != end()) return {it, std::next(it)}; - return {it, it}; - } - - size_t bucket_count() const { return capacity_; } - float load_factor() const { - return capacity_ ? static_cast(size()) / capacity_ : 0.0; - } - float max_load_factor() const { return 1.0f; } - void max_load_factor(float) { - // Does nothing. - } - - hasher hash_function() const { return hash_ref(); } - key_equal key_eq() const { return eq_ref(); } - allocator_type get_allocator() const { return alloc_ref(); } - - friend bool operator==(const raw_hash_set& a, const raw_hash_set& b) { - if (a.size() != b.size()) return false; - const raw_hash_set* outer = &a; - const raw_hash_set* inner = &b; - if (outer->capacity() > inner->capacity()) std::swap(outer, inner); - for (const value_type& elem : *outer) - if (!inner->has_element(elem)) return false; - return true; - } - - friend bool operator!=(const raw_hash_set& a, const raw_hash_set& b) { - return !(a == b); - } - - template - friend typename std::enable_if::value, - H>::type - AbslHashValue(H h, const raw_hash_set& s) { - return H::combine(H::combine_unordered(std::move(h), s.begin(), s.end()), - s.size()); - } - - friend void swap(raw_hash_set& a, - raw_hash_set& b) noexcept(noexcept(a.swap(b))) { - a.swap(b); - } - - private: - template - friend struct absl::container_internal::hashtable_debug_internal:: - HashtableDebugAccess; - - struct FindElement { - template - const_iterator operator()(const K& key, Args&&...) const { - return s.find(key); - } - const raw_hash_set& s; - }; - - struct HashElement { - template - size_t operator()(const K& key, Args&&...) const { - return h(key); - } - const hasher& h; - }; - - template - struct EqualElement { - template - bool operator()(const K2& lhs, Args&&...) const { - return eq(lhs, rhs); - } - const K1& rhs; - const key_equal& eq; - }; - - struct EmplaceDecomposable { - template - std::pair operator()(const K& key, Args&&... args) const { - auto res = s.find_or_prepare_insert(key); - if (res.second) { - s.emplace_at(res.first, std::forward(args)...); - } - return {s.iterator_at(res.first), res.second}; - } - raw_hash_set& s; - }; - - template - struct InsertSlot { - template - std::pair operator()(const K& key, Args&&...) && { - auto res = s.find_or_prepare_insert(key); - if (res.second) { - PolicyTraits::transfer(&s.alloc_ref(), s.slots_ + res.first, &slot); - } else if (do_destroy) { - PolicyTraits::destroy(&s.alloc_ref(), &slot); - } - return {s.iterator_at(res.first), res.second}; - } - raw_hash_set& s; - // Constructed slot. Either moved into place or destroyed. - slot_type&& slot; - }; - - // Erases, but does not destroy, the value pointed to by `it`. - // - // This merely updates the pertinent control byte. This can be used in - // conjunction with Policy::transfer to move the object to another place. - void erase_meta_only(const_iterator it) { - assert(IsFull(*it.inner_.ctrl_) && "erasing a dangling iterator"); - --size_; - const size_t index = static_cast(it.inner_.ctrl_ - ctrl_); - const size_t index_before = (index - Group::kWidth) & capacity_; - const auto empty_after = Group(it.inner_.ctrl_).MaskEmpty(); - const auto empty_before = Group(ctrl_ + index_before).MaskEmpty(); - - // We count how many consecutive non empties we have to the right and to the - // left of `it`. If the sum is >= kWidth then there is at least one probe - // window that might have seen a full group. - bool was_never_full = - empty_before && empty_after && - static_cast(empty_after.TrailingZeros() + - empty_before.LeadingZeros()) < Group::kWidth; - - SetCtrl(index, was_never_full ? ctrl_t::kEmpty : ctrl_t::kDeleted, - capacity_, ctrl_, slots_, sizeof(slot_type)); - growth_left() += was_never_full; - infoz().RecordErase(); - } - - // Allocates a backing array for `self` and initializes its control bytes. - // This reads `capacity_` and updates all other fields based on the result of - // the allocation. - // - // This does not free the currently held array; `capacity_` must be nonzero. - void initialize_slots() { - assert(capacity_); - // Folks with custom allocators often make unwarranted assumptions about the - // behavior of their classes vis-a-vis trivial destructability and what - // calls they will or wont make. Avoid sampling for people with custom - // allocators to get us out of this mess. This is not a hard guarantee but - // a workaround while we plan the exact guarantee we want to provide. - // - // People are often sloppy with the exact type of their allocator (sometimes - // it has an extra const or is missing the pair, but rebinds made it work - // anyway). To avoid the ambiguity, we work off SlotAlloc which we have - // bound more carefully. - if (std::is_same>::value && - slots_ == nullptr) { - infoz() = Sample(sizeof(slot_type)); - } - - char* mem = static_cast(Allocate( - &alloc_ref(), - AllocSize(capacity_, sizeof(slot_type), alignof(slot_type)))); - ctrl_ = reinterpret_cast(mem); - slots_ = reinterpret_cast( - mem + SlotOffset(capacity_, alignof(slot_type))); - ResetCtrl(capacity_, ctrl_, slots_, sizeof(slot_type)); - reset_growth_left(); - infoz().RecordStorageChanged(size_, capacity_); - } - - // Destroys all slots in the backing array, frees the backing array, and - // clears all top-level book-keeping data. - // - // This essentially implements `map = raw_hash_set();`. - void destroy_slots() { - if (!capacity_) return; - for (size_t i = 0; i != capacity_; ++i) { - if (IsFull(ctrl_[i])) { - PolicyTraits::destroy(&alloc_ref(), slots_ + i); - } - } - - // Unpoison before returning the memory to the allocator. - SanitizerUnpoisonMemoryRegion(slots_, sizeof(slot_type) * capacity_); - Deallocate( - &alloc_ref(), ctrl_, - AllocSize(capacity_, sizeof(slot_type), alignof(slot_type))); - ctrl_ = EmptyGroup(); - slots_ = nullptr; - size_ = 0; - capacity_ = 0; - growth_left() = 0; - } - - void resize(size_t new_capacity) { - assert(IsValidCapacity(new_capacity)); - auto* old_ctrl = ctrl_; - auto* old_slots = slots_; - const size_t old_capacity = capacity_; - capacity_ = new_capacity; - initialize_slots(); - - size_t total_probe_length = 0; - for (size_t i = 0; i != old_capacity; ++i) { - if (IsFull(old_ctrl[i])) { - size_t hash = PolicyTraits::apply(HashElement{hash_ref()}, - PolicyTraits::element(old_slots + i)); - auto target = find_first_non_full(ctrl_, hash, capacity_); - size_t new_i = target.offset; - total_probe_length += target.probe_length; - SetCtrl(new_i, H2(hash), capacity_, ctrl_, slots_, sizeof(slot_type)); - PolicyTraits::transfer(&alloc_ref(), slots_ + new_i, old_slots + i); - } - } - if (old_capacity) { - SanitizerUnpoisonMemoryRegion(old_slots, - sizeof(slot_type) * old_capacity); - Deallocate( - &alloc_ref(), old_ctrl, - AllocSize(old_capacity, sizeof(slot_type), alignof(slot_type))); - } - infoz().RecordRehash(total_probe_length); - } - - // Prunes control bytes to remove as many tombstones as possible. - // - // See the comment on `rehash_and_grow_if_necessary()`. - void drop_deletes_without_resize() ABSL_ATTRIBUTE_NOINLINE { - assert(IsValidCapacity(capacity_)); - assert(!is_small(capacity_)); - // Algorithm: - // - mark all DELETED slots as EMPTY - // - mark all FULL slots as DELETED - // - for each slot marked as DELETED - // hash = Hash(element) - // target = find_first_non_full(hash) - // if target is in the same group - // mark slot as FULL - // else if target is EMPTY - // transfer element to target - // mark slot as EMPTY - // mark target as FULL - // else if target is DELETED - // swap current element with target element - // mark target as FULL - // repeat procedure for current slot with moved from element (target) - ConvertDeletedToEmptyAndFullToDeleted(ctrl_, capacity_); - alignas(slot_type) unsigned char raw[sizeof(slot_type)]; - size_t total_probe_length = 0; - slot_type* slot = reinterpret_cast(&raw); - for (size_t i = 0; i != capacity_; ++i) { - if (!IsDeleted(ctrl_[i])) continue; - const size_t hash = PolicyTraits::apply( - HashElement{hash_ref()}, PolicyTraits::element(slots_ + i)); - const FindInfo target = find_first_non_full(ctrl_, hash, capacity_); - const size_t new_i = target.offset; - total_probe_length += target.probe_length; - - // Verify if the old and new i fall within the same group wrt the hash. - // If they do, we don't need to move the object as it falls already in the - // best probe we can. - const size_t probe_offset = probe(ctrl_, hash, capacity_).offset(); - const auto probe_index = [probe_offset, this](size_t pos) { - return ((pos - probe_offset) & capacity_) / Group::kWidth; - }; - - // Element doesn't move. - if (ABSL_PREDICT_TRUE(probe_index(new_i) == probe_index(i))) { - SetCtrl(i, H2(hash), capacity_, ctrl_, slots_, sizeof(slot_type)); - continue; - } - if (IsEmpty(ctrl_[new_i])) { - // Transfer element to the empty spot. - // SetCtrl poisons/unpoisons the slots so we have to call it at the - // right time. - SetCtrl(new_i, H2(hash), capacity_, ctrl_, slots_, sizeof(slot_type)); - PolicyTraits::transfer(&alloc_ref(), slots_ + new_i, slots_ + i); - SetCtrl(i, ctrl_t::kEmpty, capacity_, ctrl_, slots_, sizeof(slot_type)); - } else { - assert(IsDeleted(ctrl_[new_i])); - SetCtrl(new_i, H2(hash), capacity_, ctrl_, slots_, sizeof(slot_type)); - // Until we are done rehashing, DELETED marks previously FULL slots. - // Swap i and new_i elements. - PolicyTraits::transfer(&alloc_ref(), slot, slots_ + i); - PolicyTraits::transfer(&alloc_ref(), slots_ + i, slots_ + new_i); - PolicyTraits::transfer(&alloc_ref(), slots_ + new_i, slot); - --i; // repeat - } - } - reset_growth_left(); - infoz().RecordRehash(total_probe_length); - } - - // Called whenever the table *might* need to conditionally grow. - // - // This function is an optimization opportunity to perform a rehash even when - // growth is unnecessary, because vacating tombstones is beneficial for - // performance in the long-run. - void rehash_and_grow_if_necessary() { - if (capacity_ == 0) { - resize(1); - } else if (capacity_ > Group::kWidth && - // Do these calcuations in 64-bit to avoid overflow. - size() * uint64_t{32} <= capacity_ * uint64_t{25}) { - // Squash DELETED without growing if there is enough capacity. - // - // Rehash in place if the current size is <= 25/32 of capacity_. - // Rationale for such a high factor: 1) drop_deletes_without_resize() is - // faster than resize, and 2) it takes quite a bit of work to add - // tombstones. In the worst case, seems to take approximately 4 - // insert/erase pairs to create a single tombstone and so if we are - // rehashing because of tombstones, we can afford to rehash-in-place as - // long as we are reclaiming at least 1/8 the capacity without doing more - // than 2X the work. (Where "work" is defined to be size() for rehashing - // or rehashing in place, and 1 for an insert or erase.) But rehashing in - // place is faster per operation than inserting or even doubling the size - // of the table, so we actually afford to reclaim even less space from a - // resize-in-place. The decision is to rehash in place if we can reclaim - // at about 1/8th of the usable capacity (specifically 3/28 of the - // capacity) which means that the total cost of rehashing will be a small - // fraction of the total work. - // - // Here is output of an experiment using the BM_CacheInSteadyState - // benchmark running the old case (where we rehash-in-place only if we can - // reclaim at least 7/16*capacity_) vs. this code (which rehashes in place - // if we can recover 3/32*capacity_). - // - // Note that although in the worst-case number of rehashes jumped up from - // 15 to 190, but the number of operations per second is almost the same. - // - // Abridged output of running BM_CacheInSteadyState benchmark from - // raw_hash_set_benchmark. N is the number of insert/erase operations. - // - // | OLD (recover >= 7/16 | NEW (recover >= 3/32) - // size | N/s LoadFactor NRehashes | N/s LoadFactor NRehashes - // 448 | 145284 0.44 18 | 140118 0.44 19 - // 493 | 152546 0.24 11 | 151417 0.48 28 - // 538 | 151439 0.26 11 | 151152 0.53 38 - // 583 | 151765 0.28 11 | 150572 0.57 50 - // 628 | 150241 0.31 11 | 150853 0.61 66 - // 672 | 149602 0.33 12 | 150110 0.66 90 - // 717 | 149998 0.35 12 | 149531 0.70 129 - // 762 | 149836 0.37 13 | 148559 0.74 190 - // 807 | 149736 0.39 14 | 151107 0.39 14 - // 852 | 150204 0.42 15 | 151019 0.42 15 - drop_deletes_without_resize(); - } else { - // Otherwise grow the container. - resize(capacity_ * 2 + 1); - } - } - - bool has_element(const value_type& elem) const { - size_t hash = PolicyTraits::apply(HashElement{hash_ref()}, elem); - auto seq = probe(ctrl_, hash, capacity_); - while (true) { - Group g{ctrl_ + seq.offset()}; - for (uint32_t i : g.Match(H2(hash))) { - if (ABSL_PREDICT_TRUE(PolicyTraits::element(slots_ + seq.offset(i)) == - elem)) - return true; - } - if (ABSL_PREDICT_TRUE(g.MaskEmpty())) return false; - seq.next(); - assert(seq.index() <= capacity_ && "full table!"); - } - return false; - } - - // TODO(alkis): Optimize this assuming *this and that don't overlap. - raw_hash_set& move_assign(raw_hash_set&& that, std::true_type) { - raw_hash_set tmp(std::move(that)); - swap(tmp); - return *this; - } - raw_hash_set& move_assign(raw_hash_set&& that, std::false_type) { - raw_hash_set tmp(std::move(that), alloc_ref()); - swap(tmp); - return *this; - } - - protected: - // Attempts to find `key` in the table; if it isn't found, returns a slot that - // the value can be inserted into, with the control byte already set to - // `key`'s H2. - template - std::pair find_or_prepare_insert(const K& key) { - prefetch_heap_block(); - auto hash = hash_ref()(key); - auto seq = probe(ctrl_, hash, capacity_); - while (true) { - Group g{ctrl_ + seq.offset()}; - for (uint32_t i : g.Match(H2(hash))) { - if (ABSL_PREDICT_TRUE(PolicyTraits::apply( - EqualElement{key, eq_ref()}, - PolicyTraits::element(slots_ + seq.offset(i))))) - return {seq.offset(i), false}; - } - if (ABSL_PREDICT_TRUE(g.MaskEmpty())) break; - seq.next(); - assert(seq.index() <= capacity_ && "full table!"); - } - return {prepare_insert(hash), true}; - } - - // Given the hash of a value not currently in the table, finds the next - // viable slot index to insert it at. - // - // REQUIRES: At least one non-full slot available. - size_t prepare_insert(size_t hash) ABSL_ATTRIBUTE_NOINLINE { - auto target = find_first_non_full(ctrl_, hash, capacity_); - if (ABSL_PREDICT_FALSE(growth_left() == 0 && - !IsDeleted(ctrl_[target.offset]))) { - rehash_and_grow_if_necessary(); - target = find_first_non_full(ctrl_, hash, capacity_); - } - ++size_; - growth_left() -= IsEmpty(ctrl_[target.offset]); - SetCtrl(target.offset, H2(hash), capacity_, ctrl_, slots_, - sizeof(slot_type)); - infoz().RecordInsert(hash, target.probe_length); - return target.offset; - } - - // Constructs the value in the space pointed by the iterator. This only works - // after an unsuccessful find_or_prepare_insert() and before any other - // modifications happen in the raw_hash_set. - // - // PRECONDITION: i is an index returned from find_or_prepare_insert(k), where - // k is the key decomposed from `forward(args)...`, and the bool - // returned by find_or_prepare_insert(k) was true. - // POSTCONDITION: *m.iterator_at(i) == value_type(forward(args)...). - template - void emplace_at(size_t i, Args&&... args) { - PolicyTraits::construct(&alloc_ref(), slots_ + i, - std::forward(args)...); - - assert(PolicyTraits::apply(FindElement{*this}, *iterator_at(i)) == - iterator_at(i) && - "constructed value does not match the lookup key"); - } - - iterator iterator_at(size_t i) { return {ctrl_ + i, slots_ + i}; } - const_iterator iterator_at(size_t i) const { return {ctrl_ + i, slots_ + i}; } - - private: - friend struct RawHashSetTestOnlyAccess; - - void reset_growth_left() { - growth_left() = CapacityToGrowth(capacity()) - size_; - } - - // The number of slots we can still fill without needing to rehash. - // - // This is stored separately due to tombstones: we do not include tombstones - // in the growth capacity, because we'd like to rehash when the table is - // otherwise filled with tombstones: otherwise, probe sequences might get - // unacceptably long without triggering a rehash. Callers can also force a - // rehash via the standard `rehash(0)`, which will recompute this value as a - // side-effect. - // - // See `CapacityToGrowth()`. - size_t& growth_left() { return settings_.template get<0>(); } - - // Prefetch the heap-allocated memory region to resolve potential TLB misses. - // This is intended to overlap with execution of calculating the hash for a - // key. - void prefetch_heap_block() const { - base_internal::PrefetchT2(ctrl_); - } - - HashtablezInfoHandle& infoz() { return settings_.template get<1>(); } - - hasher& hash_ref() { return settings_.template get<2>(); } - const hasher& hash_ref() const { return settings_.template get<2>(); } - key_equal& eq_ref() { return settings_.template get<3>(); } - const key_equal& eq_ref() const { return settings_.template get<3>(); } - allocator_type& alloc_ref() { return settings_.template get<4>(); } - const allocator_type& alloc_ref() const { - return settings_.template get<4>(); - } - - // TODO(alkis): Investigate removing some of these fields: - // - ctrl/slots can be derived from each other - // - size can be moved into the slot array - - // The control bytes (and, also, a pointer to the base of the backing array). - // - // This contains `capacity_ + 1 + NumClonedBytes()` entries, even - // when the table is empty (hence EmptyGroup). - ctrl_t* ctrl_ = EmptyGroup(); - // The beginning of the slots, located at `SlotOffset()` bytes after - // `ctrl_`. May be null for empty tables. - slot_type* slots_ = nullptr; - - // The number of filled slots. - size_t size_ = 0; - - // The total number of available slots. - size_t capacity_ = 0; - absl::container_internal::CompressedTuple - settings_{0u, HashtablezInfoHandle{}, hasher{}, key_equal{}, - allocator_type{}}; -}; - -// Erases all elements that satisfy the predicate `pred` from the container `c`. -template -typename raw_hash_set::size_type EraseIf( - Predicate& pred, raw_hash_set* c) { - const auto initial_size = c->size(); - for (auto it = c->begin(), last = c->end(); it != last;) { - if (pred(*it)) { - c->erase(it++); - } else { - ++it; - } - } - return initial_size - c->size(); -} - -namespace hashtable_debug_internal { -template -struct HashtableDebugAccess> { - using Traits = typename Set::PolicyTraits; - using Slot = typename Traits::slot_type; - - static size_t GetNumProbes(const Set& set, - const typename Set::key_type& key) { - size_t num_probes = 0; - size_t hash = set.hash_ref()(key); - auto seq = probe(set.ctrl_, hash, set.capacity_); - while (true) { - container_internal::Group g{set.ctrl_ + seq.offset()}; - for (uint32_t i : g.Match(container_internal::H2(hash))) { - if (Traits::apply( - typename Set::template EqualElement{ - key, set.eq_ref()}, - Traits::element(set.slots_ + seq.offset(i)))) - return num_probes; - ++num_probes; - } - if (g.MaskEmpty()) return num_probes; - seq.next(); - ++num_probes; - } - } - - static size_t AllocatedByteSize(const Set& c) { - size_t capacity = c.capacity_; - if (capacity == 0) return 0; - size_t m = AllocSize(capacity, sizeof(Slot), alignof(Slot)); - - size_t per_slot = Traits::space_used(static_cast(nullptr)); - if (per_slot != ~size_t{}) { - m += per_slot * c.size(); - } else { - for (size_t i = 0; i != capacity; ++i) { - if (container_internal::IsFull(c.ctrl_[i])) { - m += Traits::space_used(c.slots_ + i); - } - } - } - return m; - } - - static size_t LowerBoundAllocatedByteSize(size_t size) { - size_t capacity = GrowthToLowerboundCapacity(size); - if (capacity == 0) return 0; - size_t m = - AllocSize(NormalizeCapacity(capacity), sizeof(Slot), alignof(Slot)); - size_t per_slot = Traits::space_used(static_cast(nullptr)); - if (per_slot != ~size_t{}) { - m += per_slot * size; - } - return m; - } -}; - -} // namespace hashtable_debug_internal -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#undef ABSL_INTERNAL_ASSERT_IS_FULL - -#endif // ABSL_CONTAINER_INTERNAL_RAW_HASH_SET_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/address_is_readable.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/address_is_readable.h deleted file mode 100644 index 4bbaf4d..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/address_is_readable.h +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ -#define ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { - -// Return whether the byte at *addr is readable, without faulting. -// Save and restores errno. -bool AddressIsReadable(const void *addr); - -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_ADDRESS_IS_READABLE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/demangle.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/demangle.h deleted file mode 100644 index c314d9b..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/demangle.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// An async-signal-safe and thread-safe demangler for Itanium C++ ABI -// (aka G++ V3 ABI). -// -// The demangler is implemented to be used in async signal handlers to -// symbolize stack traces. We cannot use libstdc++'s -// abi::__cxa_demangle() in such signal handlers since it's not async -// signal safe (it uses malloc() internally). -// -// Note that this demangler doesn't support full demangling. More -// specifically, it doesn't print types of function parameters and -// types of template arguments. It just skips them. However, it's -// still very useful to extract basic information such as class, -// function, constructor, destructor, and operator names. -// -// See the implementation note in demangle.cc if you are interested. -// -// Example: -// -// | Mangled Name | The Demangler | abi::__cxa_demangle() -// |---------------|---------------|----------------------- -// | _Z1fv | f() | f() -// | _Z1fi | f() | f(int) -// | _Z3foo3bar | foo() | foo(bar) -// | _Z1fIiEvi | f<>() | void f(int) -// | _ZN1N1fE | N::f | N::f -// | _ZN3Foo3BarEv | Foo::Bar() | Foo::Bar() -// | _Zrm1XS_" | operator%() | operator%(X, X) -// | _ZN3FooC1Ev | Foo::Foo() | Foo::Foo() -// | _Z1fSs | f() | f(std::basic_string, -// | | | std::allocator >) -// -// See the unit test for more examples. -// -// Note: we might want to write demanglers for ABIs other than Itanium -// C++ ABI in the future. -// - -#ifndef ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ -#define ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { - -// Demangle `mangled`. On success, return true and write the -// demangled symbol name to `out`. Otherwise, return false. -// `out` is modified even if demangling is unsuccessful. -bool Demangle(const char *mangled, char *out, int out_size); - -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_DEMANGLE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/elf_mem_image.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/elf_mem_image.h deleted file mode 100644 index 113071a..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/elf_mem_image.h +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright 2017 The Abseil Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Allow dynamic symbol lookup for in-memory Elf images. - -#ifndef ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ -#define ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ - -// Including this will define the __GLIBC__ macro if glibc is being -// used. -#include - -#include "absl/base/config.h" - -// Maybe one day we can rewrite this file not to require the elf -// symbol extensions in glibc, but for right now we need them. -#ifdef ABSL_HAVE_ELF_MEM_IMAGE -#error ABSL_HAVE_ELF_MEM_IMAGE cannot be directly set -#endif - -#if defined(__ELF__) && !defined(__OpenBSD__) && !defined(__QNX__) && \ - !defined(__native_client__) && !defined(__asmjs__) && \ - !defined(__wasm__) && !defined(__HAIKU__) -#define ABSL_HAVE_ELF_MEM_IMAGE 1 -#endif - -#ifdef ABSL_HAVE_ELF_MEM_IMAGE - -#include // for ElfW - -#if defined(__FreeBSD__) && !defined(ElfW) -#define ElfW(x) __ElfN(x) -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { - -// An in-memory ELF image (may not exist on disk). -class ElfMemImage { - private: - // Sentinel: there could never be an elf image at &kInvalidBaseSentinel. - static const int kInvalidBaseSentinel; - - public: - // Sentinel: there could never be an elf image at this address. - static constexpr const void *const kInvalidBase = - static_cast(&kInvalidBaseSentinel); - - // Information about a single vdso symbol. - // All pointers are into .dynsym, .dynstr, or .text of the VDSO. - // Do not free() them or modify through them. - struct SymbolInfo { - const char *name; // E.g. "__vdso_getcpu" - const char *version; // E.g. "LINUX_2.6", could be "" - // for unversioned symbol. - const void *address; // Relocated symbol address. - const ElfW(Sym) *symbol; // Symbol in the dynamic symbol table. - }; - - // Supports iteration over all dynamic symbols. - class SymbolIterator { - public: - friend class ElfMemImage; - const SymbolInfo *operator->() const; - const SymbolInfo &operator*() const; - SymbolIterator& operator++(); - bool operator!=(const SymbolIterator &rhs) const; - bool operator==(const SymbolIterator &rhs) const; - private: - SymbolIterator(const void *const image, int index); - void Update(int incr); - SymbolInfo info_; - int index_; - const void *const image_; - }; - - - explicit ElfMemImage(const void *base); - void Init(const void *base); - bool IsPresent() const { return ehdr_ != nullptr; } - const ElfW(Phdr)* GetPhdr(int index) const; - const ElfW(Sym)* GetDynsym(int index) const; - const ElfW(Versym)* GetVersym(int index) const; - const ElfW(Verdef)* GetVerdef(int index) const; - const ElfW(Verdaux)* GetVerdefAux(const ElfW(Verdef) *verdef) const; - const char* GetDynstr(ElfW(Word) offset) const; - const void* GetSymAddr(const ElfW(Sym) *sym) const; - const char* GetVerstr(ElfW(Word) offset) const; - int GetNumSymbols() const; - - SymbolIterator begin() const; - SymbolIterator end() const; - - // Look up versioned dynamic symbol in the image. - // Returns false if image is not present, or doesn't contain given - // symbol/version/type combination. - // If info_out is non-null, additional details are filled in. - bool LookupSymbol(const char *name, const char *version, - int symbol_type, SymbolInfo *info_out) const; - - // Find info about symbol (if any) which overlaps given address. - // Returns true if symbol was found; false if image isn't present - // or doesn't have a symbol overlapping given address. - // If info_out is non-null, additional details are filled in. - bool LookupSymbolByAddress(const void *address, SymbolInfo *info_out) const; - - private: - const ElfW(Ehdr) *ehdr_; - const ElfW(Sym) *dynsym_; - const ElfW(Versym) *versym_; - const ElfW(Verdef) *verdef_; - const ElfW(Word) *hash_; - const char *dynstr_; - size_t strsize_; - size_t verdefnum_; - ElfW(Addr) link_base_; // Link-time base (p_vaddr of first PT_LOAD). -}; - -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_HAVE_ELF_MEM_IMAGE - -#endif // ABSL_DEBUGGING_INTERNAL_ELF_MEM_IMAGE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_aarch64-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_aarch64-inl.inc deleted file mode 100644 index 4f9db9d..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_aarch64-inl.inc +++ /dev/null @@ -1,204 +0,0 @@ -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ - -// Generate stack tracer for aarch64 - -#if defined(__linux__) -#include -#include -#include -#endif - -#include -#include -#include -#include - -#include "absl/base/attributes.h" -#include "absl/debugging/internal/address_is_readable.h" -#include "absl/debugging/internal/vdso_support.h" // a no-op on non-elf or non-glibc systems -#include "absl/debugging/stacktrace.h" - -static const uintptr_t kUnknownFrameSize = 0; - -#if defined(__linux__) -// Returns the address of the VDSO __kernel_rt_sigreturn function, if present. -static const unsigned char* GetKernelRtSigreturnAddress() { - constexpr uintptr_t kImpossibleAddress = 1; - ABSL_CONST_INIT static std::atomic memoized{kImpossibleAddress}; - uintptr_t address = memoized.load(std::memory_order_relaxed); - if (address != kImpossibleAddress) { - return reinterpret_cast(address); - } - - address = reinterpret_cast(nullptr); - -#ifdef ABSL_HAVE_VDSO_SUPPORT - absl::debugging_internal::VDSOSupport vdso; - if (vdso.IsPresent()) { - absl::debugging_internal::VDSOSupport::SymbolInfo symbol_info; - auto lookup = [&](int type) { - return vdso.LookupSymbol("__kernel_rt_sigreturn", "LINUX_2.6.39", type, - &symbol_info); - }; - if ((!lookup(STT_FUNC) && !lookup(STT_NOTYPE)) || - symbol_info.address == nullptr) { - // Unexpected: VDSO is present, yet the expected symbol is missing - // or null. - assert(false && "VDSO is present, but doesn't have expected symbol"); - } else { - if (reinterpret_cast(symbol_info.address) != - kImpossibleAddress) { - address = reinterpret_cast(symbol_info.address); - } else { - assert(false && "VDSO returned invalid address"); - } - } - } -#endif - - memoized.store(address, std::memory_order_relaxed); - return reinterpret_cast(address); -} -#endif // __linux__ - -// Compute the size of a stack frame in [low..high). We assume that -// low < high. Return size of kUnknownFrameSize. -template -static inline uintptr_t ComputeStackFrameSize(const T* low, - const T* high) { - const char* low_char_ptr = reinterpret_cast(low); - const char* high_char_ptr = reinterpret_cast(high); - return low < high ? high_char_ptr - low_char_ptr : kUnknownFrameSize; -} - -// Given a pointer to a stack frame, locate and return the calling -// stackframe, or return null if no stackframe can be found. Perform sanity -// checks (the strictness of which is controlled by the boolean parameter -// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. -template -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -static void **NextStackFrame(void **old_frame_pointer, const void *uc) { - void **new_frame_pointer = reinterpret_cast(*old_frame_pointer); - bool check_frame_size = true; - -#if defined(__linux__) - if (WITH_CONTEXT && uc != nullptr) { - // Check to see if next frame's return address is __kernel_rt_sigreturn. - if (old_frame_pointer[1] == GetKernelRtSigreturnAddress()) { - const ucontext_t *ucv = static_cast(uc); - // old_frame_pointer[0] is not suitable for unwinding, look at - // ucontext to discover frame pointer before signal. - void **const pre_signal_frame_pointer = - reinterpret_cast(ucv->uc_mcontext.regs[29]); - - // Check that alleged frame pointer is actually readable. This is to - // prevent "double fault" in case we hit the first fault due to e.g. - // stack corruption. - if (!absl::debugging_internal::AddressIsReadable( - pre_signal_frame_pointer)) - return nullptr; - - // Alleged frame pointer is readable, use it for further unwinding. - new_frame_pointer = pre_signal_frame_pointer; - - // Skip frame size check if we return from a signal. We may be using a - // an alternate stack for signals. - check_frame_size = false; - } - } -#endif - - // aarch64 ABI requires stack pointer to be 16-byte-aligned. - if ((reinterpret_cast(new_frame_pointer) & 15) != 0) - return nullptr; - - // Check frame size. In strict mode, we assume frames to be under - // 100,000 bytes. In non-strict mode, we relax the limit to 1MB. - if (check_frame_size) { - const uintptr_t max_size = STRICT_UNWINDING ? 100000 : 1000000; - const uintptr_t frame_size = - ComputeStackFrameSize(old_frame_pointer, new_frame_pointer); - if (frame_size == kUnknownFrameSize || frame_size > max_size) - return nullptr; - } - - return new_frame_pointer; -} - -template -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, - const void *ucp, int *min_dropped_frames) { -#ifdef __GNUC__ - void **frame_pointer = reinterpret_cast(__builtin_frame_address(0)); -#else -# error reading stack point not yet supported on this platform. -#endif - - skip_count++; // Skip the frame for this function. - int n = 0; - - // The frame pointer points to low address of a frame. The first 64-bit - // word of a frame points to the next frame up the call chain, which normally - // is just after the high address of the current frame. The second word of - // a frame contains return adress of to the caller. To find a pc value - // associated with the current frame, we need to go down a level in the call - // chain. So we remember return the address of the last frame seen. This - // does not work for the first stack frame, which belongs to UnwindImp() but - // we skip the frame for UnwindImp() anyway. - void* prev_return_address = nullptr; - - while (frame_pointer && n < max_depth) { - // The absl::GetStackFrames routine is called when we are in some - // informational context (the failure signal handler for example). - // Use the non-strict unwinding rules to produce a stack trace - // that is as complete as possible (even if it contains a few bogus - // entries in some rare cases). - void **next_frame_pointer = - NextStackFrame(frame_pointer, ucp); - - if (skip_count > 0) { - skip_count--; - } else { - result[n] = prev_return_address; - if (IS_STACK_FRAMES) { - sizes[n] = ComputeStackFrameSize(frame_pointer, next_frame_pointer); - } - n++; - } - prev_return_address = frame_pointer[1]; - frame_pointer = next_frame_pointer; - } - if (min_dropped_frames != nullptr) { - // Implementation detail: we clamp the max of frames we are willing to - // count, so as not to spend too much time in the loop below. - const int kMaxUnwind = 200; - int num_dropped_frames = 0; - for (int j = 0; frame_pointer != nullptr && j < kMaxUnwind; j++) { - if (skip_count > 0) { - skip_count--; - } else { - num_dropped_frames++; - } - frame_pointer = - NextStackFrame(frame_pointer, ucp); - } - *min_dropped_frames = num_dropped_frames; - } - return n; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { - return true; -} -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_AARCH64_INL_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_arm-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_arm-inl.inc deleted file mode 100644 index 102a2a1..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_arm-inl.inc +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This is inspired by Craig Silverstein's PowerPC stacktrace code. - -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ - -#include - -#include "absl/debugging/stacktrace.h" - -// WARNING: -// This only works if all your code is in either ARM or THUMB mode. With -// interworking, the frame pointer of the caller can either be in r11 (ARM -// mode) or r7 (THUMB mode). A callee only saves the frame pointer of its -// mode in a fixed location on its stack frame. If the caller is a different -// mode, there is no easy way to find the frame pointer. It can either be -// still in the designated register or saved on stack along with other callee -// saved registers. - -// Given a pointer to a stack frame, locate and return the calling -// stackframe, or return nullptr if no stackframe can be found. Perform sanity -// checks (the strictness of which is controlled by the boolean parameter -// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. -template -static void **NextStackFrame(void **old_sp) { - void **new_sp = (void**) old_sp[-1]; - - // Check that the transition from frame pointer old_sp to frame - // pointer new_sp isn't clearly bogus - if (STRICT_UNWINDING) { - // With the stack growing downwards, older stack frame must be - // at a greater address that the current one. - if (new_sp <= old_sp) return nullptr; - // Assume stack frames larger than 100,000 bytes are bogus. - if ((uintptr_t)new_sp - (uintptr_t)old_sp > 100000) return nullptr; - } else { - // In the non-strict mode, allow discontiguous stack frames. - // (alternate-signal-stacks for example). - if (new_sp == old_sp) return nullptr; - // And allow frames upto about 1MB. - if ((new_sp > old_sp) - && ((uintptr_t)new_sp - (uintptr_t)old_sp > 1000000)) return nullptr; - } - if ((uintptr_t)new_sp & (sizeof(void *) - 1)) return nullptr; - return new_sp; -} - -// This ensures that absl::GetStackTrace sets up the Link Register properly. -#ifdef __GNUC__ -void StacktraceArmDummyFunction() __attribute__((noinline)); -void StacktraceArmDummyFunction() { __asm__ volatile(""); } -#else -# error StacktraceArmDummyFunction() needs to be ported to this platform. -#endif - -template -static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, - const void * /* ucp */, int *min_dropped_frames) { -#ifdef __GNUC__ - void **sp = reinterpret_cast(__builtin_frame_address(0)); -#else -# error reading stack point not yet supported on this platform. -#endif - - // On ARM, the return address is stored in the link register (r14). - // This is not saved on the stack frame of a leaf function. To - // simplify code that reads return addresses, we call a dummy - // function so that the return address of this function is also - // stored in the stack frame. This works at least for gcc. - StacktraceArmDummyFunction(); - - int n = 0; - while (sp && n < max_depth) { - // The absl::GetStackFrames routine is called when we are in some - // informational context (the failure signal handler for example). - // Use the non-strict unwinding rules to produce a stack trace - // that is as complete as possible (even if it contains a few bogus - // entries in some rare cases). - void **next_sp = NextStackFrame(sp); - - if (skip_count > 0) { - skip_count--; - } else { - result[n] = *sp; - - if (IS_STACK_FRAMES) { - if (next_sp > sp) { - sizes[n] = (uintptr_t)next_sp - (uintptr_t)sp; - } else { - // A frame-size of 0 is used to indicate unknown frame size. - sizes[n] = 0; - } - } - n++; - } - sp = next_sp; - } - if (min_dropped_frames != nullptr) { - // Implementation detail: we clamp the max of frames we are willing to - // count, so as not to spend too much time in the loop below. - const int kMaxUnwind = 200; - int num_dropped_frames = 0; - for (int j = 0; sp != nullptr && j < kMaxUnwind; j++) { - if (skip_count > 0) { - skip_count--; - } else { - num_dropped_frames++; - } - sp = NextStackFrame(sp); - } - *min_dropped_frames = num_dropped_frames; - } - return n; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { - return false; -} -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_ARM_INL_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_config.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_config.h deleted file mode 100644 index 3929b1b..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_config.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2017 The Abseil Authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - - * Defines ABSL_STACKTRACE_INL_HEADER to the *-inl.h containing - * actual unwinder implementation. - * This header is "private" to stacktrace.cc. - * DO NOT include it into any other files. -*/ -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ - -#include "absl/base/config.h" - -#if defined(ABSL_STACKTRACE_INL_HEADER) -#error ABSL_STACKTRACE_INL_HEADER cannot be directly set - -#elif defined(_WIN32) -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_win32-inl.inc" - -#elif defined(__APPLE__) -#ifdef ABSL_HAVE_THREAD_LOCAL -// Thread local support required for UnwindImpl. -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_generic-inl.inc" -#endif // defined(ABSL_HAVE_THREAD_LOCAL) - -// Emscripten stacktraces rely on JS. Do not use them in standalone mode. -#elif defined(__EMSCRIPTEN__) && !defined(STANDALONE_WASM) -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_emscripten-inl.inc" - -#elif defined(__linux__) && !defined(__ANDROID__) - -#if defined(NO_FRAME_POINTER) && \ - (defined(__i386__) || defined(__x86_64__) || defined(__aarch64__)) -// Note: The libunwind-based implementation is not available to open-source -// users. -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_libunwind-inl.inc" -#define STACKTRACE_USES_LIBUNWIND 1 -#elif defined(NO_FRAME_POINTER) && defined(__has_include) -#if __has_include() -// Note: When using glibc this may require -funwind-tables to function properly. -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_generic-inl.inc" -#endif // __has_include() -#elif defined(__i386__) || defined(__x86_64__) -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_x86-inl.inc" -#elif defined(__ppc__) || defined(__PPC__) -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_powerpc-inl.inc" -#elif defined(__aarch64__) -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_aarch64-inl.inc" -#elif defined(__riscv) -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_riscv-inl.inc" -#elif defined(__has_include) -#if __has_include() -// Note: When using glibc this may require -funwind-tables to function properly. -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_generic-inl.inc" -#endif // __has_include() -#endif // defined(__has_include) - -#endif // defined(__linux__) && !defined(__ANDROID__) - -// Fallback to the empty implementation. -#if !defined(ABSL_STACKTRACE_INL_HEADER) -#define ABSL_STACKTRACE_INL_HEADER \ - "absl/debugging/internal/stacktrace_unimplemented-inl.inc" -#endif - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_CONFIG_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_emscripten-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_emscripten-inl.inc deleted file mode 100644 index 0f44451..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_emscripten-inl.inc +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Portable implementation - just use glibc -// -// Note: The glibc implementation may cause a call to malloc. -// This can cause a deadlock in HeapProfiler. - -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ - -#include - -#include -#include - -#include "absl/base/attributes.h" -#include "absl/debugging/stacktrace.h" - -extern "C" { -uintptr_t emscripten_stack_snapshot(); -uint32_t emscripten_stack_unwind_buffer(uintptr_t pc, void *buffer, - uint32_t depth); -} - -// Sometimes, we can try to get a stack trace from within a stack -// trace, which can cause a self-deadlock. -// Protect against such reentrant call by failing to get a stack trace. -// -// We use __thread here because the code here is extremely low level -- it is -// called while collecting stack traces from within malloc and mmap, and thus -// can not call anything which might call malloc or mmap itself. -static __thread int recursive = 0; - -// The stack trace function might be invoked very early in the program's -// execution (e.g. from the very first malloc). -// As such, we suppress usage of backtrace during this early stage of execution. -static std::atomic disable_stacktraces(true); // Disabled until healthy. -// Waiting until static initializers run seems to be late enough. -// This file is included into stacktrace.cc so this will only run once. -ABSL_ATTRIBUTE_UNUSED static int stacktraces_enabler = []() { - // Check if we can even create stacktraces. If not, bail early and leave - // disable_stacktraces set as-is. - // clang-format off - if (!EM_ASM_INT({ return (typeof wasmOffsetConverter !== 'undefined'); })) { - return 0; - } - // clang-format on - disable_stacktraces.store(false, std::memory_order_relaxed); - return 0; -}(); - -template -static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count, - const void *ucp, int *min_dropped_frames) { - if (recursive || disable_stacktraces.load(std::memory_order_relaxed)) { - return 0; - } - ++recursive; - - static_cast(ucp); // Unused. - constexpr int kStackLength = 64; - void *stack[kStackLength]; - - int size; - uintptr_t pc = emscripten_stack_snapshot(); - size = emscripten_stack_unwind_buffer(pc, stack, kStackLength); - - int result_count = size - skip_count; - if (result_count < 0) result_count = 0; - if (result_count > max_depth) result_count = max_depth; - for (int i = 0; i < result_count; i++) result[i] = stack[i + skip_count]; - - if (IS_STACK_FRAMES) { - // No implementation for finding out the stack frame sizes yet. - memset(sizes, 0, sizeof(*sizes) * result_count); - } - if (min_dropped_frames != nullptr) { - if (size - skip_count - max_depth > 0) { - *min_dropped_frames = size - skip_count - max_depth; - } else { - *min_dropped_frames = 0; - } - } - - --recursive; - - return result_count; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { return true; } -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_EMSCRIPTEN_INL_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_generic-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_generic-inl.inc deleted file mode 100644 index b2792a1..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_generic-inl.inc +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Portable implementation - just use glibc -// -// Note: The glibc implementation may cause a call to malloc. -// This can cause a deadlock in HeapProfiler. - -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ - -#include -#include -#include - -#include "absl/debugging/stacktrace.h" -#include "absl/base/attributes.h" - -// Sometimes, we can try to get a stack trace from within a stack -// trace, because we don't block signals inside this code (which would be too -// expensive: the two extra system calls per stack trace do matter here). -// That can cause a self-deadlock. -// Protect against such reentrant call by failing to get a stack trace. -// -// We use __thread here because the code here is extremely low level -- it is -// called while collecting stack traces from within malloc and mmap, and thus -// can not call anything which might call malloc or mmap itself. -static __thread int recursive = 0; - -// The stack trace function might be invoked very early in the program's -// execution (e.g. from the very first malloc if using tcmalloc). Also, the -// glibc implementation itself will trigger malloc the first time it is called. -// As such, we suppress usage of backtrace during this early stage of execution. -static std::atomic disable_stacktraces(true); // Disabled until healthy. -// Waiting until static initializers run seems to be late enough. -// This file is included into stacktrace.cc so this will only run once. -ABSL_ATTRIBUTE_UNUSED static int stacktraces_enabler = []() { - void* unused_stack[1]; - // Force the first backtrace to happen early to get the one-time shared lib - // loading (allocation) out of the way. After the first call it is much safer - // to use backtrace from a signal handler if we crash somewhere later. - backtrace(unused_stack, 1); - disable_stacktraces.store(false, std::memory_order_relaxed); - return 0; -}(); - -template -static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, - const void *ucp, int *min_dropped_frames) { - if (recursive || disable_stacktraces.load(std::memory_order_relaxed)) { - return 0; - } - ++recursive; - - static_cast(ucp); // Unused. - static const int kStackLength = 64; - void * stack[kStackLength]; - int size; - - size = backtrace(stack, kStackLength); - skip_count++; // we want to skip the current frame as well - int result_count = size - skip_count; - if (result_count < 0) - result_count = 0; - if (result_count > max_depth) - result_count = max_depth; - for (int i = 0; i < result_count; i++) - result[i] = stack[i + skip_count]; - - if (IS_STACK_FRAMES) { - // No implementation for finding out the stack frame sizes yet. - memset(sizes, 0, sizeof(*sizes) * result_count); - } - if (min_dropped_frames != nullptr) { - if (size - skip_count - max_depth > 0) { - *min_dropped_frames = size - skip_count - max_depth; - } else { - *min_dropped_frames = 0; - } - } - - --recursive; - - return result_count; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { - return true; -} -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_GENERIC_INL_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_powerpc-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_powerpc-inl.inc deleted file mode 100644 index 085cef6..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_powerpc-inl.inc +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Produce stack trace. I'm guessing (hoping!) the code is much like -// for x86. For apple machines, at least, it seems to be; see -// https://developer.apple.com/documentation/mac/runtimehtml/RTArch-59.html -// https://www.linux-foundation.org/spec/ELF/ppc64/PPC-elf64abi-1.9.html#STACK -// Linux has similar code: http://patchwork.ozlabs.org/linuxppc/patch?id=8882 - -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ - -#if defined(__linux__) -#include // for PT_NIP. -#include // for ucontext_t -#endif - -#include -#include -#include -#include - -#include "absl/base/attributes.h" -#include "absl/base/optimization.h" -#include "absl/base/port.h" -#include "absl/debugging/stacktrace.h" -#include "absl/debugging/internal/address_is_readable.h" -#include "absl/debugging/internal/vdso_support.h" // a no-op on non-elf or non-glibc systems - -// Given a stack pointer, return the saved link register value. -// Note that this is the link register for a callee. -static inline void *StacktracePowerPCGetLR(void **sp) { - // PowerPC has 3 main ABIs, which say where in the stack the - // Link Register is. For DARWIN and AIX (used by apple and - // linux ppc64), it's in sp[2]. For SYSV (used by linux ppc), - // it's in sp[1]. -#if defined(_CALL_AIX) || defined(_CALL_DARWIN) - return *(sp+2); -#elif defined(_CALL_SYSV) - return *(sp+1); -#elif defined(__APPLE__) || defined(__FreeBSD__) || \ - (defined(__linux__) && defined(__PPC64__)) - // This check is in case the compiler doesn't define _CALL_AIX/etc. - return *(sp+2); -#elif defined(__linux) - // This check is in case the compiler doesn't define _CALL_SYSV. - return *(sp+1); -#else -#error Need to specify the PPC ABI for your archiecture. -#endif -} - -// Given a pointer to a stack frame, locate and return the calling -// stackframe, or return null if no stackframe can be found. Perform sanity -// checks (the strictness of which is controlled by the boolean parameter -// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. -template -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -static void **NextStackFrame(void **old_sp, const void *uc) { - void **new_sp = (void **) *old_sp; - enum { kStackAlignment = 16 }; - - // Check that the transition from frame pointer old_sp to frame - // pointer new_sp isn't clearly bogus - if (STRICT_UNWINDING) { - // With the stack growing downwards, older stack frame must be - // at a greater address that the current one. - if (new_sp <= old_sp) return nullptr; - // Assume stack frames larger than 100,000 bytes are bogus. - if ((uintptr_t)new_sp - (uintptr_t)old_sp > 100000) return nullptr; - } else { - // In the non-strict mode, allow discontiguous stack frames. - // (alternate-signal-stacks for example). - if (new_sp == old_sp) return nullptr; - // And allow frames upto about 1MB. - if ((new_sp > old_sp) - && ((uintptr_t)new_sp - (uintptr_t)old_sp > 1000000)) return nullptr; - } - if ((uintptr_t)new_sp % kStackAlignment != 0) return nullptr; - -#if defined(__linux__) - enum StackTraceKernelSymbolStatus { - kNotInitialized = 0, kAddressValid, kAddressInvalid }; - - if (IS_WITH_CONTEXT && uc != nullptr) { - static StackTraceKernelSymbolStatus kernel_symbol_status = - kNotInitialized; // Sentinel: not computed yet. - // Initialize with sentinel value: __kernel_rt_sigtramp_rt64 can not - // possibly be there. - static const unsigned char *kernel_sigtramp_rt64_address = nullptr; - if (kernel_symbol_status == kNotInitialized) { - absl::debugging_internal::VDSOSupport vdso; - if (vdso.IsPresent()) { - absl::debugging_internal::VDSOSupport::SymbolInfo - sigtramp_rt64_symbol_info; - if (!vdso.LookupSymbol( - "__kernel_sigtramp_rt64", "LINUX_2.6.15", - absl::debugging_internal::VDSOSupport::kVDSOSymbolType, - &sigtramp_rt64_symbol_info) || - sigtramp_rt64_symbol_info.address == nullptr) { - // Unexpected: VDSO is present, yet the expected symbol is missing - // or null. - assert(false && "VDSO is present, but doesn't have expected symbol"); - kernel_symbol_status = kAddressInvalid; - } else { - kernel_sigtramp_rt64_address = - reinterpret_cast( - sigtramp_rt64_symbol_info.address); - kernel_symbol_status = kAddressValid; - } - } else { - kernel_symbol_status = kAddressInvalid; - } - } - - if (new_sp != nullptr && - kernel_symbol_status == kAddressValid && - StacktracePowerPCGetLR(new_sp) == kernel_sigtramp_rt64_address) { - const ucontext_t* signal_context = - reinterpret_cast(uc); - void **const sp_before_signal = -#if defined(__PPC64__) - reinterpret_cast(signal_context->uc_mcontext.gp_regs[PT_R1]); -#else - reinterpret_cast( - signal_context->uc_mcontext.uc_regs->gregs[PT_R1]); -#endif - // Check that alleged sp before signal is nonnull and is reasonably - // aligned. - if (sp_before_signal != nullptr && - ((uintptr_t)sp_before_signal % kStackAlignment) == 0) { - // Check that alleged stack pointer is actually readable. This is to - // prevent a "double fault" in case we hit the first fault due to e.g. - // a stack corruption. - if (absl::debugging_internal::AddressIsReadable(sp_before_signal)) { - // Alleged stack pointer is readable, use it for further unwinding. - new_sp = sp_before_signal; - } - } - } - } -#endif - - return new_sp; -} - -// This ensures that absl::GetStackTrace sets up the Link Register properly. -ABSL_ATTRIBUTE_NOINLINE static void AbslStacktracePowerPCDummyFunction() { - ABSL_BLOCK_TAIL_CALL_OPTIMIZATION(); -} - -template -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, - const void *ucp, int *min_dropped_frames) { - void **sp; - // Apple macOS uses an old version of gnu as -- both Darwin 7.9.0 (Panther) - // and Darwin 8.8.1 (Tiger) use as 1.38. This means we have to use a - // different asm syntax. I don't know quite the best way to discriminate - // systems using the old as from the new one; I've gone with __APPLE__. -#ifdef __APPLE__ - __asm__ volatile ("mr %0,r1" : "=r" (sp)); -#else - __asm__ volatile ("mr %0,1" : "=r" (sp)); -#endif - - // On PowerPC, the "Link Register" or "Link Record" (LR), is a stack - // entry that holds the return address of the subroutine call (what - // instruction we run after our function finishes). This is the - // same as the stack-pointer of our parent routine, which is what we - // want here. While the compiler will always(?) set up LR for - // subroutine calls, it may not for leaf functions (such as this one). - // This routine forces the compiler (at least gcc) to push it anyway. - AbslStacktracePowerPCDummyFunction(); - - // The LR save area is used by the callee, so the top entry is bogus. - skip_count++; - - int n = 0; - - // Unlike ABIs of X86 and ARM, PowerPC ABIs say that return address (in - // the link register) of a function call is stored in the caller's stack - // frame instead of the callee's. When we look for the return address - // associated with a stack frame, we need to make sure that there is a - // caller frame before it. So we call NextStackFrame before entering the - // loop below and check next_sp instead of sp for loop termination. - // The outermost frame is set up by runtimes and it does not have a - // caller frame, so it is skipped. - - // The absl::GetStackFrames routine is called when we are in some - // informational context (the failure signal handler for example). - // Use the non-strict unwinding rules to produce a stack trace - // that is as complete as possible (even if it contains a few - // bogus entries in some rare cases). - void **next_sp = NextStackFrame(sp, ucp); - - while (next_sp && n < max_depth) { - if (skip_count > 0) { - skip_count--; - } else { - result[n] = StacktracePowerPCGetLR(sp); - if (IS_STACK_FRAMES) { - if (next_sp > sp) { - sizes[n] = (uintptr_t)next_sp - (uintptr_t)sp; - } else { - // A frame-size of 0 is used to indicate unknown frame size. - sizes[n] = 0; - } - } - n++; - } - - sp = next_sp; - next_sp = NextStackFrame(sp, ucp); - } - - if (min_dropped_frames != nullptr) { - // Implementation detail: we clamp the max of frames we are willing to - // count, so as not to spend too much time in the loop below. - const int kMaxUnwind = 1000; - int num_dropped_frames = 0; - for (int j = 0; next_sp != nullptr && j < kMaxUnwind; j++) { - if (skip_count > 0) { - skip_count--; - } else { - num_dropped_frames++; - } - next_sp = NextStackFrame(next_sp, ucp); - } - *min_dropped_frames = num_dropped_frames; - } - return n; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { - return true; -} -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_POWERPC_INL_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_riscv-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_riscv-inl.inc deleted file mode 100644 index 7123b71..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_riscv-inl.inc +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2021 The Abseil Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_RISCV_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_RISCV_INL_H_ - -// Generate stack trace for riscv - -#include - -#include "absl/base/config.h" -#if defined(__linux__) -#include -#include -#include -#endif - -#include -#include -#include -#include - -#include "absl/base/attributes.h" -#include "absl/debugging/internal/address_is_readable.h" -#include "absl/debugging/internal/vdso_support.h" -#include "absl/debugging/stacktrace.h" - -static const uintptr_t kUnknownFrameSize = 0; - -#if defined(__linux__) -// Returns the address of the VDSO __kernel_rt_sigreturn function, if present. -static const unsigned char *GetKernelRtSigreturnAddress() { - constexpr uintptr_t kImpossibleAddress = 0; - ABSL_CONST_INIT static std::atomic memoized(kImpossibleAddress); - uintptr_t address = memoized.load(std::memory_order_relaxed); - if (address != kImpossibleAddress) { - return reinterpret_cast(address); - } - - address = reinterpret_cast(nullptr); - -#if ABSL_HAVE_VDSO_SUPPORT - absl::debugging_internal::VDSOSupport vdso; - if (vdso.IsPresent()) { - absl::debugging_internal::VDSOSupport::SymbolInfo symbol_info; - // Symbol versioning pulled from arch/riscv/kernel/vdso/vdso.lds at v5.10. - auto lookup = [&](int type) { - return vdso.LookupSymbol("__vdso_rt_sigreturn", "LINUX_4.15", type, - &symbol_info); - }; - if ((!lookup(STT_FUNC) && !lookup(STT_NOTYPE)) || - symbol_info.address == nullptr) { - // Unexpected: VDSO is present, yet the expected symbol is missing or - // null. - assert(false && "VDSO is present, but doesn't have expected symbol"); - } else { - if (reinterpret_cast(symbol_info.address) != - kImpossibleAddress) { - address = reinterpret_cast(symbol_info.address); - } else { - assert(false && "VDSO returned invalid address"); - } - } - } -#endif - - memoized.store(address, std::memory_order_relaxed); - return reinterpret_cast(address); -} -#endif // __linux__ - -// Compute the size of a stack frame in [low..high). We assume that low < high. -// Return size of kUnknownFrameSize. -template -static inline uintptr_t ComputeStackFrameSize(const T *low, const T *high) { - const char *low_char_ptr = reinterpret_cast(low); - const char *high_char_ptr = reinterpret_cast(high); - return low < high ? high_char_ptr - low_char_ptr : kUnknownFrameSize; -} - -// Given a pointer to a stack frame, locate and return the calling stackframe, -// or return null if no stackframe can be found. Perform sanity checks (the -// strictness of which is controlled by the boolean parameter -// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. -template -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -static void ** NextStackFrame(void **old_frame_pointer, const void *uc) { - // . - // . - // . - // +-> +----------------+ - // | | return address | - // | | previous fp | - // | | ... | - // | +----------------+ <-+ - // | | return address | | - // +---|- previous fp | | - // | ... | | - // $fp ->|----------------+ | - // | return address | | - // | previous fp -|---+ - // $sp ->| ... | - // +----------------+ - void **new_frame_pointer = reinterpret_cast(old_frame_pointer[-2]); - bool check_frame_size = true; - -#if defined(__linux__) - if (WITH_CONTEXT && uc != nullptr) { - // Check to see if next frame's return address is __kernel_rt_sigreturn. - if (old_frame_pointer[-1] == GetKernelRtSigreturnAddress()) { - const ucontext_t *ucv = static_cast(uc); - // old_frame_pointer is not suitable for unwinding, look at ucontext to - // discover frame pointer before signal. - // - // RISCV ELF psABI has the frame pointer at x8/fp/s0. - // -- RISCV psABI Table 18.2 - void **const pre_signal_frame_pointer = - reinterpret_cast(ucv->uc_mcontext.__gregs[8]); - - // Check the alleged frame pointer is actually readable. This is to - // prevent "double fault" in case we hit the first fault due to stack - // corruption. - if (!absl::debugging_internal::AddressIsReadable( - pre_signal_frame_pointer)) - return nullptr; - - // Alleged frame pointer is readable, use it for further unwinding. - new_frame_pointer = pre_signal_frame_pointer; - - // Skip frame size check if we return from a signal. We may be using an - // alterate stack for signals. - check_frame_size = false; - } - } -#endif - - // The RISCV ELF psABI mandates that the stack pointer is always 16-byte - // aligned. - // FIXME(abdulras) this doesn't hold for ILP32E which only mandates a 4-byte - // alignment. - if ((reinterpret_cast(new_frame_pointer) & 15) != 0) - return nullptr; - - // Check frame size. In strict mode, we assume frames to be under 100,000 - // bytes. In non-strict mode, we relax the limit to 1MB. - if (check_frame_size) { - const uintptr_t max_size = STRICT_UNWINDING ? 100000 : 1000000; - const uintptr_t frame_size = - ComputeStackFrameSize(old_frame_pointer, new_frame_pointer); - if (frame_size == kUnknownFrameSize || frame_size > max_size) - return nullptr; - } - - return new_frame_pointer; -} - -template -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count, - const void *ucp, int *min_dropped_frames) { - // The `frame_pointer` that is computed here points to the top of the frame. - // The two words preceding the address are the return address and the previous - // frame pointer. -#if defined(__GNUC__) - void **frame_pointer = reinterpret_cast(__builtin_frame_address(0)); -#else -#error reading stack pointer not yet supported on this platform -#endif - - int n = 0; - void *return_address = nullptr; - while (frame_pointer && n < max_depth) { - return_address = frame_pointer[-1]; - - // The absl::GetStackFrames routine is called when we are in some - // informational context (the failure signal handler for example). Use the - // non-strict unwinding rules to produce a stack trace that is as complete - // as possible (even if it contains a few bogus entries in some rare cases). - void **next_frame_pointer = - NextStackFrame(frame_pointer, ucp); - - if (skip_count > 0) { - skip_count--; - } else { - result[n] = return_address; - if (IS_STACK_FRAMES) { - sizes[n] = ComputeStackFrameSize(frame_pointer, next_frame_pointer); - } - n++; - } - - frame_pointer = next_frame_pointer; - } - - if (min_dropped_frames != nullptr) { - // Implementation detail: we clamp the max of frames we are willing to - // count, so as not to spend too much time in the loop below. - const int kMaxUnwind = 200; - int num_dropped_frames = 0; - for (int j = 0; frame_pointer != nullptr && j < kMaxUnwind; j++) { - if (skip_count > 0) { - skip_count--; - } else { - num_dropped_frames++; - } - frame_pointer = - NextStackFrame(frame_pointer, ucp); - } - *min_dropped_frames = num_dropped_frames; - } - - return n; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { return true; } -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_unimplemented-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_unimplemented-inl.inc deleted file mode 100644 index 5b8fb19..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_unimplemented-inl.inc +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ - -template -static int UnwindImpl(void** /* result */, int* /* sizes */, - int /* max_depth */, int /* skip_count */, - const void* /* ucp */, int *min_dropped_frames) { - if (min_dropped_frames != nullptr) { - *min_dropped_frames = 0; - } - return 0; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { - return false; -} -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_UNIMPLEMENTED_INL_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_win32-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_win32-inl.inc deleted file mode 100644 index 1c666c8..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_win32-inl.inc +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Produces a stack trace for Windows. Normally, one could use -// stacktrace_x86-inl.h or stacktrace_x86_64-inl.h -- and indeed, that -// should work for binaries compiled using MSVC in "debug" mode. -// However, in "release" mode, Windows uses frame-pointer -// optimization, which makes getting a stack trace very difficult. -// -// There are several approaches one can take. One is to use Windows -// intrinsics like StackWalk64. These can work, but have restrictions -// on how successful they can be. Another attempt is to write a -// version of stacktrace_x86-inl.h that has heuristic support for -// dealing with FPO, similar to what WinDbg does (see -// http://www.nynaeve.net/?p=97). There are (non-working) examples of -// these approaches, complete with TODOs, in stacktrace_win32-inl.h#1 -// -// The solution we've ended up doing is to call the undocumented -// windows function RtlCaptureStackBackTrace, which probably doesn't -// work with FPO but at least is fast, and doesn't require a symbol -// server. -// -// This code is inspired by a patch from David Vitek: -// https://code.google.com/p/google-perftools/issues/detail?id=83 - -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ - -#include // for GetProcAddress and GetModuleHandle -#include - -typedef USHORT NTAPI RtlCaptureStackBackTrace_Function( - IN ULONG frames_to_skip, - IN ULONG frames_to_capture, - OUT PVOID *backtrace, - OUT PULONG backtrace_hash); - -// It is not possible to load RtlCaptureStackBackTrace at static init time in -// UWP. CaptureStackBackTrace is the public version of RtlCaptureStackBackTrace -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \ - !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) -static RtlCaptureStackBackTrace_Function* const RtlCaptureStackBackTrace_fn = - &::CaptureStackBackTrace; -#else -// Load the function we need at static init time, where we don't have -// to worry about someone else holding the loader's lock. -static RtlCaptureStackBackTrace_Function* const RtlCaptureStackBackTrace_fn = - (RtlCaptureStackBackTrace_Function*)GetProcAddress( - GetModuleHandleA("ntdll.dll"), "RtlCaptureStackBackTrace"); -#endif // WINAPI_PARTITION_APP && !WINAPI_PARTITION_DESKTOP - -template -static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count, - const void*, int* min_dropped_frames) { - int n = 0; - if (!RtlCaptureStackBackTrace_fn) { - // can't find a stacktrace with no function to call - } else { - n = (int)RtlCaptureStackBackTrace_fn(skip_count + 2, max_depth, result, 0); - } - if (IS_STACK_FRAMES) { - // No implementation for finding out the stack frame sizes yet. - memset(sizes, 0, sizeof(*sizes) * n); - } - if (min_dropped_frames != nullptr) { - // Not implemented. - *min_dropped_frames = 0; - } - return n; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { - return false; -} -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_WIN32_INL_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_x86-inl.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_x86-inl.inc deleted file mode 100644 index 1b5d823..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/stacktrace_x86-inl.inc +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Produce stack trace - -#ifndef ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ -#define ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ - -#if defined(__linux__) && (defined(__i386__) || defined(__x86_64__)) -#include // for ucontext_t -#endif - -#if !defined(_WIN32) -#include -#endif - -#include -#include -#include - -#include "absl/base/macros.h" -#include "absl/base/port.h" -#include "absl/debugging/internal/address_is_readable.h" -#include "absl/debugging/internal/vdso_support.h" // a no-op on non-elf or non-glibc systems -#include "absl/debugging/stacktrace.h" - -#include "absl/base/internal/raw_logging.h" - -using absl::debugging_internal::AddressIsReadable; - -#if defined(__linux__) && defined(__i386__) -// Count "push %reg" instructions in VDSO __kernel_vsyscall(), -// preceeding "syscall" or "sysenter". -// If __kernel_vsyscall uses frame pointer, answer 0. -// -// kMaxBytes tells how many instruction bytes of __kernel_vsyscall -// to analyze before giving up. Up to kMaxBytes+1 bytes of -// instructions could be accessed. -// -// Here are known __kernel_vsyscall instruction sequences: -// -// SYSENTER (linux-2.6.26/arch/x86/vdso/vdso32/sysenter.S). -// Used on Intel. -// 0xffffe400 <__kernel_vsyscall+0>: push %ecx -// 0xffffe401 <__kernel_vsyscall+1>: push %edx -// 0xffffe402 <__kernel_vsyscall+2>: push %ebp -// 0xffffe403 <__kernel_vsyscall+3>: mov %esp,%ebp -// 0xffffe405 <__kernel_vsyscall+5>: sysenter -// -// SYSCALL (see linux-2.6.26/arch/x86/vdso/vdso32/syscall.S). -// Used on AMD. -// 0xffffe400 <__kernel_vsyscall+0>: push %ebp -// 0xffffe401 <__kernel_vsyscall+1>: mov %ecx,%ebp -// 0xffffe403 <__kernel_vsyscall+3>: syscall -// - -// The sequence below isn't actually expected in Google fleet, -// here only for completeness. Remove this comment from OSS release. - -// i386 (see linux-2.6.26/arch/x86/vdso/vdso32/int80.S) -// 0xffffe400 <__kernel_vsyscall+0>: int $0x80 -// 0xffffe401 <__kernel_vsyscall+1>: ret -// -static const int kMaxBytes = 10; - -// We use assert()s instead of DCHECK()s -- this is too low level -// for DCHECK(). - -static int CountPushInstructions(const unsigned char *const addr) { - int result = 0; - for (int i = 0; i < kMaxBytes; ++i) { - if (addr[i] == 0x89) { - // "mov reg,reg" - if (addr[i + 1] == 0xE5) { - // Found "mov %esp,%ebp". - return 0; - } - ++i; // Skip register encoding byte. - } else if (addr[i] == 0x0F && - (addr[i + 1] == 0x34 || addr[i + 1] == 0x05)) { - // Found "sysenter" or "syscall". - return result; - } else if ((addr[i] & 0xF0) == 0x50) { - // Found "push %reg". - ++result; - } else if (addr[i] == 0xCD && addr[i + 1] == 0x80) { - // Found "int $0x80" - assert(result == 0); - return 0; - } else { - // Unexpected instruction. - assert(false && "unexpected instruction in __kernel_vsyscall"); - return 0; - } - } - // Unexpected: didn't find SYSENTER or SYSCALL in - // [__kernel_vsyscall, __kernel_vsyscall + kMaxBytes) interval. - assert(false && "did not find SYSENTER or SYSCALL in __kernel_vsyscall"); - return 0; -} -#endif - -// Assume stack frames larger than 100,000 bytes are bogus. -static const int kMaxFrameBytes = 100000; - -// Returns the stack frame pointer from signal context, 0 if unknown. -// vuc is a ucontext_t *. We use void* to avoid the use -// of ucontext_t on non-POSIX systems. -static uintptr_t GetFP(const void *vuc) { -#if !defined(__linux__) - static_cast(vuc); // Avoid an unused argument compiler warning. -#else - if (vuc != nullptr) { - auto *uc = reinterpret_cast(vuc); -#if defined(__i386__) - const auto bp = uc->uc_mcontext.gregs[REG_EBP]; - const auto sp = uc->uc_mcontext.gregs[REG_ESP]; -#elif defined(__x86_64__) - const auto bp = uc->uc_mcontext.gregs[REG_RBP]; - const auto sp = uc->uc_mcontext.gregs[REG_RSP]; -#else - const uintptr_t bp = 0; - const uintptr_t sp = 0; -#endif - // Sanity-check that the base pointer is valid. It's possible that some - // code in the process is compiled with --copt=-fomit-frame-pointer or - // --copt=-momit-leaf-frame-pointer. - // - // TODO(bcmills): -momit-leaf-frame-pointer is currently the default - // behavior when building with clang. Talk to the C++ toolchain team about - // fixing that. - if (bp >= sp && bp - sp <= kMaxFrameBytes) return bp; - - // If bp isn't a plausible frame pointer, return the stack pointer instead. - // If we're lucky, it points to the start of a stack frame; otherwise, we'll - // get one frame of garbage in the stack trace and fail the sanity check on - // the next iteration. - return sp; - } -#endif - return 0; -} - -// Given a pointer to a stack frame, locate and return the calling -// stackframe, or return null if no stackframe can be found. Perform sanity -// checks (the strictness of which is controlled by the boolean parameter -// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned. -template -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -static void **NextStackFrame(void **old_fp, const void *uc, - size_t stack_low, size_t stack_high) { - void **new_fp = (void **)*old_fp; - -#if defined(__linux__) && defined(__i386__) - if (WITH_CONTEXT && uc != nullptr) { - // How many "push %reg" instructions are there at __kernel_vsyscall? - // This is constant for a given kernel and processor, so compute - // it only once. - static int num_push_instructions = -1; // Sentinel: not computed yet. - // Initialize with sentinel value: __kernel_rt_sigreturn can not possibly - // be there. - static const unsigned char *kernel_rt_sigreturn_address = nullptr; - static const unsigned char *kernel_vsyscall_address = nullptr; - if (num_push_instructions == -1) { -#ifdef ABSL_HAVE_VDSO_SUPPORT - absl::debugging_internal::VDSOSupport vdso; - if (vdso.IsPresent()) { - absl::debugging_internal::VDSOSupport::SymbolInfo - rt_sigreturn_symbol_info; - absl::debugging_internal::VDSOSupport::SymbolInfo vsyscall_symbol_info; - if (!vdso.LookupSymbol("__kernel_rt_sigreturn", "LINUX_2.5", STT_FUNC, - &rt_sigreturn_symbol_info) || - !vdso.LookupSymbol("__kernel_vsyscall", "LINUX_2.5", STT_FUNC, - &vsyscall_symbol_info) || - rt_sigreturn_symbol_info.address == nullptr || - vsyscall_symbol_info.address == nullptr) { - // Unexpected: 32-bit VDSO is present, yet one of the expected - // symbols is missing or null. - assert(false && "VDSO is present, but doesn't have expected symbols"); - num_push_instructions = 0; - } else { - kernel_rt_sigreturn_address = - reinterpret_cast( - rt_sigreturn_symbol_info.address); - kernel_vsyscall_address = - reinterpret_cast( - vsyscall_symbol_info.address); - num_push_instructions = - CountPushInstructions(kernel_vsyscall_address); - } - } else { - num_push_instructions = 0; - } -#else // ABSL_HAVE_VDSO_SUPPORT - num_push_instructions = 0; -#endif // ABSL_HAVE_VDSO_SUPPORT - } - if (num_push_instructions != 0 && kernel_rt_sigreturn_address != nullptr && - old_fp[1] == kernel_rt_sigreturn_address) { - const ucontext_t *ucv = static_cast(uc); - // This kernel does not use frame pointer in its VDSO code, - // and so %ebp is not suitable for unwinding. - void **const reg_ebp = - reinterpret_cast(ucv->uc_mcontext.gregs[REG_EBP]); - const unsigned char *const reg_eip = - reinterpret_cast(ucv->uc_mcontext.gregs[REG_EIP]); - if (new_fp == reg_ebp && kernel_vsyscall_address <= reg_eip && - reg_eip - kernel_vsyscall_address < kMaxBytes) { - // We "stepped up" to __kernel_vsyscall, but %ebp is not usable. - // Restore from 'ucv' instead. - void **const reg_esp = - reinterpret_cast(ucv->uc_mcontext.gregs[REG_ESP]); - // Check that alleged %esp is not null and is reasonably aligned. - if (reg_esp && - ((uintptr_t)reg_esp & (sizeof(reg_esp) - 1)) == 0) { - // Check that alleged %esp is actually readable. This is to prevent - // "double fault" in case we hit the first fault due to e.g. stack - // corruption. - void *const reg_esp2 = reg_esp[num_push_instructions - 1]; - if (AddressIsReadable(reg_esp2)) { - // Alleged %esp is readable, use it for further unwinding. - new_fp = reinterpret_cast(reg_esp2); - } - } - } - } - } -#endif - - const uintptr_t old_fp_u = reinterpret_cast(old_fp); - const uintptr_t new_fp_u = reinterpret_cast(new_fp); - - // Check that the transition from frame pointer old_fp to frame - // pointer new_fp isn't clearly bogus. Skip the checks if new_fp - // matches the signal context, so that we don't skip out early when - // using an alternate signal stack. - // - // TODO(bcmills): The GetFP call should be completely unnecessary when - // ENABLE_COMBINED_UNWINDER is set (because we should be back in the thread's - // stack by this point), but it is empirically still needed (e.g. when the - // stack includes a call to abort). unw_get_reg returns UNW_EBADREG for some - // frames. Figure out why GetValidFrameAddr and/or libunwind isn't doing what - // it's supposed to. - if (STRICT_UNWINDING && - (!WITH_CONTEXT || uc == nullptr || new_fp_u != GetFP(uc))) { - // With the stack growing downwards, older stack frame must be - // at a greater address that the current one. - if (new_fp_u <= old_fp_u) return nullptr; - if (new_fp_u - old_fp_u > kMaxFrameBytes) return nullptr; - - if (stack_low < old_fp_u && old_fp_u <= stack_high) { - // Old BP was in the expected stack region... - if (!(stack_low < new_fp_u && new_fp_u <= stack_high)) { - // ... but new BP is outside of expected stack region. - // It is most likely bogus. - return nullptr; - } - } else { - // We may be here if we are executing in a co-routine with a - // separate stack. We can't do safety checks in this case. - } - } else { - if (new_fp == nullptr) return nullptr; // skip AddressIsReadable() below - // In the non-strict mode, allow discontiguous stack frames. - // (alternate-signal-stacks for example). - if (new_fp == old_fp) return nullptr; - } - - if (new_fp_u & (sizeof(void *) - 1)) return nullptr; -#ifdef __i386__ - // On 32-bit machines, the stack pointer can be very close to - // 0xffffffff, so we explicitly check for a pointer into the - // last two pages in the address space - if (new_fp_u >= 0xffffe000) return nullptr; -#endif -#if !defined(_WIN32) - if (!STRICT_UNWINDING) { - // Lax sanity checks cause a crash in 32-bit tcmalloc/crash_reason_test - // on AMD-based machines with VDSO-enabled kernels. - // Make an extra sanity check to insure new_fp is readable. - // Note: NextStackFrame() is only called while the program - // is already on its last leg, so it's ok to be slow here. - - if (!AddressIsReadable(new_fp)) { - return nullptr; - } - } -#endif - return new_fp; -} - -template -ABSL_ATTRIBUTE_NO_SANITIZE_ADDRESS // May read random elements from stack. -ABSL_ATTRIBUTE_NO_SANITIZE_MEMORY // May read random elements from stack. -ABSL_ATTRIBUTE_NOINLINE -static int UnwindImpl(void **result, int *sizes, int max_depth, int skip_count, - const void *ucp, int *min_dropped_frames) { - int n = 0; - void **fp = reinterpret_cast(__builtin_frame_address(0)); - - size_t stack_low = getpagesize(); // Assume that the first page is not stack. - size_t stack_high = std::numeric_limits::max() - sizeof(void *); - - while (fp && n < max_depth) { - if (*(fp + 1) == reinterpret_cast(0)) { - // In 64-bit code, we often see a frame that - // points to itself and has a return address of 0. - break; - } - void **next_fp = NextStackFrame( - fp, ucp, stack_low, stack_high); - if (skip_count > 0) { - skip_count--; - } else { - result[n] = *(fp + 1); - if (IS_STACK_FRAMES) { - if (next_fp > fp) { - sizes[n] = (uintptr_t)next_fp - (uintptr_t)fp; - } else { - // A frame-size of 0 is used to indicate unknown frame size. - sizes[n] = 0; - } - } - n++; - } - fp = next_fp; - } - if (min_dropped_frames != nullptr) { - // Implementation detail: we clamp the max of frames we are willing to - // count, so as not to spend too much time in the loop below. - const int kMaxUnwind = 1000; - int num_dropped_frames = 0; - for (int j = 0; fp != nullptr && j < kMaxUnwind; j++) { - if (skip_count > 0) { - skip_count--; - } else { - num_dropped_frames++; - } - fp = NextStackFrame(fp, ucp, stack_low, - stack_high); - } - *min_dropped_frames = num_dropped_frames; - } - return n; -} - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { -bool StackTraceWorksForTest() { - return true; -} -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_INTERNAL_STACKTRACE_X86_INL_INC_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/symbolize.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/symbolize.h deleted file mode 100644 index 27d5e65..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/symbolize.h +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file contains internal parts of the Abseil symbolizer. -// Do not depend on the anything in this file, it may change at anytime. - -#ifndef ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ -#define ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ - -#ifdef __cplusplus - -#include -#include - -#include "absl/base/config.h" -#include "absl/strings/string_view.h" - -#ifdef ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE -#error ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE cannot be directly set -#elif defined(__ELF__) && defined(__GLIBC__) && !defined(__native_client__) \ - && !defined(__asmjs__) && !defined(__wasm__) -#define ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE 1 - -#include -#include // For ElfW() macro. -#include -#include - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { - -// Iterates over all sections, invoking callback on each with the section name -// and the section header. -// -// Returns true on success; otherwise returns false in case of errors. -// -// This is not async-signal-safe. -bool ForEachSection(int fd, - const std::function& callback); - -// Gets the section header for the given name, if it exists. Returns true on -// success. Otherwise, returns false. -bool GetSectionHeaderByName(int fd, const char *name, size_t name_len, - ElfW(Shdr) *out); - -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE - -#ifdef ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE -#error ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE cannot be directly set -#elif defined(__APPLE__) -#define ABSL_INTERNAL_HAVE_DARWIN_SYMBOLIZE 1 -#endif - -#ifdef ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE -#error ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE cannot be directly set -#elif defined(__EMSCRIPTEN__) -#define ABSL_INTERNAL_HAVE_EMSCRIPTEN_SYMBOLIZE 1 -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { - -struct SymbolDecoratorArgs { - // The program counter we are getting symbolic name for. - const void *pc; - // 0 for main executable, load address for shared libraries. - ptrdiff_t relocation; - // Read-only file descriptor for ELF image covering "pc", - // or -1 if no such ELF image exists in /proc/self/maps. - int fd; - // Output buffer, size. - // Note: the buffer may not be empty -- default symbolizer may have already - // produced some output, and earlier decorators may have adorned it in - // some way. You are free to replace or augment the contents (within the - // symbol_buf_size limit). - char *const symbol_buf; - size_t symbol_buf_size; - // Temporary scratch space, size. - // Use that space in preference to allocating your own stack buffer to - // conserve stack. - char *const tmp_buf; - size_t tmp_buf_size; - // User-provided argument - void* arg; -}; -using SymbolDecorator = void (*)(const SymbolDecoratorArgs *); - -// Installs a function-pointer as a decorator. Returns a value less than zero -// if the system cannot install the decorator. Otherwise, returns a unique -// identifier corresponding to the decorator. This identifier can be used to -// uninstall the decorator - See RemoveSymbolDecorator() below. -int InstallSymbolDecorator(SymbolDecorator decorator, void* arg); - -// Removes a previously installed function-pointer decorator. Parameter "ticket" -// is the return-value from calling InstallSymbolDecorator(). -bool RemoveSymbolDecorator(int ticket); - -// Remove all installed decorators. Returns true if successful, false if -// symbolization is currently in progress. -bool RemoveAllSymbolDecorators(void); - -// Registers an address range to a file mapping. -// -// Preconditions: -// start <= end -// filename != nullptr -// -// Returns true if the file was successfully registered. -bool RegisterFileMappingHint(const void* start, const void* end, - uint64_t offset, const char* filename); - -// Looks up the file mapping registered by RegisterFileMappingHint for an -// address range. If there is one, the file name is stored in *filename and -// *start and *end are modified to reflect the registered mapping. Returns -// whether any hint was found. -bool GetFileMappingHint(const void** start, const void** end, uint64_t* offset, - const char** filename); - -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // __cplusplus - -#include - -#ifdef __cplusplus -extern "C" -#endif // __cplusplus - - bool - AbslInternalGetFileMappingHint(const void** start, const void** end, - uint64_t* offset, const char** filename); - -#endif // ABSL_DEBUGGING_INTERNAL_SYMBOLIZE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/vdso_support.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/vdso_support.h deleted file mode 100644 index 6562c6c..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/internal/vdso_support.h +++ /dev/null @@ -1,158 +0,0 @@ -// -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// Allow dynamic symbol lookup in the kernel VDSO page. -// -// VDSO stands for "Virtual Dynamic Shared Object" -- a page of -// executable code, which looks like a shared library, but doesn't -// necessarily exist anywhere on disk, and which gets mmap()ed into -// every process by kernels which support VDSO, such as 2.6.x for 32-bit -// executables, and 2.6.24 and above for 64-bit executables. -// -// More details could be found here: -// http://www.trilithium.com/johan/2005/08/linux-gate/ -// -// VDSOSupport -- a class representing kernel VDSO (if present). -// -// Example usage: -// VDSOSupport vdso; -// VDSOSupport::SymbolInfo info; -// typedef (*FN)(unsigned *, void *, void *); -// FN fn = nullptr; -// if (vdso.LookupSymbol("__vdso_getcpu", "LINUX_2.6", STT_FUNC, &info)) { -// fn = reinterpret_cast(info.address); -// } - -#ifndef ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ -#define ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ - -#include - -#include "absl/base/attributes.h" -#include "absl/debugging/internal/elf_mem_image.h" - -#ifdef ABSL_HAVE_ELF_MEM_IMAGE - -#ifdef ABSL_HAVE_VDSO_SUPPORT -#error ABSL_HAVE_VDSO_SUPPORT cannot be directly set -#else -#define ABSL_HAVE_VDSO_SUPPORT 1 -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace debugging_internal { - -// NOTE: this class may be used from within tcmalloc, and can not -// use any memory allocation routines. -class VDSOSupport { - public: - VDSOSupport(); - - typedef ElfMemImage::SymbolInfo SymbolInfo; - typedef ElfMemImage::SymbolIterator SymbolIterator; - - // On PowerPC64 VDSO symbols can either be of type STT_FUNC or STT_NOTYPE - // depending on how the kernel is built. The kernel is normally built with - // STT_NOTYPE type VDSO symbols. Let's make things simpler first by using a - // compile-time constant. -#ifdef __powerpc64__ - enum { kVDSOSymbolType = STT_NOTYPE }; -#else - enum { kVDSOSymbolType = STT_FUNC }; -#endif - - // Answers whether we have a vdso at all. - bool IsPresent() const { return image_.IsPresent(); } - - // Allow to iterate over all VDSO symbols. - SymbolIterator begin() const { return image_.begin(); } - SymbolIterator end() const { return image_.end(); } - - // Look up versioned dynamic symbol in the kernel VDSO. - // Returns false if VDSO is not present, or doesn't contain given - // symbol/version/type combination. - // If info_out != nullptr, additional details are filled in. - bool LookupSymbol(const char *name, const char *version, - int symbol_type, SymbolInfo *info_out) const; - - // Find info about symbol (if any) which overlaps given address. - // Returns true if symbol was found; false if VDSO isn't present - // or doesn't have a symbol overlapping given address. - // If info_out != nullptr, additional details are filled in. - bool LookupSymbolByAddress(const void *address, SymbolInfo *info_out) const; - - // Used only for testing. Replace real VDSO base with a mock. - // Returns previous value of vdso_base_. After you are done testing, - // you are expected to call SetBase() with previous value, in order to - // reset state to the way it was. - const void *SetBase(const void *s); - - // Computes vdso_base_ and returns it. Should be called as early as - // possible; before any thread creation, chroot or setuid. - static const void *Init(); - - private: - // image_ represents VDSO ELF image in memory. - // image_.ehdr_ == nullptr implies there is no VDSO. - ElfMemImage image_; - - // Cached value of auxv AT_SYSINFO_EHDR, computed once. - // This is a tri-state: - // kInvalidBase => value hasn't been determined yet. - // 0 => there is no VDSO. - // else => vma of VDSO Elf{32,64}_Ehdr. - // - // When testing with mock VDSO, low bit is set. - // The low bit is always available because vdso_base_ is - // page-aligned. - static std::atomic vdso_base_; - - // NOLINT on 'long' because these routines mimic kernel api. - // The 'cache' parameter may be used by some versions of the kernel, - // and should be nullptr or point to a static buffer containing at - // least two 'long's. - static long InitAndGetCPU(unsigned *cpu, void *cache, // NOLINT 'long'. - void *unused); - static long GetCPUViaSyscall(unsigned *cpu, void *cache, // NOLINT 'long'. - void *unused); - typedef long (*GetCpuFn)(unsigned *cpu, void *cache, // NOLINT 'long'. - void *unused); - - // This function pointer may point to InitAndGetCPU, - // GetCPUViaSyscall, or __vdso_getcpu at different stages of initialization. - ABSL_CONST_INIT static std::atomic getcpu_fn_; - - friend int GetCPU(void); // Needs access to getcpu_fn_. - - VDSOSupport(const VDSOSupport&) = delete; - VDSOSupport& operator=(const VDSOSupport&) = delete; -}; - -// Same as sched_getcpu() on later glibc versions. -// Return current CPU, using (fast) __vdso_getcpu@LINUX_2.6 if present, -// otherwise use syscall(SYS_getcpu,...). -// May return -1 with errno == ENOSYS if the kernel doesn't -// support SYS_getcpu. -int GetCPU(); - -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_HAVE_ELF_MEM_IMAGE - -#endif // ABSL_DEBUGGING_INTERNAL_VDSO_SUPPORT_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/stacktrace.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/stacktrace.h deleted file mode 100644 index 0ec0ffd..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/stacktrace.h +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: stacktrace.h -// ----------------------------------------------------------------------------- -// -// This file contains routines to extract the current stack trace and associated -// stack frames. These functions are thread-safe and async-signal-safe. -// -// Note that stack trace functionality is platform dependent and requires -// additional support from the compiler/build system in most cases. (That is, -// this functionality generally only works on platforms/builds that have been -// specifically configured to support it.) -// -// Note: stack traces in Abseil that do not utilize a symbolizer will result in -// frames consisting of function addresses rather than human-readable function -// names. (See symbolize.h for information on symbolizing these values.) - -#ifndef ABSL_DEBUGGING_STACKTRACE_H_ -#define ABSL_DEBUGGING_STACKTRACE_H_ - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// GetStackFrames() -// -// Records program counter values for up to `max_depth` frames, skipping the -// most recent `skip_count` stack frames, stores their corresponding values -// and sizes in `results` and `sizes` buffers, and returns the number of frames -// stored. (Note that the frame generated for the `absl::GetStackFrames()` -// routine itself is also skipped.) -// -// Example: -// -// main() { foo(); } -// foo() { bar(); } -// bar() { -// void* result[10]; -// int sizes[10]; -// int depth = absl::GetStackFrames(result, sizes, 10, 1); -// } -// -// The current stack frame would consist of three function calls: `bar()`, -// `foo()`, and then `main()`; however, since the `GetStackFrames()` call sets -// `skip_count` to `1`, it will skip the frame for `bar()`, the most recently -// invoked function call. It will therefore return 2 and fill `result` with -// program counters within the following functions: -// -// result[0] foo() -// result[1] main() -// -// (Note: in practice, a few more entries after `main()` may be added to account -// for startup processes.) -// -// Corresponding stack frame sizes will also be recorded: -// -// sizes[0] 16 -// sizes[1] 16 -// -// (Stack frame sizes of `16` above are just for illustration purposes.) -// -// Stack frame sizes of 0 or less indicate that those frame sizes couldn't -// be identified. -// -// This routine may return fewer stack frame entries than are -// available. Also note that `result` and `sizes` must both be non-null. -extern int GetStackFrames(void** result, int* sizes, int max_depth, - int skip_count); - -// GetStackFramesWithContext() -// -// Records program counter values obtained from a signal handler. Records -// program counter values for up to `max_depth` frames, skipping the most recent -// `skip_count` stack frames, stores their corresponding values and sizes in -// `results` and `sizes` buffers, and returns the number of frames stored. (Note -// that the frame generated for the `absl::GetStackFramesWithContext()` routine -// itself is also skipped.) -// -// The `uc` parameter, if non-null, should be a pointer to a `ucontext_t` value -// passed to a signal handler registered via the `sa_sigaction` field of a -// `sigaction` struct. (See -// http://man7.org/linux/man-pages/man2/sigaction.2.html.) The `uc` value may -// help a stack unwinder to provide a better stack trace under certain -// conditions. `uc` may safely be null. -// -// The `min_dropped_frames` output parameter, if non-null, points to the -// location to note any dropped stack frames, if any, due to buffer limitations -// or other reasons. (This value will be set to `0` if no frames were dropped.) -// The number of total stack frames is guaranteed to be >= skip_count + -// max_depth + *min_dropped_frames. -extern int GetStackFramesWithContext(void** result, int* sizes, int max_depth, - int skip_count, const void* uc, - int* min_dropped_frames); - -// GetStackTrace() -// -// Records program counter values for up to `max_depth` frames, skipping the -// most recent `skip_count` stack frames, stores their corresponding values -// in `results`, and returns the number of frames -// stored. Note that this function is similar to `absl::GetStackFrames()` -// except that it returns the stack trace only, and not stack frame sizes. -// -// Example: -// -// main() { foo(); } -// foo() { bar(); } -// bar() { -// void* result[10]; -// int depth = absl::GetStackTrace(result, 10, 1); -// } -// -// This produces: -// -// result[0] foo -// result[1] main -// .... ... -// -// `result` must not be null. -extern int GetStackTrace(void** result, int max_depth, int skip_count); - -// GetStackTraceWithContext() -// -// Records program counter values obtained from a signal handler. Records -// program counter values for up to `max_depth` frames, skipping the most recent -// `skip_count` stack frames, stores their corresponding values in `results`, -// and returns the number of frames stored. (Note that the frame generated for -// the `absl::GetStackFramesWithContext()` routine itself is also skipped.) -// -// The `uc` parameter, if non-null, should be a pointer to a `ucontext_t` value -// passed to a signal handler registered via the `sa_sigaction` field of a -// `sigaction` struct. (See -// http://man7.org/linux/man-pages/man2/sigaction.2.html.) The `uc` value may -// help a stack unwinder to provide a better stack trace under certain -// conditions. `uc` may safely be null. -// -// The `min_dropped_frames` output parameter, if non-null, points to the -// location to note any dropped stack frames, if any, due to buffer limitations -// or other reasons. (This value will be set to `0` if no frames were dropped.) -// The number of total stack frames is guaranteed to be >= skip_count + -// max_depth + *min_dropped_frames. -extern int GetStackTraceWithContext(void** result, int max_depth, - int skip_count, const void* uc, - int* min_dropped_frames); - -// SetStackUnwinder() -// -// Provides a custom function for unwinding stack frames that will be used in -// place of the default stack unwinder when invoking the static -// GetStack{Frames,Trace}{,WithContext}() functions above. -// -// The arguments passed to the unwinder function will match the -// arguments passed to `absl::GetStackFramesWithContext()` except that sizes -// will be non-null iff the caller is interested in frame sizes. -// -// If unwinder is set to null, we revert to the default stack-tracing behavior. -// -// ***************************************************************************** -// WARNING -// ***************************************************************************** -// -// absl::SetStackUnwinder is not suitable for general purpose use. It is -// provided for custom runtimes. -// Some things to watch out for when calling `absl::SetStackUnwinder()`: -// -// (a) The unwinder may be called from within signal handlers and -// therefore must be async-signal-safe. -// -// (b) Even after a custom stack unwinder has been unregistered, other -// threads may still be in the process of using that unwinder. -// Therefore do not clean up any state that may be needed by an old -// unwinder. -// ***************************************************************************** -extern void SetStackUnwinder(int (*unwinder)(void** pcs, int* sizes, - int max_depth, int skip_count, - const void* uc, - int* min_dropped_frames)); - -// DefaultStackUnwinder() -// -// Records program counter values of up to `max_depth` frames, skipping the most -// recent `skip_count` stack frames, and stores their corresponding values in -// `pcs`. (Note that the frame generated for this call itself is also skipped.) -// This function acts as a generic stack-unwinder; prefer usage of the more -// specific `GetStack{Trace,Frames}{,WithContext}()` functions above. -// -// If you have set your own stack unwinder (with the `SetStackUnwinder()` -// function above, you can still get the default stack unwinder by calling -// `DefaultStackUnwinder()`, which will ignore any previously set stack unwinder -// and use the default one instead. -// -// Because this function is generic, only `pcs` is guaranteed to be non-null -// upon return. It is legal for `sizes`, `uc`, and `min_dropped_frames` to all -// be null when called. -// -// The semantics are the same as the corresponding `GetStack*()` function in the -// case where `absl::SetStackUnwinder()` was never called. Equivalents are: -// -// null sizes | non-nullptr sizes -// |==========================================================| -// null uc | GetStackTrace() | GetStackFrames() | -// non-null uc | GetStackTraceWithContext() | GetStackFramesWithContext() | -// |==========================================================| -extern int DefaultStackUnwinder(void** pcs, int* sizes, int max_depth, - int skip_count, const void* uc, - int* min_dropped_frames); - -namespace debugging_internal { -// Returns true for platforms which are expected to have functioning stack trace -// implementations. Intended to be used for tests which want to exclude -// verification of logic known to be broken because stack traces are not -// working. -extern bool StackTraceWorksForTest(); -} // namespace debugging_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_STACKTRACE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize.h deleted file mode 100644 index 43d93a8..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: symbolize.h -// ----------------------------------------------------------------------------- -// -// This file configures the Abseil symbolizer for use in converting instruction -// pointer addresses (program counters) into human-readable names (function -// calls, etc.) within Abseil code. -// -// The symbolizer may be invoked from several sources: -// -// * Implicitly, through the installation of an Abseil failure signal handler. -// (See failure_signal_handler.h for more information.) -// * By calling `Symbolize()` directly on a program counter you obtain through -// `absl::GetStackTrace()` or `absl::GetStackFrames()`. (See stacktrace.h -// for more information. -// * By calling `Symbolize()` directly on a program counter you obtain through -// other means (which would be platform-dependent). -// -// In all of the above cases, the symbolizer must first be initialized before -// any program counter values can be symbolized. If you are installing a failure -// signal handler, initialize the symbolizer before you do so. -// -// Example: -// -// int main(int argc, char** argv) { -// // Initialize the Symbolizer before installing the failure signal handler -// absl::InitializeSymbolizer(argv[0]); -// -// // Now you may install the failure signal handler -// absl::FailureSignalHandlerOptions options; -// absl::InstallFailureSignalHandler(options); -// -// // Start running your main program -// ... -// return 0; -// } -// -#ifndef ABSL_DEBUGGING_SYMBOLIZE_H_ -#define ABSL_DEBUGGING_SYMBOLIZE_H_ - -#include "absl/debugging/internal/symbolize.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// InitializeSymbolizer() -// -// Initializes the program counter symbolizer, given the path of the program -// (typically obtained through `main()`s `argv[0]`). The Abseil symbolizer -// allows you to read program counters (instruction pointer values) using their -// human-readable names within output such as stack traces. -// -// Example: -// -// int main(int argc, char *argv[]) { -// absl::InitializeSymbolizer(argv[0]); -// // Now you can use the symbolizer -// } -void InitializeSymbolizer(const char* argv0); -// -// Symbolize() -// -// Symbolizes a program counter (instruction pointer value) `pc` and, on -// success, writes the name to `out`. The symbol name is demangled, if possible. -// Note that the symbolized name may be truncated and will be NUL-terminated. -// Demangling is supported for symbols generated by GCC 3.x or newer). Returns -// `false` on failure. -// -// Example: -// -// // Print a program counter and its symbol name. -// static void DumpPCAndSymbol(void *pc) { -// char tmp[1024]; -// const char *symbol = "(unknown)"; -// if (absl::Symbolize(pc, tmp, sizeof(tmp))) { -// symbol = tmp; -// } -// absl::PrintF("%p %s\n", pc, symbol); -// } -bool Symbolize(const void *pc, char *out, int out_size); - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_DEBUGGING_SYMBOLIZE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_darwin.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_darwin.inc deleted file mode 100644 index 443ce9e..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_darwin.inc +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2020 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include -#include - -#include -#include - -#include "absl/base/internal/raw_logging.h" -#include "absl/debugging/internal/demangle.h" -#include "absl/strings/numbers.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/string_view.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -void InitializeSymbolizer(const char*) {} - -namespace debugging_internal { -namespace { - -static std::string GetSymbolString(absl::string_view backtrace_line) { - // Example Backtrace lines: - // 0 libimaging_shared.dylib 0x018c152a - // _ZNSt11_Deque_baseIN3nik7mediadb4PageESaIS2_EE17_M_initialize_mapEm + 3478 - // - // or - // 0 libimaging_shared.dylib 0x0000000001895c39 - // _ZN3nik4util19register_shared_ptrINS_3gpu7TextureEEEvPKvS5_ + 39 - // - // or - // 0 mysterious_app 0x0124000120120009 main + 17 - auto address_pos = backtrace_line.find(" 0x"); - if (address_pos == absl::string_view::npos) return std::string(); - absl::string_view symbol_view = backtrace_line.substr(address_pos + 1); - - auto space_pos = symbol_view.find(" "); - if (space_pos == absl::string_view::npos) return std::string(); - symbol_view = symbol_view.substr(space_pos + 1); // to mangled symbol - - auto plus_pos = symbol_view.find(" + "); - if (plus_pos == absl::string_view::npos) return std::string(); - symbol_view = symbol_view.substr(0, plus_pos); // strip remainng - - return std::string(symbol_view); -} - -} // namespace -} // namespace debugging_internal - -bool Symbolize(const void* pc, char* out, int out_size) { - if (out_size <= 0 || pc == nullptr) { - out = nullptr; - return false; - } - - // This allocates a char* array. - char** frame_strings = backtrace_symbols(const_cast(&pc), 1); - - if (frame_strings == nullptr) return false; - - std::string symbol = debugging_internal::GetSymbolString(frame_strings[0]); - free(frame_strings); - - char tmp_buf[1024]; - if (debugging_internal::Demangle(symbol.c_str(), tmp_buf, sizeof(tmp_buf))) { - size_t len = strlen(tmp_buf); - if (len + 1 <= static_cast(out_size)) { // +1 for '\0' - assert(len < sizeof(tmp_buf)); - memmove(out, tmp_buf, len + 1); - } - } else { - strncpy(out, symbol.c_str(), out_size); - } - - if (out[out_size - 1] != '\0') { - // strncpy() does not '\0' terminate when it truncates. - static constexpr char kEllipsis[] = "..."; - int ellipsis_size = std::min(sizeof(kEllipsis) - 1, out_size - 1); - memcpy(out + out_size - ellipsis_size - 1, kEllipsis, ellipsis_size); - out[out_size - 1] = '\0'; - } - - return true; -} - -ABSL_NAMESPACE_END -} // namespace absl diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_elf.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_elf.inc deleted file mode 100644 index 9bfdd91..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_elf.inc +++ /dev/null @@ -1,1613 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This library provides Symbolize() function that symbolizes program -// counters to their corresponding symbol names on linux platforms. -// This library has a minimal implementation of an ELF symbol table -// reader (i.e. it doesn't depend on libelf, etc.). -// -// The algorithm used in Symbolize() is as follows. -// -// 1. Go through a list of maps in /proc/self/maps and find the map -// containing the program counter. -// -// 2. Open the mapped file and find a regular symbol table inside. -// Iterate over symbols in the symbol table and look for the symbol -// containing the program counter. If such a symbol is found, -// obtain the symbol name, and demangle the symbol if possible. -// If the symbol isn't found in the regular symbol table (binary is -// stripped), try the same thing with a dynamic symbol table. -// -// Note that Symbolize() is originally implemented to be used in -// signal handlers, hence it doesn't use malloc() and other unsafe -// operations. It should be both thread-safe and async-signal-safe. -// -// Implementation note: -// -// We don't use heaps but only use stacks. We want to reduce the -// stack consumption so that the symbolizer can run on small stacks. -// -// Here are some numbers collected with GCC 4.1.0 on x86: -// - sizeof(Elf32_Sym) = 16 -// - sizeof(Elf32_Shdr) = 40 -// - sizeof(Elf64_Sym) = 24 -// - sizeof(Elf64_Shdr) = 64 -// -// This implementation is intended to be async-signal-safe but uses some -// functions which are not guaranteed to be so, such as memchr() and -// memmove(). We assume they are async-signal-safe. - -#include -#include -#include -#include // For ElfW() macro. -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/base/casts.h" -#include "absl/base/dynamic_annotations.h" -#include "absl/base/internal/low_level_alloc.h" -#include "absl/base/internal/raw_logging.h" -#include "absl/base/internal/spinlock.h" -#include "absl/base/port.h" -#include "absl/debugging/internal/demangle.h" -#include "absl/debugging/internal/vdso_support.h" -#include "absl/strings/string_view.h" - -#if defined(__FreeBSD__) && !defined(ElfW) -#define ElfW(x) __ElfN(x) -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// Value of argv[0]. Used by MaybeInitializeObjFile(). -static char *argv0_value = nullptr; - -void InitializeSymbolizer(const char *argv0) { -#ifdef ABSL_HAVE_VDSO_SUPPORT - // We need to make sure VDSOSupport::Init() is called before any setuid or - // chroot calls, so InitializeSymbolizer() should be called very early in the - // life of a program. - absl::debugging_internal::VDSOSupport::Init(); -#endif - if (argv0_value != nullptr) { - free(argv0_value); - argv0_value = nullptr; - } - if (argv0 != nullptr && argv0[0] != '\0') { - argv0_value = strdup(argv0); - } -} - -namespace debugging_internal { -namespace { - -// Re-runs fn until it doesn't cause EINTR. -#define NO_INTR(fn) \ - do { \ - } while ((fn) < 0 && errno == EINTR) - -// On Linux, ELF_ST_* are defined in . To make this portable -// we define our own ELF_ST_BIND and ELF_ST_TYPE if not available. -#ifndef ELF_ST_BIND -#define ELF_ST_BIND(info) (((unsigned char)(info)) >> 4) -#endif - -#ifndef ELF_ST_TYPE -#define ELF_ST_TYPE(info) (((unsigned char)(info)) & 0xF) -#endif - -// Some platforms use a special .opd section to store function pointers. -const char kOpdSectionName[] = ".opd"; - -#if (defined(__powerpc__) && !(_CALL_ELF > 1)) || defined(__ia64) -// Use opd section for function descriptors on these platforms, the function -// address is the first word of the descriptor. -enum { kPlatformUsesOPDSections = 1 }; -#else // not PPC or IA64 -enum { kPlatformUsesOPDSections = 0 }; -#endif - -// This works for PowerPC & IA64 only. A function descriptor consist of two -// pointers and the first one is the function's entry. -const size_t kFunctionDescriptorSize = sizeof(void *) * 2; - -const int kMaxDecorators = 10; // Seems like a reasonable upper limit. - -struct InstalledSymbolDecorator { - SymbolDecorator fn; - void *arg; - int ticket; -}; - -int g_num_decorators; -InstalledSymbolDecorator g_decorators[kMaxDecorators]; - -struct FileMappingHint { - const void *start; - const void *end; - uint64_t offset; - const char *filename; -}; - -// Protects g_decorators. -// We are using SpinLock and not a Mutex here, because we may be called -// from inside Mutex::Lock itself, and it prohibits recursive calls. -// This happens in e.g. base/stacktrace_syscall_unittest. -// Moreover, we are using only TryLock(), if the decorator list -// is being modified (is busy), we skip all decorators, and possibly -// loose some info. Sorry, that's the best we could do. -ABSL_CONST_INIT absl::base_internal::SpinLock g_decorators_mu( - absl::kConstInit, absl::base_internal::SCHEDULE_KERNEL_ONLY); - -const int kMaxFileMappingHints = 8; -int g_num_file_mapping_hints; -FileMappingHint g_file_mapping_hints[kMaxFileMappingHints]; -// Protects g_file_mapping_hints. -ABSL_CONST_INIT absl::base_internal::SpinLock g_file_mapping_mu( - absl::kConstInit, absl::base_internal::SCHEDULE_KERNEL_ONLY); - -// Async-signal-safe function to zero a buffer. -// memset() is not guaranteed to be async-signal-safe. -static void SafeMemZero(void* p, size_t size) { - unsigned char *c = static_cast(p); - while (size--) { - *c++ = 0; - } -} - -struct ObjFile { - ObjFile() - : filename(nullptr), - start_addr(nullptr), - end_addr(nullptr), - offset(0), - fd(-1), - elf_type(-1) { - SafeMemZero(&elf_header, sizeof(elf_header)); - SafeMemZero(&phdr[0], sizeof(phdr)); - } - - char *filename; - const void *start_addr; - const void *end_addr; - uint64_t offset; - - // The following fields are initialized on the first access to the - // object file. - int fd; - int elf_type; - ElfW(Ehdr) elf_header; - - // PT_LOAD program header describing executable code. - // Normally we expect just one, but SWIFT binaries have two. - std::array phdr; -}; - -// Build 4-way associative cache for symbols. Within each cache line, symbols -// are replaced in LRU order. -enum { - ASSOCIATIVITY = 4, -}; -struct SymbolCacheLine { - const void *pc[ASSOCIATIVITY]; - char *name[ASSOCIATIVITY]; - - // age[i] is incremented when a line is accessed. it's reset to zero if the - // i'th entry is read. - uint32_t age[ASSOCIATIVITY]; -}; - -// --------------------------------------------------------------- -// An async-signal-safe arena for LowLevelAlloc -static std::atomic g_sig_safe_arena; - -static base_internal::LowLevelAlloc::Arena *SigSafeArena() { - return g_sig_safe_arena.load(std::memory_order_acquire); -} - -static void InitSigSafeArena() { - if (SigSafeArena() == nullptr) { - base_internal::LowLevelAlloc::Arena *new_arena = - base_internal::LowLevelAlloc::NewArena( - base_internal::LowLevelAlloc::kAsyncSignalSafe); - base_internal::LowLevelAlloc::Arena *old_value = nullptr; - if (!g_sig_safe_arena.compare_exchange_strong(old_value, new_arena, - std::memory_order_release, - std::memory_order_relaxed)) { - // We lost a race to allocate an arena; deallocate. - base_internal::LowLevelAlloc::DeleteArena(new_arena); - } - } -} - -// --------------------------------------------------------------- -// An AddrMap is a vector of ObjFile, using SigSafeArena() for allocation. - -class AddrMap { - public: - AddrMap() : size_(0), allocated_(0), obj_(nullptr) {} - ~AddrMap() { base_internal::LowLevelAlloc::Free(obj_); } - int Size() const { return size_; } - ObjFile *At(int i) { return &obj_[i]; } - ObjFile *Add(); - void Clear(); - - private: - int size_; // count of valid elements (<= allocated_) - int allocated_; // count of allocated elements - ObjFile *obj_; // array of allocated_ elements - AddrMap(const AddrMap &) = delete; - AddrMap &operator=(const AddrMap &) = delete; -}; - -void AddrMap::Clear() { - for (int i = 0; i != size_; i++) { - At(i)->~ObjFile(); - } - size_ = 0; -} - -ObjFile *AddrMap::Add() { - if (size_ == allocated_) { - int new_allocated = allocated_ * 2 + 50; - ObjFile *new_obj_ = - static_cast(base_internal::LowLevelAlloc::AllocWithArena( - new_allocated * sizeof(*new_obj_), SigSafeArena())); - if (obj_) { - memcpy(new_obj_, obj_, allocated_ * sizeof(*new_obj_)); - base_internal::LowLevelAlloc::Free(obj_); - } - obj_ = new_obj_; - allocated_ = new_allocated; - } - return new (&obj_[size_++]) ObjFile; -} - -// --------------------------------------------------------------- - -enum FindSymbolResult { SYMBOL_NOT_FOUND = 1, SYMBOL_TRUNCATED, SYMBOL_FOUND }; - -class Symbolizer { - public: - Symbolizer(); - ~Symbolizer(); - const char *GetSymbol(const void *const pc); - - private: - char *CopyString(const char *s) { - int len = strlen(s); - char *dst = static_cast( - base_internal::LowLevelAlloc::AllocWithArena(len + 1, SigSafeArena())); - ABSL_RAW_CHECK(dst != nullptr, "out of memory"); - memcpy(dst, s, len + 1); - return dst; - } - ObjFile *FindObjFile(const void *const start, - size_t size) ABSL_ATTRIBUTE_NOINLINE; - static bool RegisterObjFile(const char *filename, - const void *const start_addr, - const void *const end_addr, uint64_t offset, - void *arg); - SymbolCacheLine *GetCacheLine(const void *const pc); - const char *FindSymbolInCache(const void *const pc); - const char *InsertSymbolInCache(const void *const pc, const char *name); - void AgeSymbols(SymbolCacheLine *line); - void ClearAddrMap(); - FindSymbolResult GetSymbolFromObjectFile(const ObjFile &obj, - const void *const pc, - const ptrdiff_t relocation, - char *out, int out_size, - char *tmp_buf, int tmp_buf_size); - const char *GetUncachedSymbol(const void *pc); - - enum { - SYMBOL_BUF_SIZE = 3072, - TMP_BUF_SIZE = 1024, - SYMBOL_CACHE_LINES = 128, - }; - - AddrMap addr_map_; - - bool ok_; - bool addr_map_read_; - - char symbol_buf_[SYMBOL_BUF_SIZE]; - - // tmp_buf_ will be used to store arrays of ElfW(Shdr) and ElfW(Sym) - // so we ensure that tmp_buf_ is properly aligned to store either. - alignas(16) char tmp_buf_[TMP_BUF_SIZE]; - static_assert(alignof(ElfW(Shdr)) <= 16, - "alignment of tmp buf too small for Shdr"); - static_assert(alignof(ElfW(Sym)) <= 16, - "alignment of tmp buf too small for Sym"); - - SymbolCacheLine symbol_cache_[SYMBOL_CACHE_LINES]; -}; - -static std::atomic g_cached_symbolizer; - -} // namespace - -static int SymbolizerSize() { -#if defined(__wasm__) || defined(__asmjs__) - int pagesize = getpagesize(); -#else - int pagesize = sysconf(_SC_PAGESIZE); -#endif - return ((sizeof(Symbolizer) - 1) / pagesize + 1) * pagesize; -} - -// Return (and set null) g_cached_symbolized_state if it is not null. -// Otherwise return a new symbolizer. -static Symbolizer *AllocateSymbolizer() { - InitSigSafeArena(); - Symbolizer *symbolizer = - g_cached_symbolizer.exchange(nullptr, std::memory_order_acquire); - if (symbolizer != nullptr) { - return symbolizer; - } - return new (base_internal::LowLevelAlloc::AllocWithArena( - SymbolizerSize(), SigSafeArena())) Symbolizer(); -} - -// Set g_cached_symbolize_state to s if it is null, otherwise -// delete s. -static void FreeSymbolizer(Symbolizer *s) { - Symbolizer *old_cached_symbolizer = nullptr; - if (!g_cached_symbolizer.compare_exchange_strong(old_cached_symbolizer, s, - std::memory_order_release, - std::memory_order_relaxed)) { - s->~Symbolizer(); - base_internal::LowLevelAlloc::Free(s); - } -} - -Symbolizer::Symbolizer() : ok_(true), addr_map_read_(false) { - for (SymbolCacheLine &symbol_cache_line : symbol_cache_) { - for (size_t j = 0; j < ABSL_ARRAYSIZE(symbol_cache_line.name); ++j) { - symbol_cache_line.pc[j] = nullptr; - symbol_cache_line.name[j] = nullptr; - symbol_cache_line.age[j] = 0; - } - } -} - -Symbolizer::~Symbolizer() { - for (SymbolCacheLine &symbol_cache_line : symbol_cache_) { - for (char *s : symbol_cache_line.name) { - base_internal::LowLevelAlloc::Free(s); - } - } - ClearAddrMap(); -} - -// We don't use assert() since it's not guaranteed to be -// async-signal-safe. Instead we define a minimal assertion -// macro. So far, we don't need pretty printing for __FILE__, etc. -#define SAFE_ASSERT(expr) ((expr) ? static_cast(0) : abort()) - -// Read up to "count" bytes from file descriptor "fd" into the buffer -// starting at "buf" while handling short reads and EINTR. On -// success, return the number of bytes read. Otherwise, return -1. -static ssize_t ReadPersistent(int fd, void *buf, size_t count) { - SAFE_ASSERT(fd >= 0); - SAFE_ASSERT(count <= SSIZE_MAX); - char *buf0 = reinterpret_cast(buf); - size_t num_bytes = 0; - while (num_bytes < count) { - ssize_t len; - NO_INTR(len = read(fd, buf0 + num_bytes, count - num_bytes)); - if (len < 0) { // There was an error other than EINTR. - ABSL_RAW_LOG(WARNING, "read failed: errno=%d", errno); - return -1; - } - if (len == 0) { // Reached EOF. - break; - } - num_bytes += len; - } - SAFE_ASSERT(num_bytes <= count); - return static_cast(num_bytes); -} - -// Read up to "count" bytes from "offset" in the file pointed by file -// descriptor "fd" into the buffer starting at "buf". On success, -// return the number of bytes read. Otherwise, return -1. -static ssize_t ReadFromOffset(const int fd, void *buf, const size_t count, - const off_t offset) { - off_t off = lseek(fd, offset, SEEK_SET); - if (off == (off_t)-1) { - ABSL_RAW_LOG(WARNING, "lseek(%d, %ju, SEEK_SET) failed: errno=%d", fd, - static_cast(offset), errno); - return -1; - } - return ReadPersistent(fd, buf, count); -} - -// Try reading exactly "count" bytes from "offset" bytes in a file -// pointed by "fd" into the buffer starting at "buf" while handling -// short reads and EINTR. On success, return true. Otherwise, return -// false. -static bool ReadFromOffsetExact(const int fd, void *buf, const size_t count, - const off_t offset) { - ssize_t len = ReadFromOffset(fd, buf, count, offset); - return len >= 0 && static_cast(len) == count; -} - -// Returns elf_header.e_type if the file pointed by fd is an ELF binary. -static int FileGetElfType(const int fd) { - ElfW(Ehdr) elf_header; - if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) { - return -1; - } - if (memcmp(elf_header.e_ident, ELFMAG, SELFMAG) != 0) { - return -1; - } - return elf_header.e_type; -} - -// Read the section headers in the given ELF binary, and if a section -// of the specified type is found, set the output to this section header -// and return true. Otherwise, return false. -// To keep stack consumption low, we would like this function to not get -// inlined. -static ABSL_ATTRIBUTE_NOINLINE bool GetSectionHeaderByType( - const int fd, ElfW(Half) sh_num, const off_t sh_offset, ElfW(Word) type, - ElfW(Shdr) * out, char *tmp_buf, int tmp_buf_size) { - ElfW(Shdr) *buf = reinterpret_cast(tmp_buf); - const int buf_entries = tmp_buf_size / sizeof(buf[0]); - const int buf_bytes = buf_entries * sizeof(buf[0]); - - for (int i = 0; i < sh_num;) { - const ssize_t num_bytes_left = (sh_num - i) * sizeof(buf[0]); - const ssize_t num_bytes_to_read = - (buf_bytes > num_bytes_left) ? num_bytes_left : buf_bytes; - const off_t offset = sh_offset + i * sizeof(buf[0]); - const ssize_t len = ReadFromOffset(fd, buf, num_bytes_to_read, offset); - if (len % sizeof(buf[0]) != 0) { - ABSL_RAW_LOG( - WARNING, - "Reading %zd bytes from offset %ju returned %zd which is not a " - "multiple of %zu.", - num_bytes_to_read, static_cast(offset), len, - sizeof(buf[0])); - return false; - } - const ssize_t num_headers_in_buf = len / sizeof(buf[0]); - SAFE_ASSERT(num_headers_in_buf <= buf_entries); - for (int j = 0; j < num_headers_in_buf; ++j) { - if (buf[j].sh_type == type) { - *out = buf[j]; - return true; - } - } - i += num_headers_in_buf; - } - return false; -} - -// There is no particular reason to limit section name to 63 characters, -// but there has (as yet) been no need for anything longer either. -const int kMaxSectionNameLen = 64; - -bool ForEachSection(int fd, - const std::function &callback) { - ElfW(Ehdr) elf_header; - if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) { - return false; - } - - ElfW(Shdr) shstrtab; - off_t shstrtab_offset = - (elf_header.e_shoff + elf_header.e_shentsize * elf_header.e_shstrndx); - if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) { - return false; - } - - for (int i = 0; i < elf_header.e_shnum; ++i) { - ElfW(Shdr) out; - off_t section_header_offset = - (elf_header.e_shoff + elf_header.e_shentsize * i); - if (!ReadFromOffsetExact(fd, &out, sizeof(out), section_header_offset)) { - return false; - } - off_t name_offset = shstrtab.sh_offset + out.sh_name; - char header_name[kMaxSectionNameLen]; - ssize_t n_read = - ReadFromOffset(fd, &header_name, kMaxSectionNameLen, name_offset); - if (n_read == -1) { - return false; - } else if (n_read > kMaxSectionNameLen) { - // Long read? - return false; - } - - absl::string_view name(header_name, strnlen(header_name, n_read)); - if (!callback(name, out)) { - break; - } - } - return true; -} - -// name_len should include terminating '\0'. -bool GetSectionHeaderByName(int fd, const char *name, size_t name_len, - ElfW(Shdr) * out) { - char header_name[kMaxSectionNameLen]; - if (sizeof(header_name) < name_len) { - ABSL_RAW_LOG(WARNING, - "Section name '%s' is too long (%zu); " - "section will not be found (even if present).", - name, name_len); - // No point in even trying. - return false; - } - - ElfW(Ehdr) elf_header; - if (!ReadFromOffsetExact(fd, &elf_header, sizeof(elf_header), 0)) { - return false; - } - - ElfW(Shdr) shstrtab; - off_t shstrtab_offset = - (elf_header.e_shoff + elf_header.e_shentsize * elf_header.e_shstrndx); - if (!ReadFromOffsetExact(fd, &shstrtab, sizeof(shstrtab), shstrtab_offset)) { - return false; - } - - for (int i = 0; i < elf_header.e_shnum; ++i) { - off_t section_header_offset = - (elf_header.e_shoff + elf_header.e_shentsize * i); - if (!ReadFromOffsetExact(fd, out, sizeof(*out), section_header_offset)) { - return false; - } - off_t name_offset = shstrtab.sh_offset + out->sh_name; - ssize_t n_read = ReadFromOffset(fd, &header_name, name_len, name_offset); - if (n_read < 0) { - return false; - } else if (static_cast(n_read) != name_len) { - // Short read -- name could be at end of file. - continue; - } - if (memcmp(header_name, name, name_len) == 0) { - return true; - } - } - return false; -} - -// Compare symbols at in the same address. -// Return true if we should pick symbol1. -static bool ShouldPickFirstSymbol(const ElfW(Sym) & symbol1, - const ElfW(Sym) & symbol2) { - // If one of the symbols is weak and the other is not, pick the one - // this is not a weak symbol. - char bind1 = ELF_ST_BIND(symbol1.st_info); - char bind2 = ELF_ST_BIND(symbol1.st_info); - if (bind1 == STB_WEAK && bind2 != STB_WEAK) return false; - if (bind2 == STB_WEAK && bind1 != STB_WEAK) return true; - - // If one of the symbols has zero size and the other is not, pick the - // one that has non-zero size. - if (symbol1.st_size != 0 && symbol2.st_size == 0) { - return true; - } - if (symbol1.st_size == 0 && symbol2.st_size != 0) { - return false; - } - - // If one of the symbols has no type and the other is not, pick the - // one that has a type. - char type1 = ELF_ST_TYPE(symbol1.st_info); - char type2 = ELF_ST_TYPE(symbol1.st_info); - if (type1 != STT_NOTYPE && type2 == STT_NOTYPE) { - return true; - } - if (type1 == STT_NOTYPE && type2 != STT_NOTYPE) { - return false; - } - - // Pick the first one, if we still cannot decide. - return true; -} - -// Return true if an address is inside a section. -static bool InSection(const void *address, const ElfW(Shdr) * section) { - const char *start = reinterpret_cast(section->sh_addr); - size_t size = static_cast(section->sh_size); - return start <= address && address < (start + size); -} - -static const char *ComputeOffset(const char *base, ptrdiff_t offset) { - // Note: cast to uintptr_t to avoid undefined behavior when base evaluates to - // zero and offset is non-zero. - return reinterpret_cast( - reinterpret_cast(base) + offset); -} - -// Read a symbol table and look for the symbol containing the -// pc. Iterate over symbols in a symbol table and look for the symbol -// containing "pc". If the symbol is found, and its name fits in -// out_size, the name is written into out and SYMBOL_FOUND is returned. -// If the name does not fit, truncated name is written into out, -// and SYMBOL_TRUNCATED is returned. Out is NUL-terminated. -// If the symbol is not found, SYMBOL_NOT_FOUND is returned; -// To keep stack consumption low, we would like this function to not get -// inlined. -static ABSL_ATTRIBUTE_NOINLINE FindSymbolResult FindSymbol( - const void *const pc, const int fd, char *out, int out_size, - ptrdiff_t relocation, const ElfW(Shdr) * strtab, const ElfW(Shdr) * symtab, - const ElfW(Shdr) * opd, char *tmp_buf, int tmp_buf_size) { - if (symtab == nullptr) { - return SYMBOL_NOT_FOUND; - } - - // Read multiple symbols at once to save read() calls. - ElfW(Sym) *buf = reinterpret_cast(tmp_buf); - const int buf_entries = tmp_buf_size / sizeof(buf[0]); - - const int num_symbols = symtab->sh_size / symtab->sh_entsize; - - // On platforms using an .opd section (PowerPC & IA64), a function symbol - // has the address of a function descriptor, which contains the real - // starting address. However, we do not always want to use the real - // starting address because we sometimes want to symbolize a function - // pointer into the .opd section, e.g. FindSymbol(&foo,...). - const bool pc_in_opd = - kPlatformUsesOPDSections && opd != nullptr && InSection(pc, opd); - const bool deref_function_descriptor_pointer = - kPlatformUsesOPDSections && opd != nullptr && !pc_in_opd; - - ElfW(Sym) best_match; - SafeMemZero(&best_match, sizeof(best_match)); - bool found_match = false; - for (int i = 0; i < num_symbols;) { - off_t offset = symtab->sh_offset + i * symtab->sh_entsize; - const int num_remaining_symbols = num_symbols - i; - const int entries_in_chunk = std::min(num_remaining_symbols, buf_entries); - const int bytes_in_chunk = entries_in_chunk * sizeof(buf[0]); - const ssize_t len = ReadFromOffset(fd, buf, bytes_in_chunk, offset); - SAFE_ASSERT(len % sizeof(buf[0]) == 0); - const ssize_t num_symbols_in_buf = len / sizeof(buf[0]); - SAFE_ASSERT(num_symbols_in_buf <= entries_in_chunk); - for (int j = 0; j < num_symbols_in_buf; ++j) { - const ElfW(Sym) &symbol = buf[j]; - - // For a DSO, a symbol address is relocated by the loading address. - // We keep the original address for opd redirection below. - const char *const original_start_address = - reinterpret_cast(symbol.st_value); - const char *start_address = - ComputeOffset(original_start_address, relocation); - -#ifdef __arm__ - // ARM functions are always aligned to multiples of two bytes; the - // lowest-order bit in start_address is ignored by the CPU and indicates - // whether the function contains ARM (0) or Thumb (1) code. We don't care - // about what encoding is being used; we just want the real start address - // of the function. - start_address = reinterpret_cast( - reinterpret_cast(start_address) & ~1); -#endif - - if (deref_function_descriptor_pointer && - InSection(original_start_address, opd)) { - // The opd section is mapped into memory. Just dereference - // start_address to get the first double word, which points to the - // function entry. - start_address = *reinterpret_cast(start_address); - } - - // If pc is inside the .opd section, it points to a function descriptor. - const size_t size = pc_in_opd ? kFunctionDescriptorSize : symbol.st_size; - const void *const end_address = ComputeOffset(start_address, size); - if (symbol.st_value != 0 && // Skip null value symbols. - symbol.st_shndx != 0 && // Skip undefined symbols. -#ifdef STT_TLS - ELF_ST_TYPE(symbol.st_info) != STT_TLS && // Skip thread-local data. -#endif // STT_TLS - ((start_address <= pc && pc < end_address) || - (start_address == pc && pc == end_address))) { - if (!found_match || ShouldPickFirstSymbol(symbol, best_match)) { - found_match = true; - best_match = symbol; - } - } - } - i += num_symbols_in_buf; - } - - if (found_match) { - const size_t off = strtab->sh_offset + best_match.st_name; - const ssize_t n_read = ReadFromOffset(fd, out, out_size, off); - if (n_read <= 0) { - // This should never happen. - ABSL_RAW_LOG(WARNING, - "Unable to read from fd %d at offset %zu: n_read = %zd", fd, - off, n_read); - return SYMBOL_NOT_FOUND; - } - ABSL_RAW_CHECK(n_read <= out_size, "ReadFromOffset read too much data."); - - // strtab->sh_offset points into .strtab-like section that contains - // NUL-terminated strings: '\0foo\0barbaz\0...". - // - // sh_offset+st_name points to the start of symbol name, but we don't know - // how long the symbol is, so we try to read as much as we have space for, - // and usually over-read (i.e. there is a NUL somewhere before n_read). - if (memchr(out, '\0', n_read) == nullptr) { - // Either out_size was too small (n_read == out_size and no NUL), or - // we tried to read past the EOF (n_read < out_size) and .strtab is - // corrupt (missing terminating NUL; should never happen for valid ELF). - out[n_read - 1] = '\0'; - return SYMBOL_TRUNCATED; - } - return SYMBOL_FOUND; - } - - return SYMBOL_NOT_FOUND; -} - -// Get the symbol name of "pc" from the file pointed by "fd". Process -// both regular and dynamic symbol tables if necessary. -// See FindSymbol() comment for description of return value. -FindSymbolResult Symbolizer::GetSymbolFromObjectFile( - const ObjFile &obj, const void *const pc, const ptrdiff_t relocation, - char *out, int out_size, char *tmp_buf, int tmp_buf_size) { - ElfW(Shdr) symtab; - ElfW(Shdr) strtab; - ElfW(Shdr) opd; - ElfW(Shdr) *opd_ptr = nullptr; - - // On platforms using an .opd sections for function descriptor, read - // the section header. The .opd section is in data segment and should be - // loaded but we check that it is mapped just to be extra careful. - if (kPlatformUsesOPDSections) { - if (GetSectionHeaderByName(obj.fd, kOpdSectionName, - sizeof(kOpdSectionName) - 1, &opd) && - FindObjFile(reinterpret_cast(opd.sh_addr) + relocation, - opd.sh_size) != nullptr) { - opd_ptr = &opd; - } else { - return SYMBOL_NOT_FOUND; - } - } - - // Consult a regular symbol table, then fall back to the dynamic symbol table. - for (const auto symbol_table_type : {SHT_SYMTAB, SHT_DYNSYM}) { - if (!GetSectionHeaderByType(obj.fd, obj.elf_header.e_shnum, - obj.elf_header.e_shoff, symbol_table_type, - &symtab, tmp_buf, tmp_buf_size)) { - continue; - } - if (!ReadFromOffsetExact( - obj.fd, &strtab, sizeof(strtab), - obj.elf_header.e_shoff + symtab.sh_link * sizeof(symtab))) { - continue; - } - const FindSymbolResult rc = - FindSymbol(pc, obj.fd, out, out_size, relocation, &strtab, &symtab, - opd_ptr, tmp_buf, tmp_buf_size); - if (rc != SYMBOL_NOT_FOUND) { - return rc; - } - } - - return SYMBOL_NOT_FOUND; -} - -namespace { -// Thin wrapper around a file descriptor so that the file descriptor -// gets closed for sure. -class FileDescriptor { - public: - explicit FileDescriptor(int fd) : fd_(fd) {} - FileDescriptor(const FileDescriptor &) = delete; - FileDescriptor &operator=(const FileDescriptor &) = delete; - - ~FileDescriptor() { - if (fd_ >= 0) { - NO_INTR(close(fd_)); - } - } - - int get() const { return fd_; } - - private: - const int fd_; -}; - -// Helper class for reading lines from file. -// -// Note: we don't use ProcMapsIterator since the object is big (it has -// a 5k array member) and uses async-unsafe functions such as sscanf() -// and snprintf(). -class LineReader { - public: - explicit LineReader(int fd, char *buf, int buf_len) - : fd_(fd), - buf_len_(buf_len), - buf_(buf), - bol_(buf), - eol_(buf), - eod_(buf) {} - - LineReader(const LineReader &) = delete; - LineReader &operator=(const LineReader &) = delete; - - // Read '\n'-terminated line from file. On success, modify "bol" - // and "eol", then return true. Otherwise, return false. - // - // Note: if the last line doesn't end with '\n', the line will be - // dropped. It's an intentional behavior to make the code simple. - bool ReadLine(const char **bol, const char **eol) { - if (BufferIsEmpty()) { // First time. - const ssize_t num_bytes = ReadPersistent(fd_, buf_, buf_len_); - if (num_bytes <= 0) { // EOF or error. - return false; - } - eod_ = buf_ + num_bytes; - bol_ = buf_; - } else { - bol_ = eol_ + 1; // Advance to the next line in the buffer. - SAFE_ASSERT(bol_ <= eod_); // "bol_" can point to "eod_". - if (!HasCompleteLine()) { - const int incomplete_line_length = eod_ - bol_; - // Move the trailing incomplete line to the beginning. - memmove(buf_, bol_, incomplete_line_length); - // Read text from file and append it. - char *const append_pos = buf_ + incomplete_line_length; - const int capacity_left = buf_len_ - incomplete_line_length; - const ssize_t num_bytes = - ReadPersistent(fd_, append_pos, capacity_left); - if (num_bytes <= 0) { // EOF or error. - return false; - } - eod_ = append_pos + num_bytes; - bol_ = buf_; - } - } - eol_ = FindLineFeed(); - if (eol_ == nullptr) { // '\n' not found. Malformed line. - return false; - } - *eol_ = '\0'; // Replace '\n' with '\0'. - - *bol = bol_; - *eol = eol_; - return true; - } - - private: - char *FindLineFeed() const { - return reinterpret_cast(memchr(bol_, '\n', eod_ - bol_)); - } - - bool BufferIsEmpty() const { return buf_ == eod_; } - - bool HasCompleteLine() const { - return !BufferIsEmpty() && FindLineFeed() != nullptr; - } - - const int fd_; - const int buf_len_; - char *const buf_; - char *bol_; - char *eol_; - const char *eod_; // End of data in "buf_". -}; -} // namespace - -// Place the hex number read from "start" into "*hex". The pointer to -// the first non-hex character or "end" is returned. -static const char *GetHex(const char *start, const char *end, - uint64_t *const value) { - uint64_t hex = 0; - const char *p; - for (p = start; p < end; ++p) { - int ch = *p; - if ((ch >= '0' && ch <= '9') || (ch >= 'A' && ch <= 'F') || - (ch >= 'a' && ch <= 'f')) { - hex = (hex << 4) | (ch < 'A' ? ch - '0' : (ch & 0xF) + 9); - } else { // Encountered the first non-hex character. - break; - } - } - SAFE_ASSERT(p <= end); - *value = hex; - return p; -} - -static const char *GetHex(const char *start, const char *end, - const void **const addr) { - uint64_t hex = 0; - const char *p = GetHex(start, end, &hex); - *addr = reinterpret_cast(hex); - return p; -} - -// Normally we are only interested in "r?x" maps. -// On the PowerPC, function pointers point to descriptors in the .opd -// section. The descriptors themselves are not executable code, so -// we need to relax the check below to "r??". -static bool ShouldUseMapping(const char *const flags) { - return flags[0] == 'r' && (kPlatformUsesOPDSections || flags[2] == 'x'); -} - -// Read /proc/self/maps and run "callback" for each mmapped file found. If -// "callback" returns false, stop scanning and return true. Else continue -// scanning /proc/self/maps. Return true if no parse error is found. -static ABSL_ATTRIBUTE_NOINLINE bool ReadAddrMap( - bool (*callback)(const char *filename, const void *const start_addr, - const void *const end_addr, uint64_t offset, void *arg), - void *arg, void *tmp_buf, int tmp_buf_size) { - // Use /proc/self/task//maps instead of /proc/self/maps. The latter - // requires kernel to stop all threads, and is significantly slower when there - // are 1000s of threads. - char maps_path[80]; - snprintf(maps_path, sizeof(maps_path), "/proc/self/task/%d/maps", getpid()); - - int maps_fd; - NO_INTR(maps_fd = open(maps_path, O_RDONLY)); - FileDescriptor wrapped_maps_fd(maps_fd); - if (wrapped_maps_fd.get() < 0) { - ABSL_RAW_LOG(WARNING, "%s: errno=%d", maps_path, errno); - return false; - } - - // Iterate over maps and look for the map containing the pc. Then - // look into the symbol tables inside. - LineReader reader(wrapped_maps_fd.get(), static_cast(tmp_buf), - tmp_buf_size); - while (true) { - const char *cursor; - const char *eol; - if (!reader.ReadLine(&cursor, &eol)) { // EOF or malformed line. - break; - } - - const char *line = cursor; - const void *start_address; - // Start parsing line in /proc/self/maps. Here is an example: - // - // 08048000-0804c000 r-xp 00000000 08:01 2142121 /bin/cat - // - // We want start address (08048000), end address (0804c000), flags - // (r-xp) and file name (/bin/cat). - - // Read start address. - cursor = GetHex(cursor, eol, &start_address); - if (cursor == eol || *cursor != '-') { - ABSL_RAW_LOG(WARNING, "Corrupt /proc/self/maps line: %s", line); - return false; - } - ++cursor; // Skip '-'. - - // Read end address. - const void *end_address; - cursor = GetHex(cursor, eol, &end_address); - if (cursor == eol || *cursor != ' ') { - ABSL_RAW_LOG(WARNING, "Corrupt /proc/self/maps line: %s", line); - return false; - } - ++cursor; // Skip ' '. - - // Read flags. Skip flags until we encounter a space or eol. - const char *const flags_start = cursor; - while (cursor < eol && *cursor != ' ') { - ++cursor; - } - // We expect at least four letters for flags (ex. "r-xp"). - if (cursor == eol || cursor < flags_start + 4) { - ABSL_RAW_LOG(WARNING, "Corrupt /proc/self/maps: %s", line); - return false; - } - - // Check flags. - if (!ShouldUseMapping(flags_start)) { - continue; // We skip this map. - } - ++cursor; // Skip ' '. - - // Read file offset. - uint64_t offset; - cursor = GetHex(cursor, eol, &offset); - ++cursor; // Skip ' '. - - // Skip to file name. "cursor" now points to dev. We need to skip at least - // two spaces for dev and inode. - int num_spaces = 0; - while (cursor < eol) { - if (*cursor == ' ') { - ++num_spaces; - } else if (num_spaces >= 2) { - // The first non-space character after skipping two spaces - // is the beginning of the file name. - break; - } - ++cursor; - } - - // Check whether this entry corresponds to our hint table for the true - // filename. - bool hinted = - GetFileMappingHint(&start_address, &end_address, &offset, &cursor); - if (!hinted && (cursor == eol || cursor[0] == '[')) { - // not an object file, typically [vdso] or [vsyscall] - continue; - } - if (!callback(cursor, start_address, end_address, offset, arg)) break; - } - return true; -} - -// Find the objfile mapped in address region containing [addr, addr + len). -ObjFile *Symbolizer::FindObjFile(const void *const addr, size_t len) { - for (int i = 0; i < 2; ++i) { - if (!ok_) return nullptr; - - // Read /proc/self/maps if necessary - if (!addr_map_read_) { - addr_map_read_ = true; - if (!ReadAddrMap(RegisterObjFile, this, tmp_buf_, TMP_BUF_SIZE)) { - ok_ = false; - return nullptr; - } - } - - int lo = 0; - int hi = addr_map_.Size(); - while (lo < hi) { - int mid = (lo + hi) / 2; - if (addr < addr_map_.At(mid)->end_addr) { - hi = mid; - } else { - lo = mid + 1; - } - } - if (lo != addr_map_.Size()) { - ObjFile *obj = addr_map_.At(lo); - SAFE_ASSERT(obj->end_addr > addr); - if (addr >= obj->start_addr && - reinterpret_cast(addr) + len <= obj->end_addr) - return obj; - } - - // The address mapping may have changed since it was last read. Retry. - ClearAddrMap(); - } - return nullptr; -} - -void Symbolizer::ClearAddrMap() { - for (int i = 0; i != addr_map_.Size(); i++) { - ObjFile *o = addr_map_.At(i); - base_internal::LowLevelAlloc::Free(o->filename); - if (o->fd >= 0) { - NO_INTR(close(o->fd)); - } - } - addr_map_.Clear(); - addr_map_read_ = false; -} - -// Callback for ReadAddrMap to register objfiles in an in-memory table. -bool Symbolizer::RegisterObjFile(const char *filename, - const void *const start_addr, - const void *const end_addr, uint64_t offset, - void *arg) { - Symbolizer *impl = static_cast(arg); - - // Files are supposed to be added in the increasing address order. Make - // sure that's the case. - int addr_map_size = impl->addr_map_.Size(); - if (addr_map_size != 0) { - ObjFile *old = impl->addr_map_.At(addr_map_size - 1); - if (old->end_addr > end_addr) { - ABSL_RAW_LOG(ERROR, - "Unsorted addr map entry: 0x%" PRIxPTR ": %s <-> 0x%" PRIxPTR - ": %s", - reinterpret_cast(end_addr), filename, - reinterpret_cast(old->end_addr), old->filename); - return true; - } else if (old->end_addr == end_addr) { - // The same entry appears twice. This sometimes happens for [vdso]. - if (old->start_addr != start_addr || - strcmp(old->filename, filename) != 0) { - ABSL_RAW_LOG(ERROR, - "Duplicate addr 0x%" PRIxPTR ": %s <-> 0x%" PRIxPTR ": %s", - reinterpret_cast(end_addr), filename, - reinterpret_cast(old->end_addr), old->filename); - } - return true; - } else if (old->end_addr == start_addr && - reinterpret_cast(old->start_addr) - old->offset == - reinterpret_cast(start_addr) - offset && - strcmp(old->filename, filename) == 0) { - // Two contiguous map entries that span a contiguous region of the file, - // perhaps because some part of the file was mlock()ed. Combine them. - old->end_addr = end_addr; - return true; - } - } - ObjFile *obj = impl->addr_map_.Add(); - obj->filename = impl->CopyString(filename); - obj->start_addr = start_addr; - obj->end_addr = end_addr; - obj->offset = offset; - obj->elf_type = -1; // filled on demand - obj->fd = -1; // opened on demand - return true; -} - -// This function wraps the Demangle function to provide an interface -// where the input symbol is demangled in-place. -// To keep stack consumption low, we would like this function to not -// get inlined. -static ABSL_ATTRIBUTE_NOINLINE void DemangleInplace(char *out, int out_size, - char *tmp_buf, - int tmp_buf_size) { - if (Demangle(out, tmp_buf, tmp_buf_size)) { - // Demangling succeeded. Copy to out if the space allows. - int len = strlen(tmp_buf); - if (len + 1 <= out_size) { // +1 for '\0'. - SAFE_ASSERT(len < tmp_buf_size); - memmove(out, tmp_buf, len + 1); - } - } -} - -SymbolCacheLine *Symbolizer::GetCacheLine(const void *const pc) { - uintptr_t pc0 = reinterpret_cast(pc); - pc0 >>= 3; // drop the low 3 bits - - // Shuffle bits. - pc0 ^= (pc0 >> 6) ^ (pc0 >> 12) ^ (pc0 >> 18); - return &symbol_cache_[pc0 % SYMBOL_CACHE_LINES]; -} - -void Symbolizer::AgeSymbols(SymbolCacheLine *line) { - for (uint32_t &age : line->age) { - ++age; - } -} - -const char *Symbolizer::FindSymbolInCache(const void *const pc) { - if (pc == nullptr) return nullptr; - - SymbolCacheLine *line = GetCacheLine(pc); - for (size_t i = 0; i < ABSL_ARRAYSIZE(line->pc); ++i) { - if (line->pc[i] == pc) { - AgeSymbols(line); - line->age[i] = 0; - return line->name[i]; - } - } - return nullptr; -} - -const char *Symbolizer::InsertSymbolInCache(const void *const pc, - const char *name) { - SAFE_ASSERT(pc != nullptr); - - SymbolCacheLine *line = GetCacheLine(pc); - uint32_t max_age = 0; - int oldest_index = -1; - for (size_t i = 0; i < ABSL_ARRAYSIZE(line->pc); ++i) { - if (line->pc[i] == nullptr) { - AgeSymbols(line); - line->pc[i] = pc; - line->name[i] = CopyString(name); - line->age[i] = 0; - return line->name[i]; - } - if (line->age[i] >= max_age) { - max_age = line->age[i]; - oldest_index = i; - } - } - - AgeSymbols(line); - ABSL_RAW_CHECK(oldest_index >= 0, "Corrupt cache"); - base_internal::LowLevelAlloc::Free(line->name[oldest_index]); - line->pc[oldest_index] = pc; - line->name[oldest_index] = CopyString(name); - line->age[oldest_index] = 0; - return line->name[oldest_index]; -} - -static void MaybeOpenFdFromSelfExe(ObjFile *obj) { - if (memcmp(obj->start_addr, ELFMAG, SELFMAG) != 0) { - return; - } - int fd = open("/proc/self/exe", O_RDONLY); - if (fd == -1) { - return; - } - // Verify that contents of /proc/self/exe matches in-memory image of - // the binary. This can fail if the "deleted" binary is in fact not - // the main executable, or for binaries that have the first PT_LOAD - // segment smaller than 4K. We do it in four steps so that the - // buffer is smaller and we don't consume too much stack space. - const char *mem = reinterpret_cast(obj->start_addr); - for (int i = 0; i < 4; ++i) { - char buf[1024]; - ssize_t n = read(fd, buf, sizeof(buf)); - if (n != sizeof(buf) || memcmp(buf, mem, sizeof(buf)) != 0) { - close(fd); - return; - } - mem += sizeof(buf); - } - obj->fd = fd; -} - -static bool MaybeInitializeObjFile(ObjFile *obj) { - if (obj->fd < 0) { - obj->fd = open(obj->filename, O_RDONLY); - - if (obj->fd < 0) { - // Getting /proc/self/exe here means that we were hinted. - if (strcmp(obj->filename, "/proc/self/exe") == 0) { - // /proc/self/exe may be inaccessible (due to setuid, etc.), so try - // accessing the binary via argv0. - if (argv0_value != nullptr) { - obj->fd = open(argv0_value, O_RDONLY); - } - } else { - MaybeOpenFdFromSelfExe(obj); - } - } - - if (obj->fd < 0) { - ABSL_RAW_LOG(WARNING, "%s: open failed: errno=%d", obj->filename, errno); - return false; - } - obj->elf_type = FileGetElfType(obj->fd); - if (obj->elf_type < 0) { - ABSL_RAW_LOG(WARNING, "%s: wrong elf type: %d", obj->filename, - obj->elf_type); - return false; - } - - if (!ReadFromOffsetExact(obj->fd, &obj->elf_header, sizeof(obj->elf_header), - 0)) { - ABSL_RAW_LOG(WARNING, "%s: failed to read elf header", obj->filename); - return false; - } - const int phnum = obj->elf_header.e_phnum; - const int phentsize = obj->elf_header.e_phentsize; - size_t phoff = obj->elf_header.e_phoff; - size_t num_executable_load_segments = 0; - for (int j = 0; j < phnum; j++) { - ElfW(Phdr) phdr; - if (!ReadFromOffsetExact(obj->fd, &phdr, sizeof(phdr), phoff)) { - ABSL_RAW_LOG(WARNING, "%s: failed to read program header %d", - obj->filename, j); - return false; - } - phoff += phentsize; - constexpr int rx = PF_X | PF_R; - if (phdr.p_type != PT_LOAD || (phdr.p_flags & rx) != rx) { - // Not a LOAD segment, or not executable code. - continue; - } - if (num_executable_load_segments < obj->phdr.size()) { - memcpy(&obj->phdr[num_executable_load_segments++], &phdr, sizeof(phdr)); - } else { - ABSL_RAW_LOG(WARNING, "%s: too many executable LOAD segments", - obj->filename); - break; - } - } - if (num_executable_load_segments == 0) { - // This object has no "r-x" LOAD segments. That's unexpected. - ABSL_RAW_LOG(WARNING, "%s: no executable LOAD segments", obj->filename); - return false; - } - } - return true; -} - -// The implementation of our symbolization routine. If it -// successfully finds the symbol containing "pc" and obtains the -// symbol name, returns pointer to that symbol. Otherwise, returns nullptr. -// If any symbol decorators have been installed via InstallSymbolDecorator(), -// they are called here as well. -// To keep stack consumption low, we would like this function to not -// get inlined. -const char *Symbolizer::GetUncachedSymbol(const void *pc) { - ObjFile *const obj = FindObjFile(pc, 1); - ptrdiff_t relocation = 0; - int fd = -1; - if (obj != nullptr) { - if (MaybeInitializeObjFile(obj)) { - const size_t start_addr = reinterpret_cast(obj->start_addr); - if (obj->elf_type == ET_DYN && start_addr >= obj->offset) { - // This object was relocated. - // - // For obj->offset > 0, adjust the relocation since a mapping at offset - // X in the file will have a start address of [true relocation]+X. - relocation = start_addr - obj->offset; - - // Note: some binaries have multiple "rx" LOAD segments. We must - // find the right one. - ElfW(Phdr) *phdr = nullptr; - for (size_t j = 0; j < obj->phdr.size(); j++) { - ElfW(Phdr) &p = obj->phdr[j]; - if (p.p_type != PT_LOAD) { - // We only expect PT_LOADs. This must be PT_NULL that we didn't - // write over (i.e. we exhausted all interesting PT_LOADs). - ABSL_RAW_CHECK(p.p_type == PT_NULL, "unexpected p_type"); - break; - } - if (pc < reinterpret_cast(start_addr + p.p_memsz)) { - phdr = &p; - break; - } - } - if (phdr == nullptr) { - // That's unexpected. Hope for the best. - ABSL_RAW_LOG( - WARNING, - "%s: unable to find LOAD segment for pc: %p, start_addr: %zx", - obj->filename, pc, start_addr); - } else { - // Adjust relocation in case phdr.p_vaddr != 0. - // This happens for binaries linked with `lld --rosegment`, and for - // binaries linked with BFD `ld -z separate-code`. - relocation -= phdr->p_vaddr - phdr->p_offset; - } - } - - fd = obj->fd; - if (GetSymbolFromObjectFile(*obj, pc, relocation, symbol_buf_, - sizeof(symbol_buf_), tmp_buf_, - sizeof(tmp_buf_)) == SYMBOL_FOUND) { - // Only try to demangle the symbol name if it fit into symbol_buf_. - DemangleInplace(symbol_buf_, sizeof(symbol_buf_), tmp_buf_, - sizeof(tmp_buf_)); - } - } - } else { -#if ABSL_HAVE_VDSO_SUPPORT - VDSOSupport vdso; - if (vdso.IsPresent()) { - VDSOSupport::SymbolInfo symbol_info; - if (vdso.LookupSymbolByAddress(pc, &symbol_info)) { - // All VDSO symbols are known to be short. - size_t len = strlen(symbol_info.name); - ABSL_RAW_CHECK(len + 1 < sizeof(symbol_buf_), - "VDSO symbol unexpectedly long"); - memcpy(symbol_buf_, symbol_info.name, len + 1); - } - } -#endif - } - - if (g_decorators_mu.TryLock()) { - if (g_num_decorators > 0) { - SymbolDecoratorArgs decorator_args = { - pc, relocation, fd, symbol_buf_, sizeof(symbol_buf_), - tmp_buf_, sizeof(tmp_buf_), nullptr}; - for (int i = 0; i < g_num_decorators; ++i) { - decorator_args.arg = g_decorators[i].arg; - g_decorators[i].fn(&decorator_args); - } - } - g_decorators_mu.Unlock(); - } - if (symbol_buf_[0] == '\0') { - return nullptr; - } - symbol_buf_[sizeof(symbol_buf_) - 1] = '\0'; // Paranoia. - return InsertSymbolInCache(pc, symbol_buf_); -} - -const char *Symbolizer::GetSymbol(const void *pc) { - const char *entry = FindSymbolInCache(pc); - if (entry != nullptr) { - return entry; - } - symbol_buf_[0] = '\0'; - -#ifdef __hppa__ - { - // In some contexts (e.g., return addresses), PA-RISC uses the lowest two - // bits of the address to indicate the privilege level. Clear those bits - // before trying to symbolize. - const auto pc_bits = reinterpret_cast(pc); - const auto address = pc_bits & ~0x3; - entry = GetUncachedSymbol(reinterpret_cast(address)); - if (entry != nullptr) { - return entry; - } - - // In some contexts, PA-RISC also uses bit 1 of the address to indicate that - // this is a cross-DSO function pointer. Such function pointers actually - // point to a procedure label, a struct whose first 32-bit (pointer) element - // actually points to the function text. With no symbol found for this - // address so far, try interpreting it as a cross-DSO function pointer and - // see how that goes. - if (pc_bits & 0x2) { - return GetUncachedSymbol(*reinterpret_cast(address)); - } - - return nullptr; - } -#else - return GetUncachedSymbol(pc); -#endif -} - -bool RemoveAllSymbolDecorators(void) { - if (!g_decorators_mu.TryLock()) { - // Someone else is using decorators. Get out. - return false; - } - g_num_decorators = 0; - g_decorators_mu.Unlock(); - return true; -} - -bool RemoveSymbolDecorator(int ticket) { - if (!g_decorators_mu.TryLock()) { - // Someone else is using decorators. Get out. - return false; - } - for (int i = 0; i < g_num_decorators; ++i) { - if (g_decorators[i].ticket == ticket) { - while (i < g_num_decorators - 1) { - g_decorators[i] = g_decorators[i + 1]; - ++i; - } - g_num_decorators = i; - break; - } - } - g_decorators_mu.Unlock(); - return true; // Decorator is known to be removed. -} - -int InstallSymbolDecorator(SymbolDecorator decorator, void *arg) { - static int ticket = 0; - - if (!g_decorators_mu.TryLock()) { - // Someone else is using decorators. Get out. - return -2; - } - int ret = ticket; - if (g_num_decorators >= kMaxDecorators) { - ret = -1; - } else { - g_decorators[g_num_decorators] = {decorator, arg, ticket++}; - ++g_num_decorators; - } - g_decorators_mu.Unlock(); - return ret; -} - -bool RegisterFileMappingHint(const void *start, const void *end, uint64_t offset, - const char *filename) { - SAFE_ASSERT(start <= end); - SAFE_ASSERT(filename != nullptr); - - InitSigSafeArena(); - - if (!g_file_mapping_mu.TryLock()) { - return false; - } - - bool ret = true; - if (g_num_file_mapping_hints >= kMaxFileMappingHints) { - ret = false; - } else { - // TODO(ckennelly): Move this into a string copy routine. - int len = strlen(filename); - char *dst = static_cast( - base_internal::LowLevelAlloc::AllocWithArena(len + 1, SigSafeArena())); - ABSL_RAW_CHECK(dst != nullptr, "out of memory"); - memcpy(dst, filename, len + 1); - - auto &hint = g_file_mapping_hints[g_num_file_mapping_hints++]; - hint.start = start; - hint.end = end; - hint.offset = offset; - hint.filename = dst; - } - - g_file_mapping_mu.Unlock(); - return ret; -} - -bool GetFileMappingHint(const void **start, const void **end, uint64_t *offset, - const char **filename) { - if (!g_file_mapping_mu.TryLock()) { - return false; - } - bool found = false; - for (int i = 0; i < g_num_file_mapping_hints; i++) { - if (g_file_mapping_hints[i].start <= *start && - *end <= g_file_mapping_hints[i].end) { - // We assume that the start_address for the mapping is the base - // address of the ELF section, but when [start_address,end_address) is - // not strictly equal to [hint.start, hint.end), that assumption is - // invalid. - // - // This uses the hint's start address (even though hint.start is not - // necessarily equal to start_address) to ensure the correct - // relocation is computed later. - *start = g_file_mapping_hints[i].start; - *end = g_file_mapping_hints[i].end; - *offset = g_file_mapping_hints[i].offset; - *filename = g_file_mapping_hints[i].filename; - found = true; - break; - } - } - g_file_mapping_mu.Unlock(); - return found; -} - -} // namespace debugging_internal - -bool Symbolize(const void *pc, char *out, int out_size) { - // Symbolization is very slow under tsan. - ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN(); - SAFE_ASSERT(out_size >= 0); - debugging_internal::Symbolizer *s = debugging_internal::AllocateSymbolizer(); - const char *name = s->GetSymbol(pc); - bool ok = false; - if (name != nullptr && out_size > 0) { - strncpy(out, name, out_size); - ok = true; - if (out[out_size - 1] != '\0') { - // strncpy() does not '\0' terminate when it truncates. Do so, with - // trailing ellipsis. - static constexpr char kEllipsis[] = "..."; - int ellipsis_size = - std::min(implicit_cast(strlen(kEllipsis)), out_size - 1); - memcpy(out + out_size - ellipsis_size - 1, kEllipsis, ellipsis_size); - out[out_size - 1] = '\0'; - } - } - debugging_internal::FreeSymbolizer(s); - ABSL_ANNOTATE_IGNORE_READS_AND_WRITES_END(); - return ok; -} - -ABSL_NAMESPACE_END -} // namespace absl - -extern "C" bool AbslInternalGetFileMappingHint(const void **start, - const void **end, uint64_t *offset, - const char **filename) { - return absl::debugging_internal::GetFileMappingHint(start, end, offset, - filename); -} diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_emscripten.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_emscripten.inc deleted file mode 100644 index c226c45..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_emscripten.inc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include -#include - -#include -#include - -#include "absl/base/internal/raw_logging.h" -#include "absl/debugging/internal/demangle.h" -#include "absl/strings/numbers.h" -#include "absl/strings/str_cat.h" -#include "absl/strings/string_view.h" - -extern "C" { -const char* emscripten_pc_get_function(const void* pc); -} - -// clang-format off -EM_JS(bool, HaveOffsetConverter, (), - { return typeof wasmOffsetConverter !== 'undefined'; }); -// clang-format on - -namespace absl { -ABSL_NAMESPACE_BEGIN - -void InitializeSymbolizer(const char*) { - if (!HaveOffsetConverter()) { - ABSL_RAW_LOG(INFO, - "Symbolization unavailable. Rebuild with -sWASM=1 " - "and -sUSE_OFFSET_CONVERTER=1."); - } -} - -bool Symbolize(const void* pc, char* out, int out_size) { - // Check if we have the offset converter necessary for pc_get_function. - // Without it, the program will abort(). - if (!HaveOffsetConverter()) { - return false; - } - const char* func_name = emscripten_pc_get_function(pc); - if (func_name == nullptr) { - return false; - } - - strncpy(out, func_name, out_size); - - if (out[out_size - 1] != '\0') { - // strncpy() does not '\0' terminate when it truncates. - static constexpr char kEllipsis[] = "..."; - int ellipsis_size = std::min(sizeof(kEllipsis) - 1, out_size - 1); - memcpy(out + out_size - ellipsis_size - 1, kEllipsis, ellipsis_size); - out[out_size - 1] = '\0'; - } - - return true; -} - -ABSL_NAMESPACE_END -} // namespace absl diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_unimplemented.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_unimplemented.inc deleted file mode 100644 index db24456..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_unimplemented.inc +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include - -#include "absl/base/internal/raw_logging.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -namespace debugging_internal { - -int InstallSymbolDecorator(SymbolDecorator, void*) { return -1; } -bool RemoveSymbolDecorator(int) { return false; } -bool RemoveAllSymbolDecorators(void) { return false; } -bool RegisterFileMappingHint(const void *, const void *, uint64_t, const char *) { - return false; -} -bool GetFileMappingHint(const void **, const void **, uint64_t *, const char **) { - return false; -} - -} // namespace debugging_internal - -void InitializeSymbolizer(const char*) {} -bool Symbolize(const void *, char *, int) { return false; } - -ABSL_NAMESPACE_END -} // namespace absl diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_win32.inc b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_win32.inc deleted file mode 100644 index c3df46f..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/debugging/symbolize_win32.inc +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// See "Retrieving Symbol Information by Address": -// https://msdn.microsoft.com/en-us/library/windows/desktop/ms680578(v=vs.85).aspx - -#include - -// MSVC header dbghelp.h has a warning for an ignored typedef. -#pragma warning(push) -#pragma warning(disable:4091) -#include -#pragma warning(pop) - -#pragma comment(lib, "dbghelp.lib") - -#include -#include - -#include "absl/base/internal/raw_logging.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -static HANDLE process = NULL; - -void InitializeSymbolizer(const char*) { - if (process != nullptr) { - return; - } - process = GetCurrentProcess(); - - // Symbols are not loaded until a reference is made requiring the - // symbols be loaded. This is the fastest, most efficient way to use - // the symbol handler. - SymSetOptions(SYMOPT_DEFERRED_LOADS | SYMOPT_UNDNAME); - if (!SymInitialize(process, nullptr, true)) { - // GetLastError() returns a Win32 DWORD, but we assign to - // unsigned long long to simplify the ABSL_RAW_LOG case below. The uniform - // initialization guarantees this is not a narrowing conversion. - const unsigned long long error{GetLastError()}; // NOLINT(runtime/int) - ABSL_RAW_LOG(FATAL, "SymInitialize() failed: %llu", error); - } -} - -bool Symbolize(const void* pc, char* out, int out_size) { - if (out_size <= 0) { - return false; - } - alignas(SYMBOL_INFO) char buf[sizeof(SYMBOL_INFO) + MAX_SYM_NAME]; - SYMBOL_INFO* symbol = reinterpret_cast(buf); - symbol->SizeOfStruct = sizeof(SYMBOL_INFO); - symbol->MaxNameLen = MAX_SYM_NAME; - if (!SymFromAddr(process, reinterpret_cast(pc), nullptr, symbol)) { - return false; - } - strncpy(out, symbol->Name, out_size); - if (out[out_size - 1] != '\0') { - // strncpy() does not '\0' terminate when it truncates. - static constexpr char kEllipsis[] = "..."; - int ellipsis_size = - std::min(sizeof(kEllipsis) - 1, out_size - 1); - memcpy(out + out_size - ellipsis_size - 1, kEllipsis, ellipsis_size); - out[out_size - 1] = '\0'; - } - return true; -} - -ABSL_NAMESPACE_END -} // namespace absl diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/any_invocable.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/any_invocable.h deleted file mode 100644 index 0c5faca..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/any_invocable.h +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright 2022 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: any_invocable.h -// ----------------------------------------------------------------------------- -// -// This header file defines an `absl::AnyInvocable` type that assumes ownership -// and wraps an object of an invocable type. (Invocable types adhere to the -// concept specified in https://en.cppreference.com/w/cpp/concepts/invocable.) -// -// In general, prefer `absl::AnyInvocable` when you need a type-erased -// function parameter that needs to take ownership of the type. -// -// NOTE: `absl::AnyInvocable` is similar to the C++23 `std::move_only_function` -// abstraction, but has a slightly different API and is not designed to be a -// drop-in replacement or C++11-compatible backfill of that type. - -#ifndef ABSL_FUNCTIONAL_ANY_INVOCABLE_H_ -#define ABSL_FUNCTIONAL_ANY_INVOCABLE_H_ - -#include -#include -#include -#include - -#include "absl/base/config.h" -#include "absl/functional/internal/any_invocable.h" -#include "absl/meta/type_traits.h" -#include "absl/utility/utility.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// absl::AnyInvocable -// -// `absl::AnyInvocable` is a functional wrapper type, like `std::function`, that -// assumes ownership of an invocable object. Unlike `std::function`, an -// `absl::AnyInvocable` is more type-safe and provides the following additional -// benefits: -// -// * Properly adheres to const correctness of the underlying type -// * Is move-only so avoids concurrency problems with copied invocables and -// unnecessary copies in general. -// * Supports reference qualifiers allowing it to perform unique actions (noted -// below). -// -// `absl::AnyInvocable` is a template, and an `absl::AnyInvocable` instantiation -// may wrap any invocable object with a compatible function signature, e.g. -// having arguments and return types convertible to types matching the -// `absl::AnyInvocable` signature, and also matching any stated reference -// qualifiers, as long as that type is moveable. It therefore provides broad -// type erasure for functional objects. -// -// An `absl::AnyInvocable` is typically used as a type-erased function parameter -// for accepting various functional objects: -// -// // Define a function taking an AnyInvocable parameter. -// void my_func(absl::AnyInvocable f) { -// ... -// }; -// -// // That function can accept any invocable type: -// -// // Accept a function reference. We don't need to move a reference. -// int func1() { return 0; }; -// my_func(func1); -// -// // Accept a lambda. We use std::move here because otherwise my_func would -// // copy the lambda. -// auto lambda = []() { return 0; }; -// my_func(std::move(lambda)); -// -// // Accept a function pointer. We don't need to move a function pointer. -// func2 = &func1; -// my_func(func2); -// -// // Accept an std::function by moving it. Note that the lambda is copyable -// // (satisfying std::function requirements) and moveable (satisfying -// // absl::AnyInvocable requirements). -// std::function func6 = []() { return 0; }; -// my_func(std::move(func6)); -// -// `AnyInvocable` also properly respects `const` qualifiers, reference -// qualifiers, and the `noexcept` specification (only in C++ 17 and beyond) as -// part of the user-specified function type (e.g. -// `AnyInvocable`). These qualifiers will be applied to -// the `AnyInvocable` object's `operator()`, and the underlying invocable must -// be compatible with those qualifiers. -// -// Comparison of const and non-const function types: -// -// // Store a closure inside of `func` with the function type `int()`. -// // Note that we have made `func` itself `const`. -// const AnyInvocable func = [](){ return 0; }; -// -// func(); // Compile-error: the passed type `int()` isn't `const`. -// -// // Store a closure inside of `const_func` with the function type -// // `int() const`. -// // Note that we have also made `const_func` itself `const`. -// const AnyInvocable const_func = [](){ return 0; }; -// -// const_func(); // Fine: `int() const` is `const`. -// -// In the above example, the call `func()` would have compiled if -// `std::function` were used even though the types are not const compatible. -// This is a bug, and using `absl::AnyInvocable` properly detects that bug. -// -// In addition to affecting the signature of `operator()`, the `const` and -// reference qualifiers of the function type also appropriately constrain which -// kinds of invocable objects you are allowed to place into the `AnyInvocable` -// instance. If you specify a function type that is const-qualified, then -// anything that you attempt to put into the `AnyInvocable` must be callable on -// a `const` instance of that type. -// -// Constraint example: -// -// // Fine because the lambda is callable when `const`. -// AnyInvocable func = [=](){ return 0; }; -// -// // This is a compile-error because the lambda isn't callable when `const`. -// AnyInvocable error = [=]() mutable { return 0; }; -// -// An `&&` qualifier can be used to express that an `absl::AnyInvocable` -// instance should be invoked at most once: -// -// // Invokes `continuation` with the logical result of an operation when -// // that operation completes (common in asynchronous code). -// void CallOnCompletion(AnyInvocable continuation) { -// int result_of_foo = foo(); -// -// // `std::move` is required because the `operator()` of `continuation` is -// // rvalue-reference qualified. -// std::move(continuation)(result_of_foo); -// } -// -// Credits to Matt Calabrese (https://github.com/mattcalabrese) for the original -// implementation. -template -class AnyInvocable : private internal_any_invocable::Impl { - private: - static_assert( - std::is_function::value, - "The template argument of AnyInvocable must be a function type."); - - using Impl = internal_any_invocable::Impl; - - public: - // The return type of Sig - using result_type = typename Impl::result_type; - - // Constructors - - // Constructs the `AnyInvocable` in an empty state. - AnyInvocable() noexcept = default; - AnyInvocable(std::nullptr_t) noexcept {} // NOLINT - - // Constructs the `AnyInvocable` from an existing `AnyInvocable` by a move. - // Note that `f` is not guaranteed to be empty after move-construction, - // although it may be. - AnyInvocable(AnyInvocable&& /*f*/) noexcept = default; - - // Constructs an `AnyInvocable` from an invocable object. - // - // Upon construction, `*this` is only empty if `f` is a function pointer or - // member pointer type and is null, or if `f` is an `AnyInvocable` that is - // empty. - template ::value>> - AnyInvocable(F&& f) // NOLINT - : Impl(internal_any_invocable::ConversionConstruct(), - std::forward(f)) {} - - // Constructs an `AnyInvocable` that holds an invocable object of type `T`, - // which is constructed in-place from the given arguments. - // - // Example: - // - // AnyInvocable func( - // absl::in_place_type, arg1, arg2); - // - template ::value>> - explicit AnyInvocable(absl::in_place_type_t, Args&&... args) - : Impl(absl::in_place_type>, - std::forward(args)...) { - static_assert(std::is_same>::value, - "The explicit template argument of in_place_type is required " - "to be an unqualified object type."); - } - - // Overload of the above constructor to support list-initialization. - template &, Args...>::value>> - explicit AnyInvocable(absl::in_place_type_t, - std::initializer_list ilist, Args&&... args) - : Impl(absl::in_place_type>, ilist, - std::forward(args)...) { - static_assert(std::is_same>::value, - "The explicit template argument of in_place_type is required " - "to be an unqualified object type."); - } - - // Assignment Operators - - // Assigns an `AnyInvocable` through move-assignment. - // Note that `f` is not guaranteed to be empty after move-assignment - // although it may be. - AnyInvocable& operator=(AnyInvocable&& /*f*/) noexcept = default; - - // Assigns an `AnyInvocable` from a nullptr, clearing the `AnyInvocable`. If - // not empty, destroys the target, putting `*this` into an empty state. - AnyInvocable& operator=(std::nullptr_t) noexcept { - this->Clear(); - return *this; - } - - // Assigns an `AnyInvocable` from an existing `AnyInvocable` instance. - // - // Upon assignment, `*this` is only empty if `f` is a function pointer or - // member pointer type and is null, or if `f` is an `AnyInvocable` that is - // empty. - template ::value>> - AnyInvocable& operator=(F&& f) { - *this = AnyInvocable(std::forward(f)); - return *this; - } - - // Assigns an `AnyInvocable` from a reference to an invocable object. - // Upon assignment, stores a reference to the invocable object in the - // `AnyInvocable` instance. - template < - class F, - typename = absl::enable_if_t< - internal_any_invocable::CanAssignReferenceWrapper::value>> - AnyInvocable& operator=(std::reference_wrapper f) noexcept { - *this = AnyInvocable(f); - return *this; - } - - // Destructor - - // If not empty, destroys the target. - ~AnyInvocable() = default; - - // absl::AnyInvocable::swap() - // - // Exchanges the targets of `*this` and `other`. - void swap(AnyInvocable& other) noexcept { std::swap(*this, other); } - - // abl::AnyInvocable::operator bool() - // - // Returns `true` if `*this` is not empty. - explicit operator bool() const noexcept { return this->HasValue(); } - - // Invokes the target object of `*this`. `*this` must not be empty. - // - // Note: The signature of this function call operator is the same as the - // template parameter `Sig`. - using Impl::operator(); - - // Equality operators - - // Returns `true` if `*this` is empty. - friend bool operator==(const AnyInvocable& f, std::nullptr_t) noexcept { - return !f.HasValue(); - } - - // Returns `true` if `*this` is empty. - friend bool operator==(std::nullptr_t, const AnyInvocable& f) noexcept { - return !f.HasValue(); - } - - // Returns `false` if `*this` is empty. - friend bool operator!=(const AnyInvocable& f, std::nullptr_t) noexcept { - return f.HasValue(); - } - - // Returns `false` if `*this` is empty. - friend bool operator!=(std::nullptr_t, const AnyInvocable& f) noexcept { - return f.HasValue(); - } - - // swap() - // - // Exchanges the targets of `f1` and `f2`. - friend void swap(AnyInvocable& f1, AnyInvocable& f2) noexcept { f1.swap(f2); } - - private: - // Friending other instantiations is necessary for conversions. - template - friend class internal_any_invocable::CoreImpl; -}; - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_FUNCTIONAL_ANY_INVOCABLE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/bind_front.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/bind_front.h deleted file mode 100644 index f9075bd..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/bind_front.h +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: bind_front.h -// ----------------------------------------------------------------------------- -// -// `absl::bind_front()` returns a functor by binding a number of arguments to -// the front of a provided (usually more generic) functor. Unlike `std::bind`, -// it does not require the use of argument placeholders. The simpler syntax of -// `absl::bind_front()` allows you to avoid known misuses with `std::bind()`. -// -// `absl::bind_front()` is meant as a drop-in replacement for C++20's upcoming -// `std::bind_front()`, which similarly resolves these issues with -// `std::bind()`. Both `bind_front()` alternatives, unlike `std::bind()`, allow -// partial function application. (See -// https://en.wikipedia.org/wiki/Partial_application). - -#ifndef ABSL_FUNCTIONAL_BIND_FRONT_H_ -#define ABSL_FUNCTIONAL_BIND_FRONT_H_ - -#if defined(__cpp_lib_bind_front) && __cpp_lib_bind_front >= 201907L -#include // For std::bind_front. -#endif // defined(__cpp_lib_bind_front) && __cpp_lib_bind_front >= 201907L - -#include "absl/functional/internal/front_binder.h" -#include "absl/utility/utility.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// bind_front() -// -// Binds the first N arguments of an invocable object and stores them by value. -// -// Like `std::bind()`, `absl::bind_front()` is implicitly convertible to -// `std::function`. In particular, it may be used as a simpler replacement for -// `std::bind()` in most cases, as it does not require placeholders to be -// specified. More importantly, it provides more reliable correctness guarantees -// than `std::bind()`; while `std::bind()` will silently ignore passing more -// parameters than expected, for example, `absl::bind_front()` will report such -// mis-uses as errors. In C++20, `absl::bind_front` is replaced by -// `std::bind_front`. -// -// absl::bind_front(a...) can be seen as storing the results of -// std::make_tuple(a...). -// -// Example: Binding a free function. -// -// int Minus(int a, int b) { return a - b; } -// -// assert(absl::bind_front(Minus)(3, 2) == 3 - 2); -// assert(absl::bind_front(Minus, 3)(2) == 3 - 2); -// assert(absl::bind_front(Minus, 3, 2)() == 3 - 2); -// -// Example: Binding a member function. -// -// struct Math { -// int Double(int a) const { return 2 * a; } -// }; -// -// Math math; -// -// assert(absl::bind_front(&Math::Double)(&math, 3) == 2 * 3); -// // Stores a pointer to math inside the functor. -// assert(absl::bind_front(&Math::Double, &math)(3) == 2 * 3); -// // Stores a copy of math inside the functor. -// assert(absl::bind_front(&Math::Double, math)(3) == 2 * 3); -// // Stores std::unique_ptr inside the functor. -// assert(absl::bind_front(&Math::Double, -// std::unique_ptr(new Math))(3) == 2 * 3); -// -// Example: Using `absl::bind_front()`, instead of `std::bind()`, with -// `std::function`. -// -// class FileReader { -// public: -// void ReadFileAsync(const std::string& filename, std::string* content, -// const std::function& done) { -// // Calls Executor::Schedule(std::function). -// Executor::DefaultExecutor()->Schedule( -// absl::bind_front(&FileReader::BlockingRead, this, -// filename, content, done)); -// } -// -// private: -// void BlockingRead(const std::string& filename, std::string* content, -// const std::function& done) { -// CHECK_OK(file::GetContents(filename, content, {})); -// done(); -// } -// }; -// -// `absl::bind_front()` stores bound arguments explicitly using the type passed -// rather than implicitly based on the type accepted by its functor. -// -// Example: Binding arguments explicitly. -// -// void LogStringView(absl::string_view sv) { -// LOG(INFO) << sv; -// } -// -// Executor* e = Executor::DefaultExecutor(); -// std::string s = "hello"; -// absl::string_view sv = s; -// -// // absl::bind_front(LogStringView, arg) makes a copy of arg and stores it. -// e->Schedule(absl::bind_front(LogStringView, sv)); // ERROR: dangling -// // string_view. -// -// e->Schedule(absl::bind_front(LogStringView, s)); // OK: stores a copy of -// // s. -// -// To store some of the arguments passed to `absl::bind_front()` by reference, -// use std::ref()` and `std::cref()`. -// -// Example: Storing some of the bound arguments by reference. -// -// class Service { -// public: -// void Serve(const Request& req, std::function* done) { -// // The request protocol buffer won't be deleted until done is called. -// // It's safe to store a reference to it inside the functor. -// Executor::DefaultExecutor()->Schedule( -// absl::bind_front(&Service::BlockingServe, this, std::cref(req), -// done)); -// } -// -// private: -// void BlockingServe(const Request& req, std::function* done); -// }; -// -// Example: Storing bound arguments by reference. -// -// void Print(const std::string& a, const std::string& b) { -// std::cerr << a << b; -// } -// -// std::string hi = "Hello, "; -// std::vector names = {"Chuk", "Gek"}; -// // Doesn't copy hi. -// for_each(names.begin(), names.end(), -// absl::bind_front(Print, std::ref(hi))); -// -// // DO NOT DO THIS: the functor may outlive "hi", resulting in -// // dangling references. -// foo->DoInFuture(absl::bind_front(Print, std::ref(hi), "Guest")); // BAD! -// auto f = absl::bind_front(Print, std::ref(hi), "Guest"); // BAD! -// -// Example: Storing reference-like types. -// -// void Print(absl::string_view a, const std::string& b) { -// std::cerr << a << b; -// } -// -// std::string hi = "Hello, "; -// // Copies "hi". -// absl::bind_front(Print, hi)("Chuk"); -// -// // Compile error: std::reference_wrapper is not implicitly -// // convertible to string_view. -// // absl::bind_front(Print, std::cref(hi))("Chuk"); -// -// // Doesn't copy "hi". -// absl::bind_front(Print, absl::string_view(hi))("Chuk"); -// -#if defined(__cpp_lib_bind_front) && __cpp_lib_bind_front >= 201907L -using std::bind_front; -#else // defined(__cpp_lib_bind_front) && __cpp_lib_bind_front >= 201907L -template -constexpr functional_internal::bind_front_t bind_front( - F&& func, BoundArgs&&... args) { - return functional_internal::bind_front_t( - absl::in_place, absl::forward(func), - absl::forward(args)...); -} -#endif // defined(__cpp_lib_bind_front) && __cpp_lib_bind_front >= 201907L - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_FUNCTIONAL_BIND_FRONT_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/function_ref.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/function_ref.h deleted file mode 100644 index f977960..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/function_ref.h +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2019 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: function_ref.h -// ----------------------------------------------------------------------------- -// -// This header file defines the `absl::FunctionRef` type for holding a -// non-owning reference to an object of any invocable type. This function -// reference is typically most useful as a type-erased argument type for -// accepting function types that neither take ownership nor copy the type; using -// the reference type in this case avoids a copy and an allocation. Best -// practices of other non-owning reference-like objects (such as -// `absl::string_view`) apply here. -// -// An `absl::FunctionRef` is similar in usage to a `std::function` but has the -// following differences: -// -// * It doesn't own the underlying object. -// * It doesn't have a null or empty state. -// * It never performs deep copies or allocations. -// * It's much faster and cheaper to construct. -// * It's trivially copyable and destructable. -// -// Generally, `absl::FunctionRef` should not be used as a return value, data -// member, or to initialize a `std::function`. Such usages will often lead to -// problematic lifetime issues. Once you convert something to an -// `absl::FunctionRef` you cannot make a deep copy later. -// -// This class is suitable for use wherever a "const std::function<>&" -// would be used without making a copy. ForEach functions and other versions of -// the visitor pattern are a good example of when this class should be used. -// -// This class is trivial to copy and should be passed by value. -#ifndef ABSL_FUNCTIONAL_FUNCTION_REF_H_ -#define ABSL_FUNCTIONAL_FUNCTION_REF_H_ - -#include -#include -#include - -#include "absl/base/attributes.h" -#include "absl/functional/internal/function_ref.h" -#include "absl/meta/type_traits.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// FunctionRef -// -// Dummy class declaration to allow the partial specialization based on function -// types below. -template -class FunctionRef; - -// FunctionRef -// -// An `absl::FunctionRef` is a lightweight wrapper to any invokable object with -// a compatible signature. Generally, an `absl::FunctionRef` should only be used -// as an argument type and should be preferred as an argument over a const -// reference to a `std::function`. `absl::FunctionRef` itself does not allocate, -// although the wrapped invokable may. -// -// Example: -// -// // The following function takes a function callback by const reference -// bool Visitor(const std::function& callback); -// -// // Assuming that the function is not stored or otherwise copied, it can be -// // replaced by an `absl::FunctionRef`: -// bool Visitor(absl::FunctionRef -// callback); -// -// Note: the assignment operator within an `absl::FunctionRef` is intentionally -// deleted to prevent misuse; because the `absl::FunctionRef` does not own the -// underlying type, assignment likely indicates misuse. -template -class FunctionRef { - private: - // Used to disable constructors for objects that are not compatible with the - // signature of this FunctionRef. - template > - using EnableIfCompatible = - typename std::enable_if::value || - std::is_convertible::value>::type; - - public: - // Constructs a FunctionRef from any invokable type. - template > - // NOLINTNEXTLINE(runtime/explicit) - FunctionRef(const F& f ABSL_ATTRIBUTE_LIFETIME_BOUND) - : invoker_(&absl::functional_internal::InvokeObject) { - absl::functional_internal::AssertNonNull(f); - ptr_.obj = &f; - } - - // Overload for function pointers. This eliminates a level of indirection that - // would happen if the above overload was used (it lets us store the pointer - // instead of a pointer to a pointer). - // - // This overload is also used for references to functions, since references to - // functions can decay to function pointers implicitly. - template < - typename F, typename = EnableIfCompatible, - absl::functional_internal::EnableIf::value> = 0> - FunctionRef(F* f) // NOLINT(runtime/explicit) - : invoker_(&absl::functional_internal::InvokeFunction) { - assert(f != nullptr); - ptr_.fun = reinterpret_cast(f); - } - - // To help prevent subtle lifetime bugs, FunctionRef is not assignable. - // Typically, it should only be used as an argument type. - FunctionRef& operator=(const FunctionRef& rhs) = delete; - FunctionRef(const FunctionRef& rhs) = default; - - // Call the underlying object. - R operator()(Args... args) const { - return invoker_(ptr_, std::forward(args)...); - } - - private: - absl::functional_internal::VoidPtr ptr_; - absl::functional_internal::Invoker invoker_; -}; - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_FUNCTIONAL_FUNCTION_REF_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/any_invocable.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/any_invocable.h deleted file mode 100644 index f353139..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/any_invocable.h +++ /dev/null @@ -1,857 +0,0 @@ -// Copyright 2022 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Implementation details for `absl::AnyInvocable` - -#ifndef ABSL_FUNCTIONAL_INTERNAL_ANY_INVOCABLE_H_ -#define ABSL_FUNCTIONAL_INTERNAL_ANY_INVOCABLE_H_ - -//////////////////////////////////////////////////////////////////////////////// -// // -// This implementation of the proposed `any_invocable` uses an approach that // -// chooses between local storage and remote storage for the contained target // -// object based on the target object's size, alignment requirements, and // -// whether or not it has a nothrow move constructor. Additional optimizations // -// are performed when the object is a trivially copyable type [basic.types]. // -// // -// There are three datamembers per `AnyInvocable` instance // -// // -// 1) A union containing either // -// - A pointer to the target object referred to via a void*, or // -// - the target object, emplaced into a raw char buffer // -// // -// 2) A function pointer to a "manager" function operation that takes a // -// discriminator and logically branches to either perform a move operation // -// or destroy operation based on that discriminator. // -// // -// 3) A function pointer to an "invoker" function operation that invokes the // -// target object, directly returning the result. // -// // -// When in the logically empty state, the manager function is an empty // -// function and the invoker function is one that would be undefined-behavior // -// to call. // -// // -// An additional optimization is performed when converting from one // -// AnyInvocable to another where only the noexcept specification and/or the // -// cv/ref qualifiers of the function type differ. In these cases, the // -// conversion works by "moving the guts", similar to if they were the same // -// exact type, as opposed to having to perform an additional layer of // -// wrapping through remote storage. // -// // -//////////////////////////////////////////////////////////////////////////////// - -// IWYU pragma: private, include "absl/functional/any_invocable.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/base/config.h" -#include "absl/base/internal/invoke.h" -#include "absl/base/macros.h" -#include "absl/meta/type_traits.h" -#include "absl/utility/utility.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// Helper macro used to prevent spelling `noexcept` in language versions older -// than C++17, where it is not part of the type system, in order to avoid -// compilation failures and internal compiler errors. -#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L -#define ABSL_INTERNAL_NOEXCEPT_SPEC(noex) noexcept(noex) -#else -#define ABSL_INTERNAL_NOEXCEPT_SPEC(noex) -#endif - -// Defined in functional/any_invocable.h -template -class AnyInvocable; - -namespace internal_any_invocable { - -// Constants relating to the small-object-storage for AnyInvocable -enum StorageProperty : std::size_t { - kAlignment = alignof(std::max_align_t), // The alignment of the storage - kStorageSize = sizeof(void*) * 2 // The size of the storage -}; - -//////////////////////////////////////////////////////////////////////////////// -// -// A metafunction for checking if a type is an AnyInvocable instantiation. -// This is used during conversion operations. -template -struct IsAnyInvocable : std::false_type {}; - -template -struct IsAnyInvocable> : std::true_type {}; -// -//////////////////////////////////////////////////////////////////////////////// - -// A type trait that tells us whether or not a target function type should be -// stored locally in the small object optimization storage -template -using IsStoredLocally = std::integral_constant< - bool, sizeof(T) <= kStorageSize && alignof(T) <= kAlignment && - kAlignment % alignof(T) == 0 && - std::is_nothrow_move_constructible::value>; - -// An implementation of std::remove_cvref_t of C++20. -template -using RemoveCVRef = - typename std::remove_cv::type>::type; - -//////////////////////////////////////////////////////////////////////////////// -// -// An implementation of the C++ standard INVOKE pseudo-macro, operation is -// equivalent to std::invoke except that it forces an implicit conversion to the -// specified return type. If "R" is void, the function is executed and the -// return value is simply ignored. -template ::value>> -void InvokeR(F&& f, P&&... args) { - absl::base_internal::invoke(std::forward(f), std::forward

(args)...); -} - -template ::value, int> = 0> -ReturnType InvokeR(F&& f, P&&... args) { - return absl::base_internal::invoke(std::forward(f), - std::forward

(args)...); -} - -// -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -/// -// A metafunction that takes a "T" corresponding to a parameter type of the -// user's specified function type, and yields the parameter type to use for the -// type-erased invoker. In order to prevent observable moves, this must be -// either a reference or, if the type is trivial, the original parameter type -// itself. Since the parameter type may be incomplete at the point that this -// metafunction is used, we can only do this optimization for scalar types -// rather than for any trivial type. -template -T ForwardImpl(std::true_type); - -template -T&& ForwardImpl(std::false_type); - -// NOTE: We deliberately use an intermediate struct instead of a direct alias, -// as a workaround for b/206991861 on MSVC versions < 1924. -template -struct ForwardedParameter { - using type = decltype(( - ForwardImpl)(std::integral_constant::value>())); -}; - -template -using ForwardedParameterType = typename ForwardedParameter::type; -// -//////////////////////////////////////////////////////////////////////////////// - -// A discriminator when calling the "manager" function that describes operation -// type-erased operation should be invoked. -// -// "relocate_from_to" specifies that the manager should perform a move. -// -// "dispose" specifies that the manager should perform a destroy. -enum class FunctionToCall : bool { relocate_from_to, dispose }; - -// The portion of `AnyInvocable` state that contains either a pointer to the -// target object or the object itself in local storage -union TypeErasedState { - struct { - // A pointer to the type-erased object when remotely stored - void* target; - // The size of the object for `RemoteManagerTrivial` - std::size_t size; - } remote; - - // Local-storage for the type-erased object when small and trivial enough - alignas(kAlignment) char storage[kStorageSize]; -}; - -// A typed accessor for the object in `TypeErasedState` storage -template -T& ObjectInLocalStorage(TypeErasedState* const state) { - // We launder here because the storage may be reused with the same type. -#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L - return *std::launder(reinterpret_cast(&state->storage)); -#elif ABSL_HAVE_BUILTIN(__builtin_launder) - return *__builtin_launder(reinterpret_cast(&state->storage)); -#else - - // When `std::launder` or equivalent are not available, we rely on undefined - // behavior, which works as intended on Abseil's officially supported - // platforms as of Q2 2022. -#if !defined(__clang__) && defined(__GNUC__) -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#pragma GCC diagnostic push -#endif - return *reinterpret_cast(&state->storage); -#if !defined(__clang__) && defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -#endif -} - -// The type for functions issuing lifetime-related operations: move and dispose -// A pointer to such a function is contained in each `AnyInvocable` instance. -// NOTE: When specifying `FunctionToCall::`dispose, the same state must be -// passed as both "from" and "to". -using ManagerType = void(FunctionToCall /*operation*/, - TypeErasedState* /*from*/, TypeErasedState* /*to*/) - ABSL_INTERNAL_NOEXCEPT_SPEC(true); - -// The type for functions issuing the actual invocation of the object -// A pointer to such a function is contained in each AnyInvocable instance. -template -using InvokerType = ReturnType(TypeErasedState*, ForwardedParameterType

...) - ABSL_INTERNAL_NOEXCEPT_SPEC(SigIsNoexcept); - -// The manager that is used when AnyInvocable is empty -inline void EmptyManager(FunctionToCall /*operation*/, - TypeErasedState* /*from*/, - TypeErasedState* /*to*/) noexcept {} - -// The manager that is used when a target function is in local storage and is -// a trivially copyable type. -inline void LocalManagerTrivial(FunctionToCall /*operation*/, - TypeErasedState* const from, - TypeErasedState* const to) noexcept { - // This single statement without branching handles both possible operations. - // - // For FunctionToCall::dispose, "from" and "to" point to the same state, and - // so this assignment logically would do nothing. - // - // Note: Correctness here relies on http://wg21.link/p0593, which has only - // become standard in C++20, though implementations do not break it in - // practice for earlier versions of C++. - // - // The correct way to do this without that paper is to first placement-new a - // default-constructed T in "to->storage" prior to the memmove, but doing so - // requires a different function to be created for each T that is stored - // locally, which can cause unnecessary bloat and be less cache friendly. - *to = *from; - - // Note: Because the type is trivially copyable, the destructor does not need - // to be called ("trivially copyable" requires a trivial destructor). -} - -// The manager that is used when a target function is in local storage and is -// not a trivially copyable type. -template -void LocalManagerNontrivial(FunctionToCall operation, - TypeErasedState* const from, - TypeErasedState* const to) noexcept { - static_assert(IsStoredLocally::value, - "Local storage must only be used for supported types."); - static_assert(!std::is_trivially_copyable::value, - "Locally stored types must be trivially copyable."); - - T& from_object = (ObjectInLocalStorage)(from); - - switch (operation) { - case FunctionToCall::relocate_from_to: - // NOTE: Requires that the left-hand operand is already empty. - ::new (static_cast(&to->storage)) T(std::move(from_object)); - ABSL_FALLTHROUGH_INTENDED; - case FunctionToCall::dispose: - from_object.~T(); // Must not throw. // NOLINT - return; - } - ABSL_INTERNAL_UNREACHABLE; -} - -// The invoker that is used when a target function is in local storage -// Note: QualTRef here is the target function type along with cv and reference -// qualifiers that must be used when calling the function. -template -ReturnType LocalInvoker( - TypeErasedState* const state, - ForwardedParameterType

... args) noexcept(SigIsNoexcept) { - using RawT = RemoveCVRef; - static_assert( - IsStoredLocally::value, - "Target object must be in local storage in order to be invoked from it."); - - auto& f = (ObjectInLocalStorage)(state); - return (InvokeR)(static_cast(f), - static_cast>(args)...); -} - -// The manager that is used when a target function is in remote storage and it -// has a trivial destructor -inline void RemoteManagerTrivial(FunctionToCall operation, - TypeErasedState* const from, - TypeErasedState* const to) noexcept { - switch (operation) { - case FunctionToCall::relocate_from_to: - // NOTE: Requires that the left-hand operand is already empty. - to->remote = from->remote; - return; - case FunctionToCall::dispose: -#if defined(__cpp_sized_deallocation) - ::operator delete(from->remote.target, from->remote.size); -#else // __cpp_sized_deallocation - ::operator delete(from->remote.target); -#endif // __cpp_sized_deallocation - return; - } - ABSL_INTERNAL_UNREACHABLE; -} - -// The manager that is used when a target function is in remote storage and the -// destructor of the type is not trivial -template -void RemoteManagerNontrivial(FunctionToCall operation, - TypeErasedState* const from, - TypeErasedState* const to) noexcept { - static_assert(!IsStoredLocally::value, - "Remote storage must only be used for types that do not " - "qualify for local storage."); - - switch (operation) { - case FunctionToCall::relocate_from_to: - // NOTE: Requires that the left-hand operand is already empty. - to->remote.target = from->remote.target; - return; - case FunctionToCall::dispose: - ::delete static_cast(from->remote.target); // Must not throw. - return; - } - ABSL_INTERNAL_UNREACHABLE; -} - -// The invoker that is used when a target function is in remote storage -template -ReturnType RemoteInvoker( - TypeErasedState* const state, - ForwardedParameterType

... args) noexcept(SigIsNoexcept) { - using RawT = RemoveCVRef; - static_assert(!IsStoredLocally::value, - "Target object must be in remote storage in order to be " - "invoked from it."); - - auto& f = *static_cast(state->remote.target); - return (InvokeR)(static_cast(f), - static_cast>(args)...); -} - -//////////////////////////////////////////////////////////////////////////////// -// -// A metafunction that checks if a type T is an instantiation of -// absl::in_place_type_t (needed for constructor constraints of AnyInvocable). -template -struct IsInPlaceType : std::false_type {}; - -template -struct IsInPlaceType> : std::true_type {}; -// -//////////////////////////////////////////////////////////////////////////////// - -// A constructor name-tag used with CoreImpl (below) to request the -// conversion-constructor. QualDecayedTRef is the decayed-type of the object to -// wrap, along with the cv and reference qualifiers that must be applied when -// performing an invocation of the wrapped object. -template -struct TypedConversionConstruct {}; - -// A helper base class for all core operations of AnyInvocable. Most notably, -// this class creates the function call operator and constraint-checkers so that -// the top-level class does not have to be a series of partial specializations. -// -// Note: This definition exists (as opposed to being a declaration) so that if -// the user of the top-level template accidentally passes a template argument -// that is not a function type, they will get a static_assert in AnyInvocable's -// class body rather than an error stating that Impl is not defined. -template -class Impl {}; // Note: This is partially-specialized later. - -// A std::unique_ptr deleter that deletes memory allocated via ::operator new. -#if defined(__cpp_sized_deallocation) -class TrivialDeleter { - public: - explicit TrivialDeleter(std::size_t size) : size_(size) {} - - void operator()(void* target) const { - ::operator delete(target, size_); - } - - private: - std::size_t size_; -}; -#else // __cpp_sized_deallocation -class TrivialDeleter { - public: - explicit TrivialDeleter(std::size_t) {} - - void operator()(void* target) const { ::operator delete(target); } -}; -#endif // __cpp_sized_deallocation - -template -class CoreImpl; - -constexpr bool IsCompatibleConversion(void*, void*) { return false; } -template -constexpr bool IsCompatibleConversion(CoreImpl*, - CoreImpl*) { - return !NoExceptDest || NoExceptSrc; -} - -// A helper base class for all core operations of AnyInvocable that do not -// depend on the cv/ref qualifiers of the function type. -template -class CoreImpl { - public: - using result_type = ReturnType; - - CoreImpl() noexcept : manager_(EmptyManager), invoker_(nullptr) {} - - enum class TargetType : int { - kPointer = 0, - kCompatibleAnyInvocable = 1, - kIncompatibleAnyInvocable = 2, - kOther = 3, - }; - - // Note: QualDecayedTRef here includes the cv-ref qualifiers associated with - // the invocation of the Invocable. The unqualified type is the target object - // type to be stored. - template - explicit CoreImpl(TypedConversionConstruct, F&& f) { - using DecayedT = RemoveCVRef; - - constexpr TargetType kTargetType = - (std::is_pointer::value || - std::is_member_pointer::value) - ? TargetType::kPointer - : IsCompatibleAnyInvocable::value - ? TargetType::kCompatibleAnyInvocable - : IsAnyInvocable::value - ? TargetType::kIncompatibleAnyInvocable - : TargetType::kOther; - // NOTE: We only use integers instead of enums as template parameters in - // order to work around a bug on C++14 under MSVC 2017. - // See b/236131881. - Initialize(kTargetType), QualDecayedTRef>( - std::forward(f)); - } - - // Note: QualTRef here includes the cv-ref qualifiers associated with the - // invocation of the Invocable. The unqualified type is the target object - // type to be stored. - template - explicit CoreImpl(absl::in_place_type_t, Args&&... args) { - InitializeStorage(std::forward(args)...); - } - - CoreImpl(CoreImpl&& other) noexcept { - other.manager_(FunctionToCall::relocate_from_to, &other.state_, &state_); - manager_ = other.manager_; - invoker_ = other.invoker_; - other.manager_ = EmptyManager; - other.invoker_ = nullptr; - } - - CoreImpl& operator=(CoreImpl&& other) noexcept { - // Put the left-hand operand in an empty state. - // - // Note: A full reset that leaves us with an object that has its invariants - // intact is necessary in order to handle self-move. This is required by - // types that are used with certain operations of the standard library, such - // as the default definition of std::swap when both operands target the same - // object. - Clear(); - - // Perform the actual move/destory operation on the target function. - other.manager_(FunctionToCall::relocate_from_to, &other.state_, &state_); - manager_ = other.manager_; - invoker_ = other.invoker_; - other.manager_ = EmptyManager; - other.invoker_ = nullptr; - - return *this; - } - - ~CoreImpl() { manager_(FunctionToCall::dispose, &state_, &state_); } - - // Check whether or not the AnyInvocable is in the empty state. - bool HasValue() const { return invoker_ != nullptr; } - - // Effects: Puts the object into its empty state. - void Clear() { - manager_(FunctionToCall::dispose, &state_, &state_); - manager_ = EmptyManager; - invoker_ = nullptr; - } - - template = 0> - void Initialize(F&& f) { -// This condition handles types that decay into pointers, which includes -// function references. Since function references cannot be null, GCC warns -// against comparing their decayed form with nullptr. -// Since this is template-heavy code, we prefer to disable these warnings -// locally instead of adding yet another overload of this function. -#if !defined(__clang__) && defined(__GNUC__) -#pragma GCC diagnostic ignored "-Wpragmas" -#pragma GCC diagnostic ignored "-Waddress" -#pragma GCC diagnostic ignored "-Wnonnull-compare" -#pragma GCC diagnostic push -#endif - if (static_cast>(f) == nullptr) { -#if !defined(__clang__) && defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - manager_ = EmptyManager; - invoker_ = nullptr; - return; - } - InitializeStorage(std::forward(f)); - } - - template = 0> - void Initialize(F&& f) { - // In this case we can "steal the guts" of the other AnyInvocable. - f.manager_(FunctionToCall::relocate_from_to, &f.state_, &state_); - manager_ = f.manager_; - invoker_ = f.invoker_; - - f.manager_ = EmptyManager; - f.invoker_ = nullptr; - } - - template = 0> - void Initialize(F&& f) { - if (f.HasValue()) { - InitializeStorage(std::forward(f)); - } else { - manager_ = EmptyManager; - invoker_ = nullptr; - } - } - - template > - void Initialize(F&& f) { - InitializeStorage(std::forward(f)); - } - - // Use local (inline) storage for applicable target object types. - template >::value>> - void InitializeStorage(Args&&... args) { - using RawT = RemoveCVRef; - ::new (static_cast(&state_.storage)) - RawT(std::forward(args)...); - - invoker_ = LocalInvoker; - // We can simplify our manager if we know the type is trivially copyable. - InitializeLocalManager(); - } - - // Use remote storage for target objects that cannot be stored locally. - template >::value, - int> = 0> - void InitializeStorage(Args&&... args) { - InitializeRemoteManager>(std::forward(args)...); - // This is set after everything else in case an exception is thrown in an - // earlier step of the initialization. - invoker_ = RemoteInvoker; - } - - template ::value>> - void InitializeLocalManager() { - manager_ = LocalManagerTrivial; - } - - template ::value, int> = 0> - void InitializeLocalManager() { - manager_ = LocalManagerNontrivial; - } - - template - using HasTrivialRemoteStorage = - std::integral_constant::value && - alignof(T) <= - ABSL_INTERNAL_DEFAULT_NEW_ALIGNMENT>; - - template ::value>> - void InitializeRemoteManager(Args&&... args) { - // unique_ptr is used for exception-safety in case construction throws. - std::unique_ptr uninitialized_target( - ::operator new(sizeof(T)), TrivialDeleter(sizeof(T))); - ::new (uninitialized_target.get()) T(std::forward(args)...); - state_.remote.target = uninitialized_target.release(); - state_.remote.size = sizeof(T); - manager_ = RemoteManagerTrivial; - } - - template ::value, int> = 0> - void InitializeRemoteManager(Args&&... args) { - state_.remote.target = ::new T(std::forward(args)...); - manager_ = RemoteManagerNontrivial; - } - - ////////////////////////////////////////////////////////////////////////////// - // - // Type trait to determine if the template argument is an AnyInvocable whose - // function type is compatible enough with ours such that we can - // "move the guts" out of it when moving, rather than having to place a new - // object into remote storage. - - template - struct IsCompatibleAnyInvocable { - static constexpr bool value = false; - }; - - template - struct IsCompatibleAnyInvocable> { - static constexpr bool value = - (IsCompatibleConversion)(static_cast< - typename AnyInvocable::CoreImpl*>( - nullptr), - static_cast(nullptr)); - }; - - // - ////////////////////////////////////////////////////////////////////////////// - - TypeErasedState state_; - ManagerType* manager_; - InvokerType* invoker_; -}; - -// A constructor name-tag used with Impl to request the -// conversion-constructor -struct ConversionConstruct {}; - -//////////////////////////////////////////////////////////////////////////////// -// -// A metafunction that is normally an identity metafunction except that when -// given a std::reference_wrapper, it yields T&. This is necessary because -// currently std::reference_wrapper's operator() is not conditionally noexcept, -// so when checking if such an Invocable is nothrow-invocable, we must pull out -// the underlying type. -template -struct UnwrapStdReferenceWrapperImpl { - using type = T; -}; - -template -struct UnwrapStdReferenceWrapperImpl> { - using type = T&; -}; - -template -using UnwrapStdReferenceWrapper = - typename UnwrapStdReferenceWrapperImpl::type; -// -//////////////////////////////////////////////////////////////////////////////// - -// An alias that always yields std::true_type (used with constraints) where -// substitution failures happen when forming the template arguments. -template -using True = - std::integral_constant*) != 0>; - -/*SFINAE constraints for the conversion-constructor.*/ -template , AnyInvocable>::value>> -using CanConvert = - True>::value>, - absl::enable_if_t::template CallIsValid::value>, - absl::enable_if_t< - Impl::template CallIsNoexceptIfSigIsNoexcept::value>, - absl::enable_if_t, F>::value>>; - -/*SFINAE constraints for the std::in_place constructors.*/ -template -using CanEmplace = True< - absl::enable_if_t::template CallIsValid::value>, - absl::enable_if_t< - Impl::template CallIsNoexceptIfSigIsNoexcept::value>, - absl::enable_if_t, Args...>::value>>; - -/*SFINAE constraints for the conversion-assign operator.*/ -template , AnyInvocable>::value>> -using CanAssign = - True::template CallIsValid::value>, - absl::enable_if_t< - Impl::template CallIsNoexceptIfSigIsNoexcept::value>, - absl::enable_if_t, F>::value>>; - -/*SFINAE constraints for the reference-wrapper conversion-assign operator.*/ -template -using CanAssignReferenceWrapper = - True::template CallIsValid>::value>, - absl::enable_if_t::template CallIsNoexceptIfSigIsNoexcept< - std::reference_wrapper>::value>>; - -//////////////////////////////////////////////////////////////////////////////// -// -// The constraint for checking whether or not a call meets the noexcept -// callability requirements. This is a preprocessor macro because specifying it -// this way as opposed to a disjunction/branch can improve the user-side error -// messages and avoids an instantiation of std::is_nothrow_invocable_r in the -// cases where the user did not specify a noexcept function type. -// -#define ABSL_INTERNAL_ANY_INVOCABLE_NOEXCEPT_CONSTRAINT(inv_quals, noex) \ - ABSL_INTERNAL_ANY_INVOCABLE_NOEXCEPT_CONSTRAINT_##noex(inv_quals) - -// The disjunction below is because we can't rely on std::is_nothrow_invocable_r -// to give the right result when ReturnType is non-moveable in toolchains that -// don't treat non-moveable result types correctly. For example this was the -// case in libc++ before commit c3a24882 (2022-05). -#define ABSL_INTERNAL_ANY_INVOCABLE_NOEXCEPT_CONSTRAINT_true(inv_quals) \ - absl::enable_if_t> inv_quals, \ - P...>, \ - std::conjunction< \ - std::is_nothrow_invocable< \ - UnwrapStdReferenceWrapper> inv_quals, P...>, \ - std::is_same< \ - ReturnType, \ - absl::base_internal::invoke_result_t< \ - UnwrapStdReferenceWrapper> inv_quals, \ - P...>>>>::value> - -#define ABSL_INTERNAL_ANY_INVOCABLE_NOEXCEPT_CONSTRAINT_false(inv_quals) -// -//////////////////////////////////////////////////////////////////////////////// - -// A macro to generate partial specializations of Impl with the different -// combinations of supported cv/reference qualifiers and noexcept specifier. -// -// Here, `cv` are the cv-qualifiers if any, `ref` is the ref-qualifier if any, -// inv_quals is the reference type to be used when invoking the target, and -// noex is "true" if the function type is noexcept, or false if it is not. -// -// The CallIsValid condition is more complicated than simply using -// absl::base_internal::is_invocable_r because we can't rely on it to give the -// right result when ReturnType is non-moveable in toolchains that don't treat -// non-moveable result types correctly. For example this was the case in libc++ -// before commit c3a24882 (2022-05). -#define ABSL_INTERNAL_ANY_INVOCABLE_IMPL_(cv, ref, inv_quals, noex) \ - template \ - class Impl \ - : public CoreImpl { \ - public: \ - /*The base class, which contains the datamembers and core operations*/ \ - using Core = CoreImpl; \ - \ - /*SFINAE constraint to check if F is invocable with the proper signature*/ \ - template \ - using CallIsValid = True inv_quals, P...>, \ - std::is_same inv_quals, P...>>>::value>>; \ - \ - /*SFINAE constraint to check if F is nothrow-invocable when necessary*/ \ - template \ - using CallIsNoexceptIfSigIsNoexcept = \ - True; \ - \ - /*Put the AnyInvocable into an empty state.*/ \ - Impl() = default; \ - \ - /*The implementation of a conversion-constructor from "f*/ \ - /*This forwards to Core, attaching inv_quals so that the base class*/ \ - /*knows how to properly type-erase the invocation.*/ \ - template \ - explicit Impl(ConversionConstruct, F&& f) \ - : Core(TypedConversionConstruct< \ - typename std::decay::type inv_quals>(), \ - std::forward(f)) {} \ - \ - /*Forward along the in-place construction parameters.*/ \ - template \ - explicit Impl(absl::in_place_type_t, Args&&... args) \ - : Core(absl::in_place_type inv_quals>, \ - std::forward(args)...) {} \ - \ - /*The actual invocation operation with the proper signature*/ \ - ReturnType operator()(P... args) cv ref noexcept(noex) { \ - assert(this->invoker_ != nullptr); \ - return this->invoker_(const_cast(&this->state_), \ - static_cast>(args)...); \ - } \ - } - -// Define the `noexcept(true)` specialization only for C++17 and beyond, when -// `noexcept` is part of the type system. -#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 201703L -// A convenience macro that defines specializations for the noexcept(true) and -// noexcept(false) forms, given the other properties. -#define ABSL_INTERNAL_ANY_INVOCABLE_IMPL(cv, ref, inv_quals) \ - ABSL_INTERNAL_ANY_INVOCABLE_IMPL_(cv, ref, inv_quals, false); \ - ABSL_INTERNAL_ANY_INVOCABLE_IMPL_(cv, ref, inv_quals, true) -#else -#define ABSL_INTERNAL_ANY_INVOCABLE_IMPL(cv, ref, inv_quals) \ - ABSL_INTERNAL_ANY_INVOCABLE_IMPL_(cv, ref, inv_quals, false) -#endif - -// Non-ref-qualified partial specializations -ABSL_INTERNAL_ANY_INVOCABLE_IMPL(, , &); -ABSL_INTERNAL_ANY_INVOCABLE_IMPL(const, , const&); - -// Lvalue-ref-qualified partial specializations -ABSL_INTERNAL_ANY_INVOCABLE_IMPL(, &, &); -ABSL_INTERNAL_ANY_INVOCABLE_IMPL(const, &, const&); - -// Rvalue-ref-qualified partial specializations -ABSL_INTERNAL_ANY_INVOCABLE_IMPL(, &&, &&); -ABSL_INTERNAL_ANY_INVOCABLE_IMPL(const, &&, const&&); - -// Undef the detail-only macros. -#undef ABSL_INTERNAL_ANY_INVOCABLE_IMPL -#undef ABSL_INTERNAL_ANY_INVOCABLE_IMPL_ -#undef ABSL_INTERNAL_ANY_INVOCABLE_NOEXCEPT_CONSTRAINT_false -#undef ABSL_INTERNAL_ANY_INVOCABLE_NOEXCEPT_CONSTRAINT_true -#undef ABSL_INTERNAL_ANY_INVOCABLE_NOEXCEPT_CONSTRAINT -#undef ABSL_INTERNAL_NOEXCEPT_SPEC - -} // namespace internal_any_invocable -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_FUNCTIONAL_INTERNAL_ANY_INVOCABLE_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/front_binder.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/front_binder.h deleted file mode 100644 index 45f52de..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/front_binder.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// Implementation details for `absl::bind_front()`. - -#ifndef ABSL_FUNCTIONAL_INTERNAL_FRONT_BINDER_H_ -#define ABSL_FUNCTIONAL_INTERNAL_FRONT_BINDER_H_ - -#include -#include -#include - -#include "absl/base/internal/invoke.h" -#include "absl/container/internal/compressed_tuple.h" -#include "absl/meta/type_traits.h" -#include "absl/utility/utility.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace functional_internal { - -// Invoke the method, expanding the tuple of bound arguments. -template -R Apply(Tuple&& bound, absl::index_sequence, Args&&... free) { - return base_internal::invoke( - absl::forward(bound).template get()..., - absl::forward(free)...); -} - -template -class FrontBinder { - using BoundArgsT = absl::container_internal::CompressedTuple; - using Idx = absl::make_index_sequence; - - BoundArgsT bound_args_; - - public: - template - constexpr explicit FrontBinder(absl::in_place_t, Ts&&... ts) - : bound_args_(absl::forward(ts)...) {} - - template > - R operator()(FreeArgs&&... free_args) & { - return functional_internal::Apply(bound_args_, Idx(), - absl::forward(free_args)...); - } - - template > - R operator()(FreeArgs&&... free_args) const& { - return functional_internal::Apply(bound_args_, Idx(), - absl::forward(free_args)...); - } - - template > - R operator()(FreeArgs&&... free_args) && { - // This overload is called when *this is an rvalue. If some of the bound - // arguments are stored by value or rvalue reference, we move them. - return functional_internal::Apply(absl::move(bound_args_), Idx(), - absl::forward(free_args)...); - } - - template > - R operator()(FreeArgs&&... free_args) const&& { - // This overload is called when *this is an rvalue. If some of the bound - // arguments are stored by value or rvalue reference, we move them. - return functional_internal::Apply(absl::move(bound_args_), Idx(), - absl::forward(free_args)...); - } -}; - -template -using bind_front_t = FrontBinder, absl::decay_t...>; - -} // namespace functional_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_FUNCTIONAL_INTERNAL_FRONT_BINDER_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/function_ref.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/function_ref.h deleted file mode 100644 index b5bb8b4..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/functional/internal/function_ref.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2019 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_FUNCTIONAL_INTERNAL_FUNCTION_REF_H_ -#define ABSL_FUNCTIONAL_INTERNAL_FUNCTION_REF_H_ - -#include -#include -#include - -#include "absl/base/internal/invoke.h" -#include "absl/meta/type_traits.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace functional_internal { - -// Like a void* that can handle function pointers as well. The standard does not -// allow function pointers to round-trip through void*, but void(*)() is fine. -// -// Note: It's important that this class remains trivial and is the same size as -// a pointer, since this allows the compiler to perform tail-call optimizations -// when the underlying function is a callable object with a matching signature. -union VoidPtr { - const void* obj; - void (*fun)(); -}; - -// Chooses the best type for passing T as an argument. -// Attempt to be close to SystemV AMD64 ABI. Objects with trivial copy ctor are -// passed by value. -template -constexpr bool PassByValue() { - return !std::is_lvalue_reference::value && - absl::is_trivially_copy_constructible::value && - absl::is_trivially_copy_assignable< - typename std::remove_cv::type>::value && - std::is_trivially_destructible::value && - sizeof(T) <= 2 * sizeof(void*); -} - -template -struct ForwardT : std::conditional(), T, T&&> {}; - -// An Invoker takes a pointer to the type-erased invokable object, followed by -// the arguments that the invokable object expects. -// -// Note: The order of arguments here is an optimization, since member functions -// have an implicit "this" pointer as their first argument, putting VoidPtr -// first allows the compiler to perform tail-call optimization in many cases. -template -using Invoker = R (*)(VoidPtr, typename ForwardT::type...); - -// -// InvokeObject and InvokeFunction provide static "Invoke" functions that can be -// used as Invokers for objects or functions respectively. -// -// static_cast handles the case the return type is void. -template -R InvokeObject(VoidPtr ptr, typename ForwardT::type... args) { - auto o = static_cast(ptr.obj); - return static_cast( - absl::base_internal::invoke(*o, std::forward(args)...)); -} - -template -R InvokeFunction(VoidPtr ptr, typename ForwardT::type... args) { - auto f = reinterpret_cast(ptr.fun); - return static_cast( - absl::base_internal::invoke(f, std::forward(args)...)); -} - -template -void AssertNonNull(const std::function& f) { - assert(f != nullptr); - (void)f; -} - -template -void AssertNonNull(const F&) {} - -template -void AssertNonNull(F C::*f) { - assert(f != nullptr); - (void)f; -} - -template -using EnableIf = typename ::std::enable_if::type; - -} // namespace functional_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_FUNCTIONAL_INTERNAL_FUNCTION_REF_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/hash.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/hash.h deleted file mode 100644 index 74e2d7c..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/hash.h +++ /dev/null @@ -1,421 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: hash.h -// ----------------------------------------------------------------------------- -// -// This header file defines the Abseil `hash` library and the Abseil hashing -// framework. This framework consists of the following: -// -// * The `absl::Hash` functor, which is used to invoke the hasher within the -// Abseil hashing framework. `absl::Hash` supports most basic types and -// a number of Abseil types out of the box. -// * `AbslHashValue`, an extension point that allows you to extend types to -// support Abseil hashing without requiring you to define a hashing -// algorithm. -// * `HashState`, a type-erased class which implements the manipulation of the -// hash state (H) itself; contains member functions `combine()`, -// `combine_contiguous()`, and `combine_unordered()`; and which you can use -// to contribute to an existing hash state when hashing your types. -// -// Unlike `std::hash` or other hashing frameworks, the Abseil hashing framework -// provides most of its utility by abstracting away the hash algorithm (and its -// implementation) entirely. Instead, a type invokes the Abseil hashing -// framework by simply combining its state with the state of known, hashable -// types. Hashing of that combined state is separately done by `absl::Hash`. -// -// One should assume that a hash algorithm is chosen randomly at the start of -// each process. E.g., `absl::Hash{}(9)` in one process and -// `absl::Hash{}(9)` in another process are likely to differ. -// -// `absl::Hash` may also produce different values from different dynamically -// loaded libraries. For this reason, `absl::Hash` values must never cross -// boundries in dynamically loaded libraries (including when used in types like -// hash containers.) -// -// `absl::Hash` is intended to strongly mix input bits with a target of passing -// an [Avalanche Test](https://en.wikipedia.org/wiki/Avalanche_effect). -// -// Example: -// -// // Suppose we have a class `Circle` for which we want to add hashing: -// class Circle { -// public: -// ... -// private: -// std::pair center_; -// int radius_; -// }; -// -// // To add hashing support to `Circle`, we simply need to add a free -// // (non-member) function `AbslHashValue()`, and return the combined hash -// // state of the existing hash state and the class state. You can add such a -// // free function using a friend declaration within the body of the class: -// class Circle { -// public: -// ... -// template -// friend H AbslHashValue(H h, const Circle& c) { -// return H::combine(std::move(h), c.center_, c.radius_); -// } -// ... -// }; -// -// For more information, see Adding Type Support to `absl::Hash` below. -// -#ifndef ABSL_HASH_HASH_H_ -#define ABSL_HASH_HASH_H_ - -#include -#include - -#include "absl/functional/function_ref.h" -#include "absl/hash/internal/hash.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// ----------------------------------------------------------------------------- -// `absl::Hash` -// ----------------------------------------------------------------------------- -// -// `absl::Hash` is a convenient general-purpose hash functor for any type `T` -// satisfying any of the following conditions (in order): -// -// * T is an arithmetic or pointer type -// * T defines an overload for `AbslHashValue(H, const T&)` for an arbitrary -// hash state `H`. -// - T defines a specialization of `std::hash` -// -// `absl::Hash` intrinsically supports the following types: -// -// * All integral types (including bool) -// * All enum types -// * All floating-point types (although hashing them is discouraged) -// * All pointer types, including nullptr_t -// * std::pair, if T1 and T2 are hashable -// * std::tuple, if all the Ts... are hashable -// * std::unique_ptr and std::shared_ptr -// * All string-like types including: -// * absl::Cord -// * std::string -// * std::string_view (as well as any instance of std::basic_string that -// uses char and std::char_traits) -// * All the standard sequence containers (provided the elements are hashable) -// * All the standard associative containers (provided the elements are -// hashable) -// * absl types such as the following: -// * absl::string_view -// * absl::uint128 -// * absl::Time, absl::Duration, and absl::TimeZone -// * absl containers (provided the elements are hashable) such as the -// following: -// * absl::flat_hash_set, absl::node_hash_set, absl::btree_set -// * absl::flat_hash_map, absl::node_hash_map, absl::btree_map -// * absl::btree_multiset, absl::btree_multimap -// * absl::InlinedVector -// * absl::FixedArray -// -// When absl::Hash is used to hash an unordered container with a custom hash -// functor, the elements are hashed using default absl::Hash semantics, not -// the custom hash functor. This is consistent with the behavior of -// operator==() on unordered containers, which compares elements pairwise with -// operator==() rather than the custom equality functor. It is usually a -// mistake to use either operator==() or absl::Hash on unordered collections -// that use functors incompatible with operator==() equality. -// -// Note: the list above is not meant to be exhaustive. Additional type support -// may be added, in which case the above list will be updated. -// -// ----------------------------------------------------------------------------- -// absl::Hash Invocation Evaluation -// ----------------------------------------------------------------------------- -// -// When invoked, `absl::Hash` searches for supplied hash functions in the -// following order: -// -// * Natively supported types out of the box (see above) -// * Types for which an `AbslHashValue()` overload is provided (such as -// user-defined types). See "Adding Type Support to `absl::Hash`" below. -// * Types which define a `std::hash` specialization -// -// The fallback to legacy hash functions exists mainly for backwards -// compatibility. If you have a choice, prefer defining an `AbslHashValue` -// overload instead of specializing any legacy hash functors. -// -// ----------------------------------------------------------------------------- -// The Hash State Concept, and using `HashState` for Type Erasure -// ----------------------------------------------------------------------------- -// -// The `absl::Hash` framework relies on the Concept of a "hash state." Such a -// hash state is used in several places: -// -// * Within existing implementations of `absl::Hash` to store the hashed -// state of an object. Note that it is up to the implementation how it stores -// such state. A hash table, for example, may mix the state to produce an -// integer value; a testing framework may simply hold a vector of that state. -// * Within implementations of `AbslHashValue()` used to extend user-defined -// types. (See "Adding Type Support to absl::Hash" below.) -// * Inside a `HashState`, providing type erasure for the concept of a hash -// state, which you can use to extend the `absl::Hash` framework for types -// that are otherwise difficult to extend using `AbslHashValue()`. (See the -// `HashState` class below.) -// -// The "hash state" concept contains three member functions for mixing hash -// state: -// -// * `H::combine(state, values...)` -// -// Combines an arbitrary number of values into a hash state, returning the -// updated state. Note that the existing hash state is move-only and must be -// passed by value. -// -// Each of the value types T must be hashable by H. -// -// NOTE: -// -// state = H::combine(std::move(state), value1, value2, value3); -// -// must be guaranteed to produce the same hash expansion as -// -// state = H::combine(std::move(state), value1); -// state = H::combine(std::move(state), value2); -// state = H::combine(std::move(state), value3); -// -// * `H::combine_contiguous(state, data, size)` -// -// Combines a contiguous array of `size` elements into a hash state, -// returning the updated state. Note that the existing hash state is -// move-only and must be passed by value. -// -// NOTE: -// -// state = H::combine_contiguous(std::move(state), data, size); -// -// need NOT be guaranteed to produce the same hash expansion as a loop -// (it may perform internal optimizations). If you need this guarantee, use a -// loop instead. -// -// * `H::combine_unordered(state, begin, end)` -// -// Combines a set of elements denoted by an iterator pair into a hash -// state, returning the updated state. Note that the existing hash -// state is move-only and must be passed by value. -// -// Unlike the other two methods, the hashing is order-independent. -// This can be used to hash unordered collections. -// -// ----------------------------------------------------------------------------- -// Adding Type Support to `absl::Hash` -// ----------------------------------------------------------------------------- -// -// To add support for your user-defined type, add a proper `AbslHashValue()` -// overload as a free (non-member) function. The overload will take an -// existing hash state and should combine that state with state from the type. -// -// Example: -// -// template -// H AbslHashValue(H state, const MyType& v) { -// return H::combine(std::move(state), v.field1, ..., v.fieldN); -// } -// -// where `(field1, ..., fieldN)` are the members you would use on your -// `operator==` to define equality. -// -// Notice that `AbslHashValue` is not a class member, but an ordinary function. -// An `AbslHashValue` overload for a type should only be declared in the same -// file and namespace as said type. The proper `AbslHashValue` implementation -// for a given type will be discovered via ADL. -// -// Note: unlike `std::hash', `absl::Hash` should never be specialized. It must -// only be extended by adding `AbslHashValue()` overloads. -// -template -using Hash = absl::hash_internal::Hash; - -// HashOf -// -// absl::HashOf() is a helper that generates a hash from the values of its -// arguments. It dispatches to absl::Hash directly, as follows: -// * HashOf(t) == absl::Hash{}(t) -// * HashOf(a, b, c) == HashOf(std::make_tuple(a, b, c)) -// -// HashOf(a1, a2, ...) == HashOf(b1, b2, ...) is guaranteed when -// * The argument lists have pairwise identical C++ types -// * a1 == b1 && a2 == b2 && ... -// -// The requirement that the arguments match in both type and value is critical. -// It means that `a == b` does not necessarily imply `HashOf(a) == HashOf(b)` if -// `a` and `b` have different types. For example, `HashOf(2) != HashOf(2.0)`. -template -size_t HashOf(const Types&... values) { - auto tuple = std::tie(values...); - return absl::Hash{}(tuple); -} - -// HashState -// -// A type erased version of the hash state concept, for use in user-defined -// `AbslHashValue` implementations that can't use templates (such as PImpl -// classes, virtual functions, etc.). The type erasure adds overhead so it -// should be avoided unless necessary. -// -// Note: This wrapper will only erase calls to -// combine_contiguous(H, const unsigned char*, size_t) -// RunCombineUnordered(H, CombinerF) -// -// All other calls will be handled internally and will not invoke overloads -// provided by the wrapped class. -// -// Users of this class should still define a template `AbslHashValue` function, -// but can use `absl::HashState::Create(&state)` to erase the type of the hash -// state and dispatch to their private hashing logic. -// -// This state can be used like any other hash state. In particular, you can call -// `HashState::combine()` and `HashState::combine_contiguous()` on it. -// -// Example: -// -// class Interface { -// public: -// template -// friend H AbslHashValue(H state, const Interface& value) { -// state = H::combine(std::move(state), std::type_index(typeid(*this))); -// value.HashValue(absl::HashState::Create(&state)); -// return state; -// } -// private: -// virtual void HashValue(absl::HashState state) const = 0; -// }; -// -// class Impl : Interface { -// private: -// void HashValue(absl::HashState state) const override { -// absl::HashState::combine(std::move(state), v1_, v2_); -// } -// int v1_; -// std::string v2_; -// }; -class HashState : public hash_internal::HashStateBase { - public: - // HashState::Create() - // - // Create a new `HashState` instance that wraps `state`. All calls to - // `combine()` and `combine_contiguous()` on the new instance will be - // redirected to the original `state` object. The `state` object must outlive - // the `HashState` instance. - template - static HashState Create(T* state) { - HashState s; - s.Init(state); - return s; - } - - HashState(const HashState&) = delete; - HashState& operator=(const HashState&) = delete; - HashState(HashState&&) = default; - HashState& operator=(HashState&&) = default; - - // HashState::combine() - // - // Combines an arbitrary number of values into a hash state, returning the - // updated state. - using HashState::HashStateBase::combine; - - // HashState::combine_contiguous() - // - // Combines a contiguous array of `size` elements into a hash state, returning - // the updated state. - static HashState combine_contiguous(HashState hash_state, - const unsigned char* first, size_t size) { - hash_state.combine_contiguous_(hash_state.state_, first, size); - return hash_state; - } - using HashState::HashStateBase::combine_contiguous; - - private: - HashState() = default; - - friend class HashState::HashStateBase; - - template - static void CombineContiguousImpl(void* p, const unsigned char* first, - size_t size) { - T& state = *static_cast(p); - state = T::combine_contiguous(std::move(state), first, size); - } - - template - void Init(T* state) { - state_ = state; - combine_contiguous_ = &CombineContiguousImpl; - run_combine_unordered_ = &RunCombineUnorderedImpl; - } - - template - struct CombineUnorderedInvoker { - template - void operator()(T inner_state, ConsumerT inner_cb) { - f(HashState::Create(&inner_state), - [&](HashState& inner_erased) { inner_cb(inner_erased.Real()); }); - } - - absl::FunctionRef)> f; - }; - - template - static HashState RunCombineUnorderedImpl( - HashState state, - absl::FunctionRef)> - f) { - // Note that this implementation assumes that inner_state and outer_state - // are the same type. This isn't true in the SpyHash case, but SpyHash - // types are move-convertible to each other, so this still works. - T& real_state = state.Real(); - real_state = T::RunCombineUnordered( - std::move(real_state), CombineUnorderedInvoker{f}); - return state; - } - - template - static HashState RunCombineUnordered(HashState state, CombinerT combiner) { - auto* run = state.run_combine_unordered_; - return run(std::move(state), std::ref(combiner)); - } - - // Do not erase an already erased state. - void Init(HashState* state) { - state_ = state->state_; - combine_contiguous_ = state->combine_contiguous_; - run_combine_unordered_ = state->run_combine_unordered_; - } - - template - T& Real() { - return *static_cast(state_); - } - - void* state_; - void (*combine_contiguous_)(void*, const unsigned char*, size_t); - HashState (*run_combine_unordered_)( - HashState state, - absl::FunctionRef)>); -}; - -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_HASH_HASH_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/city.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/city.h deleted file mode 100644 index 393da0b..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/city.h +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// https://code.google.com/p/cityhash/ -// -// This file provides a few functions for hashing strings. All of them are -// high-quality functions in the sense that they pass standard tests such -// as Austin Appleby's SMHasher. They are also fast. -// -// For 64-bit x86 code, on short strings, we don't know of anything faster than -// CityHash64 that is of comparable quality. We believe our nearest competitor -// is Murmur3. For 64-bit x86 code, CityHash64 is an excellent choice for hash -// tables and most other hashing (excluding cryptography). -// -// For 32-bit x86 code, we don't know of anything faster than CityHash32 that -// is of comparable quality. We believe our nearest competitor is Murmur3A. -// (On 64-bit CPUs, it is typically faster to use the other CityHash variants.) -// -// Functions in the CityHash family are not suitable for cryptography. -// -// Please see CityHash's README file for more details on our performance -// measurements and so on. -// -// WARNING: This code has been only lightly tested on big-endian platforms! -// It is known to work well on little-endian platforms that have a small penalty -// for unaligned reads, such as current Intel and AMD moderate-to-high-end CPUs. -// It should work on all 32-bit and 64-bit platforms that allow unaligned reads; -// bug reports are welcome. -// -// By the way, for some hash functions, given strings a and b, the hash -// of a+b is easily derived from the hashes of a and b. This property -// doesn't hold for any hash functions in this file. - -#ifndef ABSL_HASH_INTERNAL_CITY_H_ -#define ABSL_HASH_INTERNAL_CITY_H_ - -#include -#include // for size_t. - -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace hash_internal { - -// Hash function for a byte array. -uint64_t CityHash64(const char *s, size_t len); - -// Hash function for a byte array. For convenience, a 64-bit seed is also -// hashed into the result. -uint64_t CityHash64WithSeed(const char *s, size_t len, uint64_t seed); - -// Hash function for a byte array. For convenience, two seeds are also -// hashed into the result. -uint64_t CityHash64WithSeeds(const char *s, size_t len, uint64_t seed0, - uint64_t seed1); - -// Hash function for a byte array. Most useful in 32-bit binaries. -uint32_t CityHash32(const char *s, size_t len); - -} // namespace hash_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_HASH_INTERNAL_CITY_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/hash.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/hash.h deleted file mode 100644 index 45dfdd4..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/hash.h +++ /dev/null @@ -1,1291 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: hash.h -// ----------------------------------------------------------------------------- -// -#ifndef ABSL_HASH_INTERNAL_HASH_H_ -#define ABSL_HASH_INTERNAL_HASH_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/base/config.h" -#include "absl/base/internal/unaligned_access.h" -#include "absl/base/port.h" -#include "absl/container/fixed_array.h" -#include "absl/hash/internal/city.h" -#include "absl/hash/internal/low_level_hash.h" -#include "absl/meta/type_traits.h" -#include "absl/numeric/int128.h" -#include "absl/strings/string_view.h" -#include "absl/types/optional.h" -#include "absl/types/variant.h" -#include "absl/utility/utility.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -class HashState; - -namespace hash_internal { - -// Internal detail: Large buffers are hashed in smaller chunks. This function -// returns the size of these chunks. -constexpr size_t PiecewiseChunkSize() { return 1024; } - -// PiecewiseCombiner -// -// PiecewiseCombiner is an internal-only helper class for hashing a piecewise -// buffer of `char` or `unsigned char` as though it were contiguous. This class -// provides two methods: -// -// H add_buffer(state, data, size) -// H finalize(state) -// -// `add_buffer` can be called zero or more times, followed by a single call to -// `finalize`. This will produce the same hash expansion as concatenating each -// buffer piece into a single contiguous buffer, and passing this to -// `H::combine_contiguous`. -// -// Example usage: -// PiecewiseCombiner combiner; -// for (const auto& piece : pieces) { -// state = combiner.add_buffer(std::move(state), piece.data, piece.size); -// } -// return combiner.finalize(std::move(state)); -class PiecewiseCombiner { - public: - PiecewiseCombiner() : position_(0) {} - PiecewiseCombiner(const PiecewiseCombiner&) = delete; - PiecewiseCombiner& operator=(const PiecewiseCombiner&) = delete; - - // PiecewiseCombiner::add_buffer() - // - // Appends the given range of bytes to the sequence to be hashed, which may - // modify the provided hash state. - template - H add_buffer(H state, const unsigned char* data, size_t size); - template - H add_buffer(H state, const char* data, size_t size) { - return add_buffer(std::move(state), - reinterpret_cast(data), size); - } - - // PiecewiseCombiner::finalize() - // - // Finishes combining the hash sequence, which may may modify the provided - // hash state. - // - // Once finalize() is called, add_buffer() may no longer be called. The - // resulting hash state will be the same as if the pieces passed to - // add_buffer() were concatenated into a single flat buffer, and then provided - // to H::combine_contiguous(). - template - H finalize(H state); - - private: - unsigned char buf_[PiecewiseChunkSize()]; - size_t position_; -}; - -// is_hashable() -// -// Trait class which returns true if T is hashable by the absl::Hash framework. -// Used for the AbslHashValue implementations for composite types below. -template -struct is_hashable; - -// HashStateBase -// -// An internal implementation detail that contains common implementation details -// for all of the "hash state objects" objects generated by Abseil. This is not -// a public API; users should not create classes that inherit from this. -// -// A hash state object is the template argument `H` passed to `AbslHashValue`. -// It represents an intermediate state in the computation of an unspecified hash -// algorithm. `HashStateBase` provides a CRTP style base class for hash state -// implementations. Developers adding type support for `absl::Hash` should not -// rely on any parts of the state object other than the following member -// functions: -// -// * HashStateBase::combine() -// * HashStateBase::combine_contiguous() -// * HashStateBase::combine_unordered() -// -// A derived hash state class of type `H` must provide a public member function -// with a signature similar to the following: -// -// `static H combine_contiguous(H state, const unsigned char*, size_t)`. -// -// It must also provide a private template method named RunCombineUnordered. -// -// A "consumer" is a 1-arg functor returning void. Its argument is a reference -// to an inner hash state object, and it may be called multiple times. When -// called, the functor consumes the entropy from the provided state object, -// and resets that object to its empty state. -// -// A "combiner" is a stateless 2-arg functor returning void. Its arguments are -// an inner hash state object and an ElementStateConsumer functor. A combiner -// uses the provided inner hash state object to hash each element of the -// container, passing the inner hash state object to the consumer after hashing -// each element. -// -// Given these definitions, a derived hash state class of type H -// must provide a private template method with a signature similar to the -// following: -// -// `template ` -// `static H RunCombineUnordered(H outer_state, CombinerT combiner)` -// -// This function is responsible for constructing the inner state object and -// providing a consumer to the combiner. It uses side effects of the consumer -// and combiner to mix the state of each element in an order-independent manner, -// and uses this to return an updated value of `outer_state`. -// -// This inside-out approach generates efficient object code in the normal case, -// but allows us to use stack storage to implement the absl::HashState type -// erasure mechanism (avoiding heap allocations while hashing). -// -// `HashStateBase` will provide a complete implementation for a hash state -// object in terms of these two methods. -// -// Example: -// -// // Use CRTP to define your derived class. -// struct MyHashState : HashStateBase { -// static H combine_contiguous(H state, const unsigned char*, size_t); -// using MyHashState::HashStateBase::combine; -// using MyHashState::HashStateBase::combine_contiguous; -// using MyHashState::HashStateBase::combine_unordered; -// private: -// template -// static H RunCombineUnordered(H state, CombinerT combiner); -// }; -template -class HashStateBase { - public: - // HashStateBase::combine() - // - // Combines an arbitrary number of values into a hash state, returning the - // updated state. - // - // Each of the value types `T` must be separately hashable by the Abseil - // hashing framework. - // - // NOTE: - // - // state = H::combine(std::move(state), value1, value2, value3); - // - // is guaranteed to produce the same hash expansion as: - // - // state = H::combine(std::move(state), value1); - // state = H::combine(std::move(state), value2); - // state = H::combine(std::move(state), value3); - template - static H combine(H state, const T& value, const Ts&... values); - static H combine(H state) { return state; } - - // HashStateBase::combine_contiguous() - // - // Combines a contiguous array of `size` elements into a hash state, returning - // the updated state. - // - // NOTE: - // - // state = H::combine_contiguous(std::move(state), data, size); - // - // is NOT guaranteed to produce the same hash expansion as a for-loop (it may - // perform internal optimizations). If you need this guarantee, use the - // for-loop instead. - template - static H combine_contiguous(H state, const T* data, size_t size); - - template - static H combine_unordered(H state, I begin, I end); - - using AbslInternalPiecewiseCombiner = PiecewiseCombiner; - - template - using is_hashable = absl::hash_internal::is_hashable; - - private: - // Common implementation of the iteration step of a "combiner", as described - // above. - template - struct CombineUnorderedCallback { - I begin; - I end; - - template - void operator()(InnerH inner_state, ElementStateConsumer cb) { - for (; begin != end; ++begin) { - inner_state = H::combine(std::move(inner_state), *begin); - cb(inner_state); - } - } - }; -}; - -// is_uniquely_represented -// -// `is_uniquely_represented` is a trait class that indicates whether `T` -// is uniquely represented. -// -// A type is "uniquely represented" if two equal values of that type are -// guaranteed to have the same bytes in their underlying storage. In other -// words, if `a == b`, then `memcmp(&a, &b, sizeof(T))` is guaranteed to be -// zero. This property cannot be detected automatically, so this trait is false -// by default, but can be specialized by types that wish to assert that they are -// uniquely represented. This makes them eligible for certain optimizations. -// -// If you have any doubt whatsoever, do not specialize this template. -// The default is completely safe, and merely disables some optimizations -// that will not matter for most types. Specializing this template, -// on the other hand, can be very hazardous. -// -// To be uniquely represented, a type must not have multiple ways of -// representing the same value; for example, float and double are not -// uniquely represented, because they have distinct representations for -// +0 and -0. Furthermore, the type's byte representation must consist -// solely of user-controlled data, with no padding bits and no compiler- -// controlled data such as vptrs or sanitizer metadata. This is usually -// very difficult to guarantee, because in most cases the compiler can -// insert data and padding bits at its own discretion. -// -// If you specialize this template for a type `T`, you must do so in the file -// that defines that type (or in this file). If you define that specialization -// anywhere else, `is_uniquely_represented` could have different meanings -// in different places. -// -// The Enable parameter is meaningless; it is provided as a convenience, -// to support certain SFINAE techniques when defining specializations. -template -struct is_uniquely_represented : std::false_type {}; - -// is_uniquely_represented -// -// unsigned char is a synonym for "byte", so it is guaranteed to be -// uniquely represented. -template <> -struct is_uniquely_represented : std::true_type {}; - -// is_uniquely_represented for non-standard integral types -// -// Integral types other than bool should be uniquely represented on any -// platform that this will plausibly be ported to. -template -struct is_uniquely_represented< - Integral, typename std::enable_if::value>::type> - : std::true_type {}; - -// is_uniquely_represented -// -// -template <> -struct is_uniquely_represented : std::false_type {}; - -// hash_bytes() -// -// Convenience function that combines `hash_state` with the byte representation -// of `value`. -template -H hash_bytes(H hash_state, const T& value) { - const unsigned char* start = reinterpret_cast(&value); - return H::combine_contiguous(std::move(hash_state), start, sizeof(value)); -} - -// ----------------------------------------------------------------------------- -// AbslHashValue for Basic Types -// ----------------------------------------------------------------------------- - -// Note: Default `AbslHashValue` implementations live in `hash_internal`. This -// allows us to block lexical scope lookup when doing an unqualified call to -// `AbslHashValue` below. User-defined implementations of `AbslHashValue` can -// only be found via ADL. - -// AbslHashValue() for hashing bool values -// -// We use SFINAE to ensure that this overload only accepts bool, not types that -// are convertible to bool. -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, B value) { - return H::combine(std::move(hash_state), - static_cast(value ? 1 : 0)); -} - -// AbslHashValue() for hashing enum values -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, Enum e) { - // In practice, we could almost certainly just invoke hash_bytes directly, - // but it's possible that a sanitizer might one day want to - // store data in the unused bits of an enum. To avoid that risk, we - // convert to the underlying type before hashing. Hopefully this will get - // optimized away; if not, we can reopen discussion with c-toolchain-team. - return H::combine(std::move(hash_state), - static_cast::type>(e)); -} -// AbslHashValue() for hashing floating-point values -template -typename std::enable_if::value || - std::is_same::value, - H>::type -AbslHashValue(H hash_state, Float value) { - return hash_internal::hash_bytes(std::move(hash_state), - value == 0 ? 0 : value); -} - -// Long double has the property that it might have extra unused bytes in it. -// For example, in x86 sizeof(long double)==16 but it only really uses 80-bits -// of it. This means we can't use hash_bytes on a long double and have to -// convert it to something else first. -template -typename std::enable_if::value, H>::type -AbslHashValue(H hash_state, LongDouble value) { - const int category = std::fpclassify(value); - switch (category) { - case FP_INFINITE: - // Add the sign bit to differentiate between +Inf and -Inf - hash_state = H::combine(std::move(hash_state), std::signbit(value)); - break; - - case FP_NAN: - case FP_ZERO: - default: - // Category is enough for these. - break; - - case FP_NORMAL: - case FP_SUBNORMAL: - // We can't convert `value` directly to double because this would have - // undefined behavior if the value is out of range. - // std::frexp gives us a value in the range (-1, -.5] or [.5, 1) that is - // guaranteed to be in range for `double`. The truncation is - // implementation defined, but that works as long as it is deterministic. - int exp; - auto mantissa = static_cast(std::frexp(value, &exp)); - hash_state = H::combine(std::move(hash_state), mantissa, exp); - } - - return H::combine(std::move(hash_state), category); -} - -// AbslHashValue() for hashing pointers -template -H AbslHashValue(H hash_state, T* ptr) { - auto v = reinterpret_cast(ptr); - // Due to alignment, pointers tend to have low bits as zero, and the next few - // bits follow a pattern since they are also multiples of some base value. - // Mixing the pointer twice helps prevent stuck low bits for certain alignment - // values. - return H::combine(std::move(hash_state), v, v); -} - -// AbslHashValue() for hashing nullptr_t -template -H AbslHashValue(H hash_state, std::nullptr_t) { - return H::combine(std::move(hash_state), static_cast(nullptr)); -} - -// AbslHashValue() for hashing pointers-to-member -template -H AbslHashValue(H hash_state, T C::* ptr) { - auto salient_ptm_size = [](std::size_t n) -> std::size_t { -#if defined(_MSC_VER) - // Pointers-to-member-function on MSVC consist of one pointer plus 0, 1, 2, - // or 3 ints. In 64-bit mode, they are 8-byte aligned and thus can contain - // padding (namely when they have 1 or 3 ints). The value below is a lower - // bound on the number of salient, non-padding bytes that we use for - // hashing. - if (alignof(T C::*) == alignof(int)) { - // No padding when all subobjects have the same size as the total - // alignment. This happens in 32-bit mode. - return n; - } else { - // Padding for 1 int (size 16) or 3 ints (size 24). - // With 2 ints, the size is 16 with no padding, which we pessimize. - return n == 24 ? 20 : n == 16 ? 12 : n; - } -#else - // On other platforms, we assume that pointers-to-members do not have - // padding. -#ifdef __cpp_lib_has_unique_object_representations - static_assert(std::has_unique_object_representations_v); -#endif // __cpp_lib_has_unique_object_representations - return n; -#endif - }; - return H::combine_contiguous(std::move(hash_state), - reinterpret_cast(&ptr), - salient_ptm_size(sizeof ptr)); -} - -// ----------------------------------------------------------------------------- -// AbslHashValue for Composite Types -// ----------------------------------------------------------------------------- - -// AbslHashValue() for hashing pairs -template -typename std::enable_if::value && is_hashable::value, - H>::type -AbslHashValue(H hash_state, const std::pair& p) { - return H::combine(std::move(hash_state), p.first, p.second); -} - -// hash_tuple() -// -// Helper function for hashing a tuple. The third argument should -// be an index_sequence running from 0 to tuple_size - 1. -template -H hash_tuple(H hash_state, const Tuple& t, absl::index_sequence) { - return H::combine(std::move(hash_state), std::get(t)...); -} - -// AbslHashValue for hashing tuples -template -#if defined(_MSC_VER) -// This SFINAE gets MSVC confused under some conditions. Let's just disable it -// for now. -H -#else // _MSC_VER -typename std::enable_if...>::value, H>::type -#endif // _MSC_VER -AbslHashValue(H hash_state, const std::tuple& t) { - return hash_internal::hash_tuple(std::move(hash_state), t, - absl::make_index_sequence()); -} - -// ----------------------------------------------------------------------------- -// AbslHashValue for Pointers -// ----------------------------------------------------------------------------- - -// AbslHashValue for hashing unique_ptr -template -H AbslHashValue(H hash_state, const std::unique_ptr& ptr) { - return H::combine(std::move(hash_state), ptr.get()); -} - -// AbslHashValue for hashing shared_ptr -template -H AbslHashValue(H hash_state, const std::shared_ptr& ptr) { - return H::combine(std::move(hash_state), ptr.get()); -} - -// ----------------------------------------------------------------------------- -// AbslHashValue for String-Like Types -// ----------------------------------------------------------------------------- - -// AbslHashValue for hashing strings -// -// All the string-like types supported here provide the same hash expansion for -// the same character sequence. These types are: -// -// - `absl::Cord` -// - `std::string` (and std::basic_string, A> for -// any allocator A) -// - `absl::string_view` and `std::string_view` -// -// For simplicity, we currently support only `char` strings. This support may -// be broadened, if necessary, but with some caution - this overload would -// misbehave in cases where the traits' `eq()` member isn't equivalent to `==` -// on the underlying character type. -template -H AbslHashValue(H hash_state, absl::string_view str) { - return H::combine( - H::combine_contiguous(std::move(hash_state), str.data(), str.size()), - str.size()); -} - -// Support std::wstring, std::u16string and std::u32string. -template ::value || - std::is_same::value || - std::is_same::value>> -H AbslHashValue( - H hash_state, - const std::basic_string, Alloc>& str) { - return H::combine( - H::combine_contiguous(std::move(hash_state), str.data(), str.size()), - str.size()); -} - -// ----------------------------------------------------------------------------- -// AbslHashValue for Sequence Containers -// ----------------------------------------------------------------------------- - -// AbslHashValue for hashing std::array -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, const std::array& array) { - return H::combine_contiguous(std::move(hash_state), array.data(), - array.size()); -} - -// AbslHashValue for hashing std::deque -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, const std::deque& deque) { - // TODO(gromer): investigate a more efficient implementation taking - // advantage of the chunk structure. - for (const auto& t : deque) { - hash_state = H::combine(std::move(hash_state), t); - } - return H::combine(std::move(hash_state), deque.size()); -} - -// AbslHashValue for hashing std::forward_list -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, const std::forward_list& list) { - size_t size = 0; - for (const T& t : list) { - hash_state = H::combine(std::move(hash_state), t); - ++size; - } - return H::combine(std::move(hash_state), size); -} - -// AbslHashValue for hashing std::list -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, const std::list& list) { - for (const auto& t : list) { - hash_state = H::combine(std::move(hash_state), t); - } - return H::combine(std::move(hash_state), list.size()); -} - -// AbslHashValue for hashing std::vector -// -// Do not use this for vector on platforms that have a working -// implementation of std::hash. It does not have a .data(), and a fallback for -// std::hash<> is most likely faster. -template -typename std::enable_if::value && !std::is_same::value, - H>::type -AbslHashValue(H hash_state, const std::vector& vector) { - return H::combine(H::combine_contiguous(std::move(hash_state), vector.data(), - vector.size()), - vector.size()); -} - -// AbslHashValue special cases for hashing std::vector - -#if defined(ABSL_IS_BIG_ENDIAN) && \ - (defined(__GLIBCXX__) || defined(__GLIBCPP__)) - -// std::hash in libstdc++ does not work correctly with vector on Big -// Endian platforms therefore we need to implement a custom AbslHashValue for -// it. More details on the bug: -// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102531 -template -typename std::enable_if::value && std::is_same::value, - H>::type -AbslHashValue(H hash_state, const std::vector& vector) { - typename H::AbslInternalPiecewiseCombiner combiner; - for (const auto& i : vector) { - unsigned char c = static_cast(i); - hash_state = combiner.add_buffer(std::move(hash_state), &c, sizeof(c)); - } - return H::combine(combiner.finalize(std::move(hash_state)), vector.size()); -} -#else -// When not working around the libstdc++ bug above, we still have to contend -// with the fact that std::hash> is often poor quality, hashing -// directly on the internal words and on no other state. On these platforms, -// vector{1, 1} and vector{1, 1, 0} hash to the same value. -// -// Mixing in the size (as we do in our other vector<> implementations) on top -// of the library-provided hash implementation avoids this QOI issue. -template -typename std::enable_if::value && std::is_same::value, - H>::type -AbslHashValue(H hash_state, const std::vector& vector) { - return H::combine(std::move(hash_state), - std::hash>{}(vector), - vector.size()); -} -#endif - -// ----------------------------------------------------------------------------- -// AbslHashValue for Ordered Associative Containers -// ----------------------------------------------------------------------------- - -// AbslHashValue for hashing std::map -template -typename std::enable_if::value && is_hashable::value, - H>::type -AbslHashValue(H hash_state, const std::map& map) { - for (const auto& t : map) { - hash_state = H::combine(std::move(hash_state), t); - } - return H::combine(std::move(hash_state), map.size()); -} - -// AbslHashValue for hashing std::multimap -template -typename std::enable_if::value && is_hashable::value, - H>::type -AbslHashValue(H hash_state, - const std::multimap& map) { - for (const auto& t : map) { - hash_state = H::combine(std::move(hash_state), t); - } - return H::combine(std::move(hash_state), map.size()); -} - -// AbslHashValue for hashing std::set -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, const std::set& set) { - for (const auto& t : set) { - hash_state = H::combine(std::move(hash_state), t); - } - return H::combine(std::move(hash_state), set.size()); -} - -// AbslHashValue for hashing std::multiset -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, const std::multiset& set) { - for (const auto& t : set) { - hash_state = H::combine(std::move(hash_state), t); - } - return H::combine(std::move(hash_state), set.size()); -} - -// ----------------------------------------------------------------------------- -// AbslHashValue for Unordered Associative Containers -// ----------------------------------------------------------------------------- - -// AbslHashValue for hashing std::unordered_set -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, const std::unordered_set& s) { - return H::combine( - H::combine_unordered(std::move(hash_state), s.begin(), s.end()), - s.size()); -} - -// AbslHashValue for hashing std::unordered_multiset -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, - const std::unordered_multiset& s) { - return H::combine( - H::combine_unordered(std::move(hash_state), s.begin(), s.end()), - s.size()); -} - -// AbslHashValue for hashing std::unordered_set -template -typename std::enable_if::value && is_hashable::value, - H>::type -AbslHashValue(H hash_state, - const std::unordered_map& s) { - return H::combine( - H::combine_unordered(std::move(hash_state), s.begin(), s.end()), - s.size()); -} - -// AbslHashValue for hashing std::unordered_multiset -template -typename std::enable_if::value && is_hashable::value, - H>::type -AbslHashValue(H hash_state, - const std::unordered_multimap& s) { - return H::combine( - H::combine_unordered(std::move(hash_state), s.begin(), s.end()), - s.size()); -} - -// ----------------------------------------------------------------------------- -// AbslHashValue for Wrapper Types -// ----------------------------------------------------------------------------- - -// AbslHashValue for hashing std::reference_wrapper -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, std::reference_wrapper opt) { - return H::combine(std::move(hash_state), opt.get()); -} - -// AbslHashValue for hashing absl::optional -template -typename std::enable_if::value, H>::type AbslHashValue( - H hash_state, const absl::optional& opt) { - if (opt) hash_state = H::combine(std::move(hash_state), *opt); - return H::combine(std::move(hash_state), opt.has_value()); -} - -// VariantVisitor -template -struct VariantVisitor { - H&& hash_state; - template - H operator()(const T& t) const { - return H::combine(std::move(hash_state), t); - } -}; - -// AbslHashValue for hashing absl::variant -template -typename std::enable_if...>::value, H>::type -AbslHashValue(H hash_state, const absl::variant& v) { - if (!v.valueless_by_exception()) { - hash_state = absl::visit(VariantVisitor{std::move(hash_state)}, v); - } - return H::combine(std::move(hash_state), v.index()); -} - -// ----------------------------------------------------------------------------- -// AbslHashValue for Other Types -// ----------------------------------------------------------------------------- - -// AbslHashValue for hashing std::bitset is not defined on Little Endian -// platforms, for the same reason as for vector (see std::vector above): -// It does not expose the raw bytes, and a fallback to std::hash<> is most -// likely faster. - -#if defined(ABSL_IS_BIG_ENDIAN) && \ - (defined(__GLIBCXX__) || defined(__GLIBCPP__)) -// AbslHashValue for hashing std::bitset -// -// std::hash in libstdc++ does not work correctly with std::bitset on Big Endian -// platforms therefore we need to implement a custom AbslHashValue for it. More -// details on the bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102531 -template -H AbslHashValue(H hash_state, const std::bitset& set) { - typename H::AbslInternalPiecewiseCombiner combiner; - for (int i = 0; i < N; i++) { - unsigned char c = static_cast(set[i]); - hash_state = combiner.add_buffer(std::move(hash_state), &c, sizeof(c)); - } - return H::combine(combiner.finalize(std::move(hash_state)), N); -} -#endif - -// ----------------------------------------------------------------------------- - -// hash_range_or_bytes() -// -// Mixes all values in the range [data, data+size) into the hash state. -// This overload accepts only uniquely-represented types, and hashes them by -// hashing the entire range of bytes. -template -typename std::enable_if::value, H>::type -hash_range_or_bytes(H hash_state, const T* data, size_t size) { - const auto* bytes = reinterpret_cast(data); - return H::combine_contiguous(std::move(hash_state), bytes, sizeof(T) * size); -} - -// hash_range_or_bytes() -template -typename std::enable_if::value, H>::type -hash_range_or_bytes(H hash_state, const T* data, size_t size) { - for (const auto end = data + size; data < end; ++data) { - hash_state = H::combine(std::move(hash_state), *data); - } - return hash_state; -} - -#if defined(ABSL_INTERNAL_LEGACY_HASH_NAMESPACE) && \ - ABSL_META_INTERNAL_STD_HASH_SFINAE_FRIENDLY_ -#define ABSL_HASH_INTERNAL_SUPPORT_LEGACY_HASH_ 1 -#else -#define ABSL_HASH_INTERNAL_SUPPORT_LEGACY_HASH_ 0 -#endif - -// HashSelect -// -// Type trait to select the appropriate hash implementation to use. -// HashSelect::type will give the proper hash implementation, to be invoked -// as: -// HashSelect::type::Invoke(state, value) -// Also, HashSelect::type::value is a boolean equal to `true` if there is a -// valid `Invoke` function. Types that are not hashable will have a ::value of -// `false`. -struct HashSelect { - private: - struct State : HashStateBase { - static State combine_contiguous(State hash_state, const unsigned char*, - size_t); - using State::HashStateBase::combine_contiguous; - }; - - struct UniquelyRepresentedProbe { - template - static auto Invoke(H state, const T& value) - -> absl::enable_if_t::value, H> { - return hash_internal::hash_bytes(std::move(state), value); - } - }; - - struct HashValueProbe { - template - static auto Invoke(H state, const T& value) -> absl::enable_if_t< - std::is_same::value, - H> { - return AbslHashValue(std::move(state), value); - } - }; - - struct LegacyHashProbe { -#if ABSL_HASH_INTERNAL_SUPPORT_LEGACY_HASH_ - template - static auto Invoke(H state, const T& value) -> absl::enable_if_t< - std::is_convertible< - decltype(ABSL_INTERNAL_LEGACY_HASH_NAMESPACE::hash()(value)), - size_t>::value, - H> { - return hash_internal::hash_bytes( - std::move(state), - ABSL_INTERNAL_LEGACY_HASH_NAMESPACE::hash{}(value)); - } -#endif // ABSL_HASH_INTERNAL_SUPPORT_LEGACY_HASH_ - }; - - struct StdHashProbe { - template - static auto Invoke(H state, const T& value) - -> absl::enable_if_t::value, H> { - return hash_internal::hash_bytes(std::move(state), std::hash{}(value)); - } - }; - - template - struct Probe : Hash { - private: - template (), std::declval()))> - static std::true_type Test(int); - template - static std::false_type Test(char); - - public: - static constexpr bool value = decltype(Test(0))::value; - }; - - public: - // Probe each implementation in order. - // disjunction provides short circuiting wrt instantiation. - template - using Apply = absl::disjunction< // - Probe, // - Probe, // - Probe, // - Probe, // - std::false_type>; -}; - -template -struct is_hashable - : std::integral_constant::value> {}; - -// MixingHashState -class ABSL_DLL MixingHashState : public HashStateBase { - // absl::uint128 is not an alias or a thin wrapper around the intrinsic. - // We use the intrinsic when available to improve performance. -#ifdef ABSL_HAVE_INTRINSIC_INT128 - using uint128 = __uint128_t; -#else // ABSL_HAVE_INTRINSIC_INT128 - using uint128 = absl::uint128; -#endif // ABSL_HAVE_INTRINSIC_INT128 - - static constexpr uint64_t kMul = - sizeof(size_t) == 4 ? uint64_t{0xcc9e2d51} - : uint64_t{0x9ddfea08eb382d69}; - - template - using IntegralFastPath = - conjunction, is_uniquely_represented>; - - public: - // Move only - MixingHashState(MixingHashState&&) = default; - MixingHashState& operator=(MixingHashState&&) = default; - - // MixingHashState::combine_contiguous() - // - // Fundamental base case for hash recursion: mixes the given range of bytes - // into the hash state. - static MixingHashState combine_contiguous(MixingHashState hash_state, - const unsigned char* first, - size_t size) { - return MixingHashState( - CombineContiguousImpl(hash_state.state_, first, size, - std::integral_constant{})); - } - using MixingHashState::HashStateBase::combine_contiguous; - - // MixingHashState::hash() - // - // For performance reasons in non-opt mode, we specialize this for - // integral types. - // Otherwise we would be instantiating and calling dozens of functions for - // something that is just one multiplication and a couple xor's. - // The result should be the same as running the whole algorithm, but faster. - template ::value, int> = 0> - static size_t hash(T value) { - return static_cast(Mix(Seed(), static_cast(value))); - } - - // Overload of MixingHashState::hash() - template ::value, int> = 0> - static size_t hash(const T& value) { - return static_cast(combine(MixingHashState{}, value).state_); - } - - private: - // Invoked only once for a given argument; that plus the fact that this is - // move-only ensures that there is only one non-moved-from object. - MixingHashState() : state_(Seed()) {} - - friend class MixingHashState::HashStateBase; - - template - static MixingHashState RunCombineUnordered(MixingHashState state, - CombinerT combiner) { - uint64_t unordered_state = 0; - combiner(MixingHashState{}, [&](MixingHashState& inner_state) { - // Add the hash state of the element to the running total, but mix the - // carry bit back into the low bit. This in intended to avoid losing - // entropy to overflow, especially when unordered_multisets contain - // multiple copies of the same value. - auto element_state = inner_state.state_; - unordered_state += element_state; - if (unordered_state < element_state) { - ++unordered_state; - } - inner_state = MixingHashState{}; - }); - return MixingHashState::combine(std::move(state), unordered_state); - } - - // Allow the HashState type-erasure implementation to invoke - // RunCombinedUnordered() directly. - friend class absl::HashState; - - // Workaround for MSVC bug. - // We make the type copyable to fix the calling convention, even though we - // never actually copy it. Keep it private to not affect the public API of the - // type. - MixingHashState(const MixingHashState&) = default; - - explicit MixingHashState(uint64_t state) : state_(state) {} - - // Implementation of the base case for combine_contiguous where we actually - // mix the bytes into the state. - // Dispatch to different implementations of the combine_contiguous depending - // on the value of `sizeof(size_t)`. - static uint64_t CombineContiguousImpl(uint64_t state, - const unsigned char* first, size_t len, - std::integral_constant - /* sizeof_size_t */); - static uint64_t CombineContiguousImpl(uint64_t state, - const unsigned char* first, size_t len, - std::integral_constant - /* sizeof_size_t */); - - // Slow dispatch path for calls to CombineContiguousImpl with a size argument - // larger than PiecewiseChunkSize(). Has the same effect as calling - // CombineContiguousImpl() repeatedly with the chunk stride size. - static uint64_t CombineLargeContiguousImpl32(uint64_t state, - const unsigned char* first, - size_t len); - static uint64_t CombineLargeContiguousImpl64(uint64_t state, - const unsigned char* first, - size_t len); - - // Reads 9 to 16 bytes from p. - // The least significant 8 bytes are in .first, the rest (zero padded) bytes - // are in .second. - static std::pair Read9To16(const unsigned char* p, - size_t len) { - uint64_t low_mem = absl::base_internal::UnalignedLoad64(p); - uint64_t high_mem = absl::base_internal::UnalignedLoad64(p + len - 8); -#ifdef ABSL_IS_LITTLE_ENDIAN - uint64_t most_significant = high_mem; - uint64_t least_significant = low_mem; -#else - uint64_t most_significant = low_mem; - uint64_t least_significant = high_mem; -#endif - return {least_significant, most_significant >> (128 - len * 8)}; - } - - // Reads 4 to 8 bytes from p. Zero pads to fill uint64_t. - static uint64_t Read4To8(const unsigned char* p, size_t len) { - uint32_t low_mem = absl::base_internal::UnalignedLoad32(p); - uint32_t high_mem = absl::base_internal::UnalignedLoad32(p + len - 4); -#ifdef ABSL_IS_LITTLE_ENDIAN - uint32_t most_significant = high_mem; - uint32_t least_significant = low_mem; -#else - uint32_t most_significant = low_mem; - uint32_t least_significant = high_mem; -#endif - return (static_cast(most_significant) << (len - 4) * 8) | - least_significant; - } - - // Reads 1 to 3 bytes from p. Zero pads to fill uint32_t. - static uint32_t Read1To3(const unsigned char* p, size_t len) { - unsigned char mem0 = p[0]; - unsigned char mem1 = p[len / 2]; - unsigned char mem2 = p[len - 1]; -#ifdef ABSL_IS_LITTLE_ENDIAN - unsigned char significant2 = mem2; - unsigned char significant1 = mem1; - unsigned char significant0 = mem0; -#else - unsigned char significant2 = mem0; - unsigned char significant1 = mem1; - unsigned char significant0 = mem2; -#endif - return static_cast(significant0 | // - (significant1 << (len / 2 * 8)) | // - (significant2 << ((len - 1) * 8))); - } - - ABSL_ATTRIBUTE_ALWAYS_INLINE static uint64_t Mix(uint64_t state, uint64_t v) { - // Though the 128-bit product on AArch64 needs two instructions, it is - // still a good balance between speed and hash quality. - using MultType = - absl::conditional_t; - // We do the addition in 64-bit space to make sure the 128-bit - // multiplication is fast. If we were to do it as MultType the compiler has - // to assume that the high word is non-zero and needs to perform 2 - // multiplications instead of one. - MultType m = state + v; - m *= kMul; - return static_cast(m ^ (m >> (sizeof(m) * 8 / 2))); - } - - // An extern to avoid bloat on a direct call to LowLevelHash() with fixed - // values for both the seed and salt parameters. - static uint64_t LowLevelHashImpl(const unsigned char* data, size_t len); - - ABSL_ATTRIBUTE_ALWAYS_INLINE static uint64_t Hash64(const unsigned char* data, - size_t len) { -#ifdef ABSL_HAVE_INTRINSIC_INT128 - return LowLevelHashImpl(data, len); -#else - return hash_internal::CityHash64(reinterpret_cast(data), len); -#endif - } - - // Seed() - // - // A non-deterministic seed. - // - // The current purpose of this seed is to generate non-deterministic results - // and prevent having users depend on the particular hash values. - // It is not meant as a security feature right now, but it leaves the door - // open to upgrade it to a true per-process random seed. A true random seed - // costs more and we don't need to pay for that right now. - // - // On platforms with ASLR, we take advantage of it to make a per-process - // random value. - // See https://en.wikipedia.org/wiki/Address_space_layout_randomization - // - // On other platforms this is still going to be non-deterministic but most - // probably per-build and not per-process. - ABSL_ATTRIBUTE_ALWAYS_INLINE static uint64_t Seed() { -#if (!defined(__clang__) || __clang_major__ > 11) && \ - !defined(__apple_build_version__) - return static_cast(reinterpret_cast(&kSeed)); -#else - // Workaround the absence of - // https://github.com/llvm/llvm-project/commit/bc15bf66dcca76cc06fe71fca35b74dc4d521021. - return static_cast(reinterpret_cast(kSeed)); -#endif - } - static const void* const kSeed; - - uint64_t state_; -}; - -// MixingHashState::CombineContiguousImpl() -inline uint64_t MixingHashState::CombineContiguousImpl( - uint64_t state, const unsigned char* first, size_t len, - std::integral_constant /* sizeof_size_t */) { - // For large values we use CityHash, for small ones we just use a - // multiplicative hash. - uint64_t v; - if (len > 8) { - if (ABSL_PREDICT_FALSE(len > PiecewiseChunkSize())) { - return CombineLargeContiguousImpl32(state, first, len); - } - v = hash_internal::CityHash32(reinterpret_cast(first), len); - } else if (len >= 4) { - v = Read4To8(first, len); - } else if (len > 0) { - v = Read1To3(first, len); - } else { - // Empty ranges have no effect. - return state; - } - return Mix(state, v); -} - -// Overload of MixingHashState::CombineContiguousImpl() -inline uint64_t MixingHashState::CombineContiguousImpl( - uint64_t state, const unsigned char* first, size_t len, - std::integral_constant /* sizeof_size_t */) { - // For large values we use LowLevelHash or CityHash depending on the platform, - // for small ones we just use a multiplicative hash. - uint64_t v; - if (len > 16) { - if (ABSL_PREDICT_FALSE(len > PiecewiseChunkSize())) { - return CombineLargeContiguousImpl64(state, first, len); - } - v = Hash64(first, len); - } else if (len > 8) { - auto p = Read9To16(first, len); - state = Mix(state, p.first); - v = p.second; - } else if (len >= 4) { - v = Read4To8(first, len); - } else if (len > 0) { - v = Read1To3(first, len); - } else { - // Empty ranges have no effect. - return state; - } - return Mix(state, v); -} - -struct AggregateBarrier {}; - -// HashImpl - -// Add a private base class to make sure this type is not an aggregate. -// Aggregates can be aggregate initialized even if the default constructor is -// deleted. -struct PoisonedHash : private AggregateBarrier { - PoisonedHash() = delete; - PoisonedHash(const PoisonedHash&) = delete; - PoisonedHash& operator=(const PoisonedHash&) = delete; -}; - -template -struct HashImpl { - size_t operator()(const T& value) const { - return MixingHashState::hash(value); - } -}; - -template -struct Hash - : absl::conditional_t::value, HashImpl, PoisonedHash> {}; - -template -template -H HashStateBase::combine(H state, const T& value, const Ts&... values) { - return H::combine(hash_internal::HashSelect::template Apply::Invoke( - std::move(state), value), - values...); -} - -// HashStateBase::combine_contiguous() -template -template -H HashStateBase::combine_contiguous(H state, const T* data, size_t size) { - return hash_internal::hash_range_or_bytes(std::move(state), data, size); -} - -// HashStateBase::combine_unordered() -template -template -H HashStateBase::combine_unordered(H state, I begin, I end) { - return H::RunCombineUnordered(std::move(state), - CombineUnorderedCallback{begin, end}); -} - -// HashStateBase::PiecewiseCombiner::add_buffer() -template -H PiecewiseCombiner::add_buffer(H state, const unsigned char* data, - size_t size) { - if (position_ + size < PiecewiseChunkSize()) { - // This partial chunk does not fill our existing buffer - memcpy(buf_ + position_, data, size); - position_ += size; - return state; - } - - // If the buffer is partially filled we need to complete the buffer - // and hash it. - if (position_ != 0) { - const size_t bytes_needed = PiecewiseChunkSize() - position_; - memcpy(buf_ + position_, data, bytes_needed); - state = H::combine_contiguous(std::move(state), buf_, PiecewiseChunkSize()); - data += bytes_needed; - size -= bytes_needed; - } - - // Hash whatever chunks we can without copying - while (size >= PiecewiseChunkSize()) { - state = H::combine_contiguous(std::move(state), data, PiecewiseChunkSize()); - data += PiecewiseChunkSize(); - size -= PiecewiseChunkSize(); - } - // Fill the buffer with the remainder - memcpy(buf_, data, size); - position_ = size; - return state; -} - -// HashStateBase::PiecewiseCombiner::finalize() -template -H PiecewiseCombiner::finalize(H state) { - // Hash the remainder left in the buffer, which may be empty - return H::combine_contiguous(std::move(state), buf_, position_); -} - -} // namespace hash_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_HASH_INTERNAL_HASH_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/low_level_hash.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/low_level_hash.h deleted file mode 100644 index 439968a..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/hash/internal/low_level_hash.h +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2020 The Abseil Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// This file provides the Google-internal implementation of LowLevelHash. -// -// LowLevelHash is a fast hash function for hash tables, the fastest we've -// currently (late 2020) found that passes the SMHasher tests. The algorithm -// relies on intrinsic 128-bit multiplication for speed. This is not meant to be -// secure - just fast. -// -// It is closely based on a version of wyhash, but does not maintain or -// guarantee future compatibility with it. - -#ifndef ABSL_HASH_INTERNAL_LOW_LEVEL_HASH_H_ -#define ABSL_HASH_INTERNAL_LOW_LEVEL_HASH_H_ - -#include -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace hash_internal { - -// Hash function for a byte array. A 64-bit seed and a set of five 64-bit -// integers are hashed into the result. -// -// To allow all hashable types (including string_view and Span) to depend on -// this algorithm, we keep the API low-level, with as few dependencies as -// possible. -uint64_t LowLevelHash(const void* data, size_t len, uint64_t seed, - const uint64_t salt[5]); - -} // namespace hash_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_HASH_INTERNAL_LOW_LEVEL_HASH_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/memory/memory.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/memory/memory.h deleted file mode 100644 index d633260..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/memory/memory.h +++ /dev/null @@ -1,699 +0,0 @@ -// Copyright 2017 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: memory.h -// ----------------------------------------------------------------------------- -// -// This header file contains utility functions for managing the creation and -// conversion of smart pointers. This file is an extension to the C++ -// standard library header file. - -#ifndef ABSL_MEMORY_MEMORY_H_ -#define ABSL_MEMORY_MEMORY_H_ - -#include -#include -#include -#include -#include -#include - -#include "absl/base/macros.h" -#include "absl/meta/type_traits.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -// ----------------------------------------------------------------------------- -// Function Template: WrapUnique() -// ----------------------------------------------------------------------------- -// -// Adopts ownership from a raw pointer and transfers it to the returned -// `std::unique_ptr`, whose type is deduced. Because of this deduction, *do not* -// specify the template type `T` when calling `WrapUnique`. -// -// Example: -// X* NewX(int, int); -// auto x = WrapUnique(NewX(1, 2)); // 'x' is std::unique_ptr. -// -// Do not call WrapUnique with an explicit type, as in -// `WrapUnique(NewX(1, 2))`. The purpose of WrapUnique is to automatically -// deduce the pointer type. If you wish to make the type explicit, just use -// `std::unique_ptr` directly. -// -// auto x = std::unique_ptr(NewX(1, 2)); -// - or - -// std::unique_ptr x(NewX(1, 2)); -// -// While `absl::WrapUnique` is useful for capturing the output of a raw -// pointer factory, prefer 'absl::make_unique(args...)' over -// 'absl::WrapUnique(new T(args...))'. -// -// auto x = WrapUnique(new X(1, 2)); // works, but nonideal. -// auto x = make_unique(1, 2); // safer, standard, avoids raw 'new'. -// -// Note that `absl::WrapUnique(p)` is valid only if `delete p` is a valid -// expression. In particular, `absl::WrapUnique()` cannot wrap pointers to -// arrays, functions or void, and it must not be used to capture pointers -// obtained from array-new expressions (even though that would compile!). -template -std::unique_ptr WrapUnique(T* ptr) { - static_assert(!std::is_array::value, "array types are unsupported"); - static_assert(std::is_object::value, "non-object types are unsupported"); - return std::unique_ptr(ptr); -} - -namespace memory_internal { - -// Traits to select proper overload and return type for `absl::make_unique<>`. -template -struct MakeUniqueResult { - using scalar = std::unique_ptr; -}; -template -struct MakeUniqueResult { - using array = std::unique_ptr; -}; -template -struct MakeUniqueResult { - using invalid = void; -}; - -} // namespace memory_internal - -// gcc 4.8 has __cplusplus at 201301 but the libstdc++ shipped with it doesn't -// define make_unique. Other supported compilers either just define __cplusplus -// as 201103 but have make_unique (msvc), or have make_unique whenever -// __cplusplus > 201103 (clang). -#if (__cplusplus > 201103L || defined(_MSC_VER)) && \ - !(defined(__GLIBCXX__) && !defined(__cpp_lib_make_unique)) -using std::make_unique; -#else -// ----------------------------------------------------------------------------- -// Function Template: make_unique() -// ----------------------------------------------------------------------------- -// -// Creates a `std::unique_ptr<>`, while avoiding issues creating temporaries -// during the construction process. `absl::make_unique<>` also avoids redundant -// type declarations, by avoiding the need to explicitly use the `new` operator. -// -// This implementation of `absl::make_unique<>` is designed for C++11 code and -// will be replaced in C++14 by the equivalent `std::make_unique<>` abstraction. -// `absl::make_unique<>` is designed to be 100% compatible with -// `std::make_unique<>` so that the eventual migration will involve a simple -// rename operation. -// -// For more background on why `std::unique_ptr(new T(a,b))` is problematic, -// see Herb Sutter's explanation on -// (Exception-Safe Function Calls)[https://herbsutter.com/gotw/_102/]. -// (In general, reviewers should treat `new T(a,b)` with scrutiny.) -// -// Example usage: -// -// auto p = make_unique(args...); // 'p' is a std::unique_ptr -// auto pa = make_unique(5); // 'pa' is a std::unique_ptr -// -// Three overloads of `absl::make_unique` are required: -// -// - For non-array T: -// -// Allocates a T with `new T(std::forward args...)`, -// forwarding all `args` to T's constructor. -// Returns a `std::unique_ptr` owning that object. -// -// - For an array of unknown bounds T[]: -// -// `absl::make_unique<>` will allocate an array T of type U[] with -// `new U[n]()` and return a `std::unique_ptr` owning that array. -// -// Note that 'U[n]()' is different from 'U[n]', and elements will be -// value-initialized. Note as well that `std::unique_ptr` will perform its -// own destruction of the array elements upon leaving scope, even though -// the array [] does not have a default destructor. -// -// NOTE: an array of unknown bounds T[] may still be (and often will be) -// initialized to have a size, and will still use this overload. E.g: -// -// auto my_array = absl::make_unique(10); -// -// - For an array of known bounds T[N]: -// -// `absl::make_unique<>` is deleted (like with `std::make_unique<>`) as -// this overload is not useful. -// -// NOTE: an array of known bounds T[N] is not considered a useful -// construction, and may cause undefined behavior in templates. E.g: -// -// auto my_array = absl::make_unique(); -// -// In those cases, of course, you can still use the overload above and -// simply initialize it to its desired size: -// -// auto my_array = absl::make_unique(10); - -// `absl::make_unique` overload for non-array types. -template -typename memory_internal::MakeUniqueResult::scalar make_unique( - Args&&... args) { - return std::unique_ptr(new T(std::forward(args)...)); -} - -// `absl::make_unique` overload for an array T[] of unknown bounds. -// The array allocation needs to use the `new T[size]` form and cannot take -// element constructor arguments. The `std::unique_ptr` will manage destructing -// these array elements. -template -typename memory_internal::MakeUniqueResult::array make_unique(size_t n) { - return std::unique_ptr(new typename absl::remove_extent_t[n]()); -} - -// `absl::make_unique` overload for an array T[N] of known bounds. -// This construction will be rejected. -template -typename memory_internal::MakeUniqueResult::invalid make_unique( - Args&&... /* args */) = delete; -#endif - -// ----------------------------------------------------------------------------- -// Function Template: RawPtr() -// ----------------------------------------------------------------------------- -// -// Extracts the raw pointer from a pointer-like value `ptr`. `absl::RawPtr` is -// useful within templates that need to handle a complement of raw pointers, -// `std::nullptr_t`, and smart pointers. -template -auto RawPtr(T&& ptr) -> decltype(std::addressof(*ptr)) { - // ptr is a forwarding reference to support Ts with non-const operators. - return (ptr != nullptr) ? std::addressof(*ptr) : nullptr; -} -inline std::nullptr_t RawPtr(std::nullptr_t) { return nullptr; } - -// ----------------------------------------------------------------------------- -// Function Template: ShareUniquePtr() -// ----------------------------------------------------------------------------- -// -// Adopts a `std::unique_ptr` rvalue and returns a `std::shared_ptr` of deduced -// type. Ownership (if any) of the held value is transferred to the returned -// shared pointer. -// -// Example: -// -// auto up = absl::make_unique(10); -// auto sp = absl::ShareUniquePtr(std::move(up)); // shared_ptr -// CHECK_EQ(*sp, 10); -// CHECK(up == nullptr); -// -// Note that this conversion is correct even when T is an array type, and more -// generally it works for *any* deleter of the `unique_ptr` (single-object -// deleter, array deleter, or any custom deleter), since the deleter is adopted -// by the shared pointer as well. The deleter is copied (unless it is a -// reference). -// -// Implements the resolution of [LWG 2415](http://wg21.link/lwg2415), by which a -// null shared pointer does not attempt to call the deleter. -template -std::shared_ptr ShareUniquePtr(std::unique_ptr&& ptr) { - return ptr ? std::shared_ptr(std::move(ptr)) : std::shared_ptr(); -} - -// ----------------------------------------------------------------------------- -// Function Template: WeakenPtr() -// ----------------------------------------------------------------------------- -// -// Creates a weak pointer associated with a given shared pointer. The returned -// value is a `std::weak_ptr` of deduced type. -// -// Example: -// -// auto sp = std::make_shared(10); -// auto wp = absl::WeakenPtr(sp); -// CHECK_EQ(sp.get(), wp.lock().get()); -// sp.reset(); -// CHECK(wp.lock() == nullptr); -// -template -std::weak_ptr WeakenPtr(const std::shared_ptr& ptr) { - return std::weak_ptr(ptr); -} - -namespace memory_internal { - -// ExtractOr::type evaluates to E if possible. Otherwise, D. -template

::kSecond == - memory_internal::OffsetOf::kSecond; - } - - public: - // Whether pair and pair are layout-compatible. If they are, - // then it is safe to store them in a union and read from either. - static constexpr bool value = std::is_standard_layout() && - std::is_standard_layout() && - memory_internal::OffsetOf::kFirst == 0 && - LayoutCompatible>() && - LayoutCompatible>(); -}; - -} // namespace memory_internal - -// The internal storage type for key-value containers like flat_hash_map. -// -// It is convenient for the value_type of a flat_hash_map to be -// pair; the "const K" prevents accidental modification of the key -// when dealing with the reference returned from find() and similar methods. -// However, this creates other problems; we want to be able to emplace(K, V) -// efficiently with move operations, and similarly be able to move a -// pair in insert(). -// -// The solution is this union, which aliases the const and non-const versions -// of the pair. This also allows flat_hash_map to work, even though -// that has the same efficiency issues with move in emplace() and insert() - -// but people do it anyway. -// -// If kMutableKeys is false, only the value member can be accessed. -// -// If kMutableKeys is true, key can be accessed through all slots while value -// and mutable_value must be accessed only via INITIALIZED slots. Slots are -// created and destroyed via mutable_value so that the key can be moved later. -// -// Accessing one of the union fields while the other is active is safe as -// long as they are layout-compatible, which is guaranteed by the definition of -// kMutableKeys. For C++11, the relevant section of the standard is -// https://timsong-cpp.github.io/cppwp/n3337/class.mem#19 (9.2.19) -template -union map_slot_type { - map_slot_type() {} - ~map_slot_type() = delete; - using value_type = std::pair; - using mutable_value_type = - std::pair, absl::remove_const_t>; - - value_type value; - mutable_value_type mutable_value; - absl::remove_const_t key; -}; - -template -struct map_slot_policy { - using slot_type = map_slot_type; - using value_type = std::pair; - using mutable_value_type = std::pair; - - private: - static void emplace(slot_type* slot) { - // The construction of union doesn't do anything at runtime but it allows us - // to access its members without violating aliasing rules. - new (slot) slot_type; - } - // If pair and pair are layout-compatible, we can accept one - // or the other via slot_type. We are also free to access the key via - // slot_type::key in this case. - using kMutableKeys = memory_internal::IsLayoutCompatible; - - public: - static value_type& element(slot_type* slot) { return slot->value; } - static const value_type& element(const slot_type* slot) { - return slot->value; - } - - // When C++17 is available, we can use std::launder to provide mutable - // access to the key for use in node handle. -#if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606 - static K& mutable_key(slot_type* slot) { - // Still check for kMutableKeys so that we can avoid calling std::launder - // unless necessary because it can interfere with optimizations. - return kMutableKeys::value ? slot->key - : *std::launder(const_cast( - std::addressof(slot->value.first))); - } -#else // !(defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606) - static const K& mutable_key(slot_type* slot) { return key(slot); } -#endif - - static const K& key(const slot_type* slot) { - return kMutableKeys::value ? slot->key : slot->value.first; - } - - template - static void construct(Allocator* alloc, slot_type* slot, Args&&... args) { - emplace(slot); - if (kMutableKeys::value) { - absl::allocator_traits::construct(*alloc, &slot->mutable_value, - std::forward(args)...); - } else { - absl::allocator_traits::construct(*alloc, &slot->value, - std::forward(args)...); - } - } - - // Construct this slot by moving from another slot. - template - static void construct(Allocator* alloc, slot_type* slot, slot_type* other) { - emplace(slot); - if (kMutableKeys::value) { - absl::allocator_traits::construct( - *alloc, &slot->mutable_value, std::move(other->mutable_value)); - } else { - absl::allocator_traits::construct(*alloc, &slot->value, - std::move(other->value)); - } - } - - // Construct this slot by copying from another slot. - template - static void construct(Allocator* alloc, slot_type* slot, - const slot_type* other) { - emplace(slot); - absl::allocator_traits::construct(*alloc, &slot->value, - other->value); - } - - template - static void destroy(Allocator* alloc, slot_type* slot) { - if (kMutableKeys::value) { - absl::allocator_traits::destroy(*alloc, &slot->mutable_value); - } else { - absl::allocator_traits::destroy(*alloc, &slot->value); - } - } - - template - static void transfer(Allocator* alloc, slot_type* new_slot, - slot_type* old_slot) { - emplace(new_slot); - if (kMutableKeys::value) { - absl::allocator_traits::construct( - *alloc, &new_slot->mutable_value, std::move(old_slot->mutable_value)); - } else { - absl::allocator_traits::construct(*alloc, &new_slot->value, - std::move(old_slot->value)); - } - destroy(alloc, old_slot); - } -}; - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_CONTAINER_MEMORY_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hash_function_defaults.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hash_function_defaults.h deleted file mode 100644 index 250e662..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hash_function_defaults.h +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Define the default Hash and Eq functions for SwissTable containers. -// -// std::hash and std::equal_to are not appropriate hash and equal -// functions for SwissTable containers. There are two reasons for this. -// -// SwissTable containers are power of 2 sized containers: -// -// This means they use the lower bits of the hash value to find the slot for -// each entry. The typical hash function for integral types is the identity. -// This is a very weak hash function for SwissTable and any power of 2 sized -// hashtable implementation which will lead to excessive collisions. For -// SwissTable we use murmur3 style mixing to reduce collisions to a minimum. -// -// SwissTable containers support heterogeneous lookup: -// -// In order to make heterogeneous lookup work, hash and equal functions must be -// polymorphic. At the same time they have to satisfy the same requirements the -// C++ standard imposes on hash functions and equality operators. That is: -// -// if hash_default_eq(a, b) returns true for any a and b of type T, then -// hash_default_hash(a) must equal hash_default_hash(b) -// -// For SwissTable containers this requirement is relaxed to allow a and b of -// any and possibly different types. Note that like the standard the hash and -// equal functions are still bound to T. This is important because some type U -// can be hashed by/tested for equality differently depending on T. A notable -// example is `const char*`. `const char*` is treated as a c-style string when -// the hash function is hash but as a pointer when the hash -// function is hash. -// -#ifndef ABSL_CONTAINER_INTERNAL_HASH_FUNCTION_DEFAULTS_H_ -#define ABSL_CONTAINER_INTERNAL_HASH_FUNCTION_DEFAULTS_H_ - -#include -#include -#include -#include -#include - -#include "absl/base/config.h" -#include "absl/hash/hash.h" -#include "absl/strings/cord.h" -#include "absl/strings/string_view.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -// The hash of an object of type T is computed by using absl::Hash. -template -struct HashEq { - using Hash = absl::Hash; - using Eq = std::equal_to; -}; - -struct StringHash { - using is_transparent = void; - - size_t operator()(absl::string_view v) const { - return absl::Hash{}(v); - } - size_t operator()(const absl::Cord& v) const { - return absl::Hash{}(v); - } -}; - -struct StringEq { - using is_transparent = void; - bool operator()(absl::string_view lhs, absl::string_view rhs) const { - return lhs == rhs; - } - bool operator()(const absl::Cord& lhs, const absl::Cord& rhs) const { - return lhs == rhs; - } - bool operator()(const absl::Cord& lhs, absl::string_view rhs) const { - return lhs == rhs; - } - bool operator()(absl::string_view lhs, const absl::Cord& rhs) const { - return lhs == rhs; - } -}; - -// Supports heterogeneous lookup for string-like elements. -struct StringHashEq { - using Hash = StringHash; - using Eq = StringEq; -}; - -template <> -struct HashEq : StringHashEq {}; -template <> -struct HashEq : StringHashEq {}; -template <> -struct HashEq : StringHashEq {}; - -// Supports heterogeneous lookup for pointers and smart pointers. -template -struct HashEq { - struct Hash { - using is_transparent = void; - template - size_t operator()(const U& ptr) const { - return absl::Hash{}(HashEq::ToPtr(ptr)); - } - }; - struct Eq { - using is_transparent = void; - template - bool operator()(const A& a, const B& b) const { - return HashEq::ToPtr(a) == HashEq::ToPtr(b); - } - }; - - private: - static const T* ToPtr(const T* ptr) { return ptr; } - template - static const T* ToPtr(const std::unique_ptr& ptr) { - return ptr.get(); - } - template - static const T* ToPtr(const std::shared_ptr& ptr) { - return ptr.get(); - } -}; - -template -struct HashEq> : HashEq {}; -template -struct HashEq> : HashEq {}; - -// This header's visibility is restricted. If you need to access the default -// hasher please use the container's ::hasher alias instead. -// -// Example: typename Hash = typename absl::flat_hash_map::hasher -template -using hash_default_hash = typename container_internal::HashEq::Hash; - -// This header's visibility is restricted. If you need to access the default -// key equal please use the container's ::key_equal alias instead. -// -// Example: typename Eq = typename absl::flat_hash_map::key_equal -template -using hash_default_eq = typename container_internal::HashEq::Eq; - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_HASH_FUNCTION_DEFAULTS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hash_policy_traits.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hash_policy_traits.h deleted file mode 100644 index 46c97b1..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hash_policy_traits.h +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_CONTAINER_INTERNAL_HASH_POLICY_TRAITS_H_ -#define ABSL_CONTAINER_INTERNAL_HASH_POLICY_TRAITS_H_ - -#include -#include -#include -#include -#include - -#include "absl/meta/type_traits.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -// Defines how slots are initialized/destroyed/moved. -template -struct hash_policy_traits { - // The type of the keys stored in the hashtable. - using key_type = typename Policy::key_type; - - private: - struct ReturnKey { - // When C++17 is available, we can use std::launder to provide mutable - // access to the key for use in node handle. -#if defined(__cpp_lib_launder) && __cpp_lib_launder >= 201606 - template ::value, int> = 0> - static key_type& Impl(Key&& k, int) { - return *std::launder( - const_cast(std::addressof(std::forward(k)))); - } -#endif - - template - static Key Impl(Key&& k, char) { - return std::forward(k); - } - - // When Key=T&, we forward the lvalue reference. - // When Key=T, we return by value to avoid a dangling reference. - // eg, for string_hash_map. - template - auto operator()(Key&& k, const Args&...) const - -> decltype(Impl(std::forward(k), 0)) { - return Impl(std::forward(k), 0); - } - }; - - template - struct ConstantIteratorsImpl : std::false_type {}; - - template - struct ConstantIteratorsImpl> - : P::constant_iterators {}; - - public: - // The actual object stored in the hash table. - using slot_type = typename Policy::slot_type; - - // The argument type for insertions into the hashtable. This is different - // from value_type for increased performance. See initializer_list constructor - // and insert() member functions for more details. - using init_type = typename Policy::init_type; - - using reference = decltype(Policy::element(std::declval())); - using pointer = typename std::remove_reference::type*; - using value_type = typename std::remove_reference::type; - - // Policies can set this variable to tell raw_hash_set that all iterators - // should be constant, even `iterator`. This is useful for set-like - // containers. - // Defaults to false if not provided by the policy. - using constant_iterators = ConstantIteratorsImpl<>; - - // PRECONDITION: `slot` is UNINITIALIZED - // POSTCONDITION: `slot` is INITIALIZED - template - static void construct(Alloc* alloc, slot_type* slot, Args&&... args) { - Policy::construct(alloc, slot, std::forward(args)...); - } - - // PRECONDITION: `slot` is INITIALIZED - // POSTCONDITION: `slot` is UNINITIALIZED - template - static void destroy(Alloc* alloc, slot_type* slot) { - Policy::destroy(alloc, slot); - } - - // Transfers the `old_slot` to `new_slot`. Any memory allocated by the - // allocator inside `old_slot` to `new_slot` can be transferred. - // - // OPTIONAL: defaults to: - // - // clone(new_slot, std::move(*old_slot)); - // destroy(old_slot); - // - // PRECONDITION: `new_slot` is UNINITIALIZED and `old_slot` is INITIALIZED - // POSTCONDITION: `new_slot` is INITIALIZED and `old_slot` is - // UNINITIALIZED - template - static void transfer(Alloc* alloc, slot_type* new_slot, slot_type* old_slot) { - transfer_impl(alloc, new_slot, old_slot, 0); - } - - // PRECONDITION: `slot` is INITIALIZED - // POSTCONDITION: `slot` is INITIALIZED - template - static auto element(slot_type* slot) -> decltype(P::element(slot)) { - return P::element(slot); - } - - // Returns the amount of memory owned by `slot`, exclusive of `sizeof(*slot)`. - // - // If `slot` is nullptr, returns the constant amount of memory owned by any - // full slot or -1 if slots own variable amounts of memory. - // - // PRECONDITION: `slot` is INITIALIZED or nullptr - template - static size_t space_used(const slot_type* slot) { - return P::space_used(slot); - } - - // Provides generalized access to the key for elements, both for elements in - // the table and for elements that have not yet been inserted (or even - // constructed). We would like an API that allows us to say: `key(args...)` - // but we cannot do that for all cases, so we use this more general API that - // can be used for many things, including the following: - // - // - Given an element in a table, get its key. - // - Given an element initializer, get its key. - // - Given `emplace()` arguments, get the element key. - // - // Implementations of this must adhere to a very strict technical - // specification around aliasing and consuming arguments: - // - // Let `value_type` be the result type of `element()` without ref- and - // cv-qualifiers. The first argument is a functor, the rest are constructor - // arguments for `value_type`. Returns `std::forward(f)(k, xs...)`, where - // `k` is the element key, and `xs...` are the new constructor arguments for - // `value_type`. It's allowed for `k` to alias `xs...`, and for both to alias - // `ts...`. The key won't be touched once `xs...` are used to construct an - // element; `ts...` won't be touched at all, which allows `apply()` to consume - // any rvalues among them. - // - // If `value_type` is constructible from `Ts&&...`, `Policy::apply()` must not - // trigger a hard compile error unless it originates from `f`. In other words, - // `Policy::apply()` must be SFINAE-friendly. If `value_type` is not - // constructible from `Ts&&...`, either SFINAE or a hard compile error is OK. - // - // If `Ts...` is `[cv] value_type[&]` or `[cv] init_type[&]`, - // `Policy::apply()` must work. A compile error is not allowed, SFINAE or not. - template - static auto apply(F&& f, Ts&&... ts) - -> decltype(P::apply(std::forward(f), std::forward(ts)...)) { - return P::apply(std::forward(f), std::forward(ts)...); - } - - // Returns the "key" portion of the slot. - // Used for node handle manipulation. - template - static auto mutable_key(slot_type* slot) - -> decltype(P::apply(ReturnKey(), element(slot))) { - return P::apply(ReturnKey(), element(slot)); - } - - // Returns the "value" (as opposed to the "key") portion of the element. Used - // by maps to implement `operator[]`, `at()` and `insert_or_assign()`. - template - static auto value(T* elem) -> decltype(P::value(elem)) { - return P::value(elem); - } - - private: - // Use auto -> decltype as an enabler. - template - static auto transfer_impl(Alloc* alloc, slot_type* new_slot, - slot_type* old_slot, int) - -> decltype((void)P::transfer(alloc, new_slot, old_slot)) { - P::transfer(alloc, new_slot, old_slot); - } - template - static void transfer_impl(Alloc* alloc, slot_type* new_slot, - slot_type* old_slot, char) { - construct(alloc, new_slot, std::move(element(old_slot))); - destroy(alloc, old_slot); - } -}; - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_HASH_POLICY_TRAITS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hashtable_debug_hooks.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hashtable_debug_hooks.h deleted file mode 100644 index 3e9ea59..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hashtable_debug_hooks.h +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// Provides the internal API for hashtable_debug.h. - -#ifndef ABSL_CONTAINER_INTERNAL_HASHTABLE_DEBUG_HOOKS_H_ -#define ABSL_CONTAINER_INTERNAL_HASHTABLE_DEBUG_HOOKS_H_ - -#include - -#include -#include -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { -namespace hashtable_debug_internal { - -// If it is a map, call get<0>(). -using std::get; -template -auto GetKey(const typename T::value_type& pair, int) -> decltype(get<0>(pair)) { - return get<0>(pair); -} - -// If it is not a map, return the value directly. -template -const typename T::key_type& GetKey(const typename T::key_type& key, char) { - return key; -} - -// Containers should specialize this to provide debug information for that -// container. -template -struct HashtableDebugAccess { - // Returns the number of probes required to find `key` in `c`. The "number of - // probes" is a concept that can vary by container. Implementations should - // return 0 when `key` was found in the minimum number of operations and - // should increment the result for each non-trivial operation required to find - // `key`. - // - // The default implementation uses the bucket api from the standard and thus - // works for `std::unordered_*` containers. - static size_t GetNumProbes(const Container& c, - const typename Container::key_type& key) { - if (!c.bucket_count()) return {}; - size_t num_probes = 0; - size_t bucket = c.bucket(key); - for (auto it = c.begin(bucket), e = c.end(bucket);; ++it, ++num_probes) { - if (it == e) return num_probes; - if (c.key_eq()(key, GetKey(*it, 0))) return num_probes; - } - } - - // Returns the number of bytes requested from the allocator by the container - // and not freed. - // - // static size_t AllocatedByteSize(const Container& c); - - // Returns a tight lower bound for AllocatedByteSize(c) where `c` is of type - // `Container` and `c.size()` is equal to `num_elements`. - // - // static size_t LowerBoundAllocatedByteSize(size_t num_elements); -}; - -} // namespace hashtable_debug_internal -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_HASHTABLE_DEBUG_HOOKS_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hashtablez_sampler.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hashtablez_sampler.h deleted file mode 100644 index d4016d8..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/hashtablez_sampler.h +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ----------------------------------------------------------------------------- -// File: hashtablez_sampler.h -// ----------------------------------------------------------------------------- -// -// This header file defines the API for a low level library to sample hashtables -// and collect runtime statistics about them. -// -// `HashtablezSampler` controls the lifecycle of `HashtablezInfo` objects which -// store information about a single sample. -// -// `Record*` methods store information into samples. -// `Sample()` and `Unsample()` make use of a single global sampler with -// properties controlled by the flags hashtablez_enabled, -// hashtablez_sample_rate, and hashtablez_max_samples. -// -// WARNING -// -// Using this sampling API may cause sampled Swiss tables to use the global -// allocator (operator `new`) in addition to any custom allocator. If you -// are using a table in an unusual circumstance where allocation or calling a -// linux syscall is unacceptable, this could interfere. -// -// This utility is internal-only. Use at your own risk. - -#ifndef ABSL_CONTAINER_INTERNAL_HASHTABLEZ_SAMPLER_H_ -#define ABSL_CONTAINER_INTERNAL_HASHTABLEZ_SAMPLER_H_ - -#include -#include -#include -#include - -#include "absl/base/config.h" -#include "absl/base/internal/per_thread_tls.h" -#include "absl/base/optimization.h" -#include "absl/profiling/internal/sample_recorder.h" -#include "absl/synchronization/mutex.h" -#include "absl/utility/utility.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -// Stores information about a sampled hashtable. All mutations to this *must* -// be made through `Record*` functions below. All reads from this *must* only -// occur in the callback to `HashtablezSampler::Iterate`. -struct HashtablezInfo : public profiling_internal::Sample { - // Constructs the object but does not fill in any fields. - HashtablezInfo(); - ~HashtablezInfo(); - HashtablezInfo(const HashtablezInfo&) = delete; - HashtablezInfo& operator=(const HashtablezInfo&) = delete; - - // Puts the object into a clean state, fills in the logically `const` members, - // blocking for any readers that are currently sampling the object. - void PrepareForSampling(int64_t stride, size_t inline_element_size_value) - ABSL_EXCLUSIVE_LOCKS_REQUIRED(init_mu); - - // These fields are mutated by the various Record* APIs and need to be - // thread-safe. - std::atomic capacity; - std::atomic size; - std::atomic num_erases; - std::atomic num_rehashes; - std::atomic max_probe_length; - std::atomic total_probe_length; - std::atomic hashes_bitwise_or; - std::atomic hashes_bitwise_and; - std::atomic hashes_bitwise_xor; - std::atomic max_reserve; - - // All of the fields below are set by `PrepareForSampling`, they must not be - // mutated in `Record*` functions. They are logically `const` in that sense. - // These are guarded by init_mu, but that is not externalized to clients, - // which can read them only during `SampleRecorder::Iterate` which will hold - // the lock. - static constexpr int kMaxStackDepth = 64; - absl::Time create_time; - int32_t depth; - void* stack[kMaxStackDepth]; - size_t inline_element_size; // How big is the slot? -}; - -inline void RecordRehashSlow(HashtablezInfo* info, size_t total_probe_length) { -#ifdef ABSL_INTERNAL_HAVE_SSE2 - total_probe_length /= 16; -#else - total_probe_length /= 8; -#endif - info->total_probe_length.store(total_probe_length, std::memory_order_relaxed); - info->num_erases.store(0, std::memory_order_relaxed); - // There is only one concurrent writer, so `load` then `store` is sufficient - // instead of using `fetch_add`. - info->num_rehashes.store( - 1 + info->num_rehashes.load(std::memory_order_relaxed), - std::memory_order_relaxed); -} - -inline void RecordReservationSlow(HashtablezInfo* info, - size_t target_capacity) { - info->max_reserve.store( - (std::max)(info->max_reserve.load(std::memory_order_relaxed), - target_capacity), - std::memory_order_relaxed); -} - -inline void RecordClearedReservationSlow(HashtablezInfo* info) { - info->max_reserve.store(0, std::memory_order_relaxed); -} - -inline void RecordStorageChangedSlow(HashtablezInfo* info, size_t size, - size_t capacity) { - info->size.store(size, std::memory_order_relaxed); - info->capacity.store(capacity, std::memory_order_relaxed); - if (size == 0) { - // This is a clear, reset the total/num_erases too. - info->total_probe_length.store(0, std::memory_order_relaxed); - info->num_erases.store(0, std::memory_order_relaxed); - } -} - -void RecordInsertSlow(HashtablezInfo* info, size_t hash, - size_t distance_from_desired); - -inline void RecordEraseSlow(HashtablezInfo* info) { - info->size.fetch_sub(1, std::memory_order_relaxed); - // There is only one concurrent writer, so `load` then `store` is sufficient - // instead of using `fetch_add`. - info->num_erases.store( - 1 + info->num_erases.load(std::memory_order_relaxed), - std::memory_order_relaxed); -} - -struct SamplingState { - int64_t next_sample; - // When we make a sampling decision, we record that distance so we can weight - // each sample. - int64_t sample_stride; -}; - -HashtablezInfo* SampleSlow(SamplingState& next_sample, - size_t inline_element_size); -void UnsampleSlow(HashtablezInfo* info); - -#if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) -#error ABSL_INTERNAL_HASHTABLEZ_SAMPLE cannot be directly set -#endif // defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) - -#if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) -class HashtablezInfoHandle { - public: - explicit HashtablezInfoHandle() : info_(nullptr) {} - explicit HashtablezInfoHandle(HashtablezInfo* info) : info_(info) {} - ~HashtablezInfoHandle() { - if (ABSL_PREDICT_TRUE(info_ == nullptr)) return; - UnsampleSlow(info_); - } - - HashtablezInfoHandle(const HashtablezInfoHandle&) = delete; - HashtablezInfoHandle& operator=(const HashtablezInfoHandle&) = delete; - - HashtablezInfoHandle(HashtablezInfoHandle&& o) noexcept - : info_(absl::exchange(o.info_, nullptr)) {} - HashtablezInfoHandle& operator=(HashtablezInfoHandle&& o) noexcept { - if (ABSL_PREDICT_FALSE(info_ != nullptr)) { - UnsampleSlow(info_); - } - info_ = absl::exchange(o.info_, nullptr); - return *this; - } - - inline void RecordStorageChanged(size_t size, size_t capacity) { - if (ABSL_PREDICT_TRUE(info_ == nullptr)) return; - RecordStorageChangedSlow(info_, size, capacity); - } - - inline void RecordRehash(size_t total_probe_length) { - if (ABSL_PREDICT_TRUE(info_ == nullptr)) return; - RecordRehashSlow(info_, total_probe_length); - } - - inline void RecordReservation(size_t target_capacity) { - if (ABSL_PREDICT_TRUE(info_ == nullptr)) return; - RecordReservationSlow(info_, target_capacity); - } - - inline void RecordClearedReservation() { - if (ABSL_PREDICT_TRUE(info_ == nullptr)) return; - RecordClearedReservationSlow(info_); - } - - inline void RecordInsert(size_t hash, size_t distance_from_desired) { - if (ABSL_PREDICT_TRUE(info_ == nullptr)) return; - RecordInsertSlow(info_, hash, distance_from_desired); - } - - inline void RecordErase() { - if (ABSL_PREDICT_TRUE(info_ == nullptr)) return; - RecordEraseSlow(info_); - } - - friend inline void swap(HashtablezInfoHandle& lhs, - HashtablezInfoHandle& rhs) { - std::swap(lhs.info_, rhs.info_); - } - - private: - friend class HashtablezInfoHandlePeer; - HashtablezInfo* info_; -}; -#else -// Ensure that when Hashtablez is turned off at compile time, HashtablezInfo can -// be removed by the linker, in order to reduce the binary size. -class HashtablezInfoHandle { - public: - explicit HashtablezInfoHandle() = default; - explicit HashtablezInfoHandle(std::nullptr_t) {} - - inline void RecordStorageChanged(size_t /*size*/, size_t /*capacity*/) {} - inline void RecordRehash(size_t /*total_probe_length*/) {} - inline void RecordReservation(size_t /*target_capacity*/) {} - inline void RecordClearedReservation() {} - inline void RecordInsert(size_t /*hash*/, size_t /*distance_from_desired*/) {} - inline void RecordErase() {} - - friend inline void swap(HashtablezInfoHandle& /*lhs*/, - HashtablezInfoHandle& /*rhs*/) {} -}; -#endif // defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) - -#if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) -extern ABSL_PER_THREAD_TLS_KEYWORD SamplingState global_next_sample; -#endif // defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) - -// Returns an RAII sampling handle that manages registration and unregistation -// with the global sampler. -inline HashtablezInfoHandle Sample( - size_t inline_element_size ABSL_ATTRIBUTE_UNUSED) { -#if defined(ABSL_INTERNAL_HASHTABLEZ_SAMPLE) - if (ABSL_PREDICT_TRUE(--global_next_sample.next_sample > 0)) { - return HashtablezInfoHandle(nullptr); - } - return HashtablezInfoHandle( - SampleSlow(global_next_sample, inline_element_size)); -#else - return HashtablezInfoHandle(nullptr); -#endif // !ABSL_PER_THREAD_TLS -} - -using HashtablezSampler = - ::absl::profiling_internal::SampleRecorder; - -// Returns a global Sampler. -HashtablezSampler& GlobalHashtablezSampler(); - -using HashtablezConfigListener = void (*)(); -void SetHashtablezConfigListener(HashtablezConfigListener l); - -// Enables or disables sampling for Swiss tables. -bool IsHashtablezEnabled(); -void SetHashtablezEnabled(bool enabled); -void SetHashtablezEnabledInternal(bool enabled); - -// Sets the rate at which Swiss tables will be sampled. -int32_t GetHashtablezSampleParameter(); -void SetHashtablezSampleParameter(int32_t rate); -void SetHashtablezSampleParameterInternal(int32_t rate); - -// Sets a soft max for the number of samples that will be kept. -int32_t GetHashtablezMaxSamples(); -void SetHashtablezMaxSamples(int32_t max); -void SetHashtablezMaxSamplesInternal(int32_t max); - -// Configuration override. -// This allows process-wide sampling without depending on order of -// initialization of static storage duration objects. -// The definition of this constant is weak, which allows us to inject a -// different value for it at link time. -extern "C" bool ABSL_INTERNAL_C_SYMBOL(AbslContainerInternalSampleEverything)(); - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_HASHTABLEZ_SAMPLER_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/inlined_vector.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/inlined_vector.h deleted file mode 100644 index 54c92a0..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/inlined_vector.h +++ /dev/null @@ -1,953 +0,0 @@ -// Copyright 2019 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_CONTAINER_INTERNAL_INLINED_VECTOR_INTERNAL_H_ -#define ABSL_CONTAINER_INTERNAL_INLINED_VECTOR_INTERNAL_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "absl/base/attributes.h" -#include "absl/base/macros.h" -#include "absl/container/internal/compressed_tuple.h" -#include "absl/memory/memory.h" -#include "absl/meta/type_traits.h" -#include "absl/types/span.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace inlined_vector_internal { - -// GCC does not deal very well with the below code -#if !defined(__clang__) && defined(__GNUC__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Warray-bounds" -#endif - -template -using AllocatorTraits = std::allocator_traits; -template -using ValueType = typename AllocatorTraits::value_type; -template -using SizeType = typename AllocatorTraits::size_type; -template -using Pointer = typename AllocatorTraits::pointer; -template -using ConstPointer = typename AllocatorTraits::const_pointer; -template -using SizeType = typename AllocatorTraits::size_type; -template -using DifferenceType = typename AllocatorTraits::difference_type; -template -using Reference = ValueType&; -template -using ConstReference = const ValueType&; -template -using Iterator = Pointer; -template -using ConstIterator = ConstPointer; -template -using ReverseIterator = typename std::reverse_iterator>; -template -using ConstReverseIterator = typename std::reverse_iterator>; -template -using MoveIterator = typename std::move_iterator>; - -template -using IsAtLeastForwardIterator = std::is_convertible< - typename std::iterator_traits::iterator_category, - std::forward_iterator_tag>; - -template -using IsMemcpyOk = - absl::conjunction>>, - absl::is_trivially_copy_constructible>, - absl::is_trivially_copy_assignable>, - absl::is_trivially_destructible>>; - -template -struct TypeIdentity { - using type = T; -}; - -// Used for function arguments in template functions to prevent ADL by forcing -// callers to explicitly specify the template parameter. -template -using NoTypeDeduction = typename TypeIdentity::type; - -template >::value> -struct DestroyAdapter; - -template -struct DestroyAdapter { - static void DestroyElements(A& allocator, Pointer destroy_first, - SizeType destroy_size) { - for (SizeType i = destroy_size; i != 0;) { - --i; - AllocatorTraits::destroy(allocator, destroy_first + i); - } - } -}; - -template -struct DestroyAdapter { - static void DestroyElements(A& allocator, Pointer destroy_first, - SizeType destroy_size) { - static_cast(allocator); - static_cast(destroy_first); - static_cast(destroy_size); - } -}; - -template -struct Allocation { - Pointer data; - SizeType capacity; -}; - -template ) > ABSL_INTERNAL_DEFAULT_NEW_ALIGNMENT)> -struct MallocAdapter { - static Allocation Allocate(A& allocator, SizeType requested_capacity) { - return {AllocatorTraits::allocate(allocator, requested_capacity), - requested_capacity}; - } - - static void Deallocate(A& allocator, Pointer pointer, - SizeType capacity) { - AllocatorTraits::deallocate(allocator, pointer, capacity); - } -}; - -template -void ConstructElements(NoTypeDeduction& allocator, - Pointer construct_first, ValueAdapter& values, - SizeType construct_size) { - for (SizeType i = 0; i < construct_size; ++i) { - ABSL_INTERNAL_TRY { values.ConstructNext(allocator, construct_first + i); } - ABSL_INTERNAL_CATCH_ANY { - DestroyAdapter::DestroyElements(allocator, construct_first, i); - ABSL_INTERNAL_RETHROW; - } - } -} - -template -void AssignElements(Pointer assign_first, ValueAdapter& values, - SizeType assign_size) { - for (SizeType i = 0; i < assign_size; ++i) { - values.AssignNext(assign_first + i); - } -} - -template -struct StorageView { - Pointer data; - SizeType size; - SizeType capacity; -}; - -template -class IteratorValueAdapter { - public: - explicit IteratorValueAdapter(const Iterator& it) : it_(it) {} - - void ConstructNext(A& allocator, Pointer construct_at) { - AllocatorTraits::construct(allocator, construct_at, *it_); - ++it_; - } - - void AssignNext(Pointer assign_at) { - *assign_at = *it_; - ++it_; - } - - private: - Iterator it_; -}; - -template -class CopyValueAdapter { - public: - explicit CopyValueAdapter(ConstPointer p) : ptr_(p) {} - - void ConstructNext(A& allocator, Pointer construct_at) { - AllocatorTraits::construct(allocator, construct_at, *ptr_); - } - - void AssignNext(Pointer assign_at) { *assign_at = *ptr_; } - - private: - ConstPointer ptr_; -}; - -template -class DefaultValueAdapter { - public: - explicit DefaultValueAdapter() {} - - void ConstructNext(A& allocator, Pointer construct_at) { - AllocatorTraits::construct(allocator, construct_at); - } - - void AssignNext(Pointer assign_at) { *assign_at = ValueType(); } -}; - -template -class AllocationTransaction { - public: - explicit AllocationTransaction(A& allocator) - : allocator_data_(allocator, nullptr), capacity_(0) {} - - ~AllocationTransaction() { - if (DidAllocate()) { - MallocAdapter::Deallocate(GetAllocator(), GetData(), GetCapacity()); - } - } - - AllocationTransaction(const AllocationTransaction&) = delete; - void operator=(const AllocationTransaction&) = delete; - - A& GetAllocator() { return allocator_data_.template get<0>(); } - Pointer& GetData() { return allocator_data_.template get<1>(); } - SizeType& GetCapacity() { return capacity_; } - - bool DidAllocate() { return GetData() != nullptr; } - - Pointer Allocate(SizeType requested_capacity) { - Allocation result = - MallocAdapter::Allocate(GetAllocator(), requested_capacity); - GetData() = result.data; - GetCapacity() = result.capacity; - return result.data; - } - - ABSL_MUST_USE_RESULT Allocation Release() && { - Allocation result = {GetData(), GetCapacity()}; - Reset(); - return result; - } - - private: - void Reset() { - GetData() = nullptr; - GetCapacity() = 0; - } - - container_internal::CompressedTuple> allocator_data_; - SizeType capacity_; -}; - -template -class ConstructionTransaction { - public: - explicit ConstructionTransaction(A& allocator) - : allocator_data_(allocator, nullptr), size_(0) {} - - ~ConstructionTransaction() { - if (DidConstruct()) { - DestroyAdapter::DestroyElements(GetAllocator(), GetData(), GetSize()); - } - } - - ConstructionTransaction(const ConstructionTransaction&) = delete; - void operator=(const ConstructionTransaction&) = delete; - - A& GetAllocator() { return allocator_data_.template get<0>(); } - Pointer& GetData() { return allocator_data_.template get<1>(); } - SizeType& GetSize() { return size_; } - - bool DidConstruct() { return GetData() != nullptr; } - template - void Construct(Pointer data, ValueAdapter& values, SizeType size) { - ConstructElements(GetAllocator(), data, values, size); - GetData() = data; - GetSize() = size; - } - void Commit() && { - GetData() = nullptr; - GetSize() = 0; - } - - private: - container_internal::CompressedTuple> allocator_data_; - SizeType size_; -}; - -template -class Storage { - public: - static SizeType NextCapacity(SizeType current_capacity) { - return current_capacity * 2; - } - - static SizeType ComputeCapacity(SizeType current_capacity, - SizeType requested_capacity) { - return (std::max)(NextCapacity(current_capacity), requested_capacity); - } - - // --------------------------------------------------------------------------- - // Storage Constructors and Destructor - // --------------------------------------------------------------------------- - - Storage() : metadata_(A(), /* size and is_allocated */ 0u) {} - - explicit Storage(const A& allocator) - : metadata_(allocator, /* size and is_allocated */ 0u) {} - - ~Storage() { - if (GetSizeAndIsAllocated() == 0) { - // Empty and not allocated; nothing to do. - } else if (IsMemcpyOk::value) { - // No destructors need to be run; just deallocate if necessary. - DeallocateIfAllocated(); - } else { - DestroyContents(); - } - } - - // --------------------------------------------------------------------------- - // Storage Member Accessors - // --------------------------------------------------------------------------- - - SizeType& GetSizeAndIsAllocated() { return metadata_.template get<1>(); } - - const SizeType& GetSizeAndIsAllocated() const { - return metadata_.template get<1>(); - } - - SizeType GetSize() const { return GetSizeAndIsAllocated() >> 1; } - - bool GetIsAllocated() const { return GetSizeAndIsAllocated() & 1; } - - Pointer GetAllocatedData() { return data_.allocated.allocated_data; } - - ConstPointer GetAllocatedData() const { - return data_.allocated.allocated_data; - } - - Pointer GetInlinedData() { - return reinterpret_cast>( - std::addressof(data_.inlined.inlined_data[0])); - } - - ConstPointer GetInlinedData() const { - return reinterpret_cast>( - std::addressof(data_.inlined.inlined_data[0])); - } - - SizeType GetAllocatedCapacity() const { - return data_.allocated.allocated_capacity; - } - - SizeType GetInlinedCapacity() const { return static_cast>(N); } - - StorageView MakeStorageView() { - return GetIsAllocated() ? StorageView{GetAllocatedData(), GetSize(), - GetAllocatedCapacity()} - : StorageView{GetInlinedData(), GetSize(), - GetInlinedCapacity()}; - } - - A& GetAllocator() { return metadata_.template get<0>(); } - - const A& GetAllocator() const { return metadata_.template get<0>(); } - - // --------------------------------------------------------------------------- - // Storage Member Mutators - // --------------------------------------------------------------------------- - - ABSL_ATTRIBUTE_NOINLINE void InitFrom(const Storage& other); - - template - void Initialize(ValueAdapter values, SizeType new_size); - - template - void Assign(ValueAdapter values, SizeType new_size); - - template - void Resize(ValueAdapter values, SizeType new_size); - - template - Iterator Insert(ConstIterator pos, ValueAdapter values, - SizeType insert_count); - - template - Reference EmplaceBack(Args&&... args); - - Iterator Erase(ConstIterator from, ConstIterator to); - - void Reserve(SizeType requested_capacity); - - void ShrinkToFit(); - - void Swap(Storage* other_storage_ptr); - - void SetIsAllocated() { - GetSizeAndIsAllocated() |= static_cast>(1); - } - - void UnsetIsAllocated() { - GetSizeAndIsAllocated() &= ((std::numeric_limits>::max)() - 1); - } - - void SetSize(SizeType size) { - GetSizeAndIsAllocated() = - (size << 1) | static_cast>(GetIsAllocated()); - } - - void SetAllocatedSize(SizeType size) { - GetSizeAndIsAllocated() = (size << 1) | static_cast>(1); - } - - void SetInlinedSize(SizeType size) { - GetSizeAndIsAllocated() = size << static_cast>(1); - } - - void AddSize(SizeType count) { - GetSizeAndIsAllocated() += count << static_cast>(1); - } - - void SubtractSize(SizeType count) { - ABSL_HARDENING_ASSERT(count <= GetSize()); - - GetSizeAndIsAllocated() -= count << static_cast>(1); - } - - void SetAllocation(Allocation allocation) { - data_.allocated.allocated_data = allocation.data; - data_.allocated.allocated_capacity = allocation.capacity; - } - - void MemcpyFrom(const Storage& other_storage) { - ABSL_HARDENING_ASSERT(IsMemcpyOk::value || - other_storage.GetIsAllocated()); - - GetSizeAndIsAllocated() = other_storage.GetSizeAndIsAllocated(); - data_ = other_storage.data_; - } - - void DeallocateIfAllocated() { - if (GetIsAllocated()) { - MallocAdapter::Deallocate(GetAllocator(), GetAllocatedData(), - GetAllocatedCapacity()); - } - } - - private: - ABSL_ATTRIBUTE_NOINLINE void DestroyContents(); - - using Metadata = container_internal::CompressedTuple>; - - struct Allocated { - Pointer allocated_data; - SizeType allocated_capacity; - }; - - struct Inlined { - alignas(ValueType) char inlined_data[sizeof(ValueType[N])]; - }; - - union Data { - Allocated allocated; - Inlined inlined; - }; - - template - ABSL_ATTRIBUTE_NOINLINE Reference EmplaceBackSlow(Args&&... args); - - Metadata metadata_; - Data data_; -}; - -template -void Storage::DestroyContents() { - Pointer data = GetIsAllocated() ? GetAllocatedData() : GetInlinedData(); - DestroyAdapter::DestroyElements(GetAllocator(), data, GetSize()); - DeallocateIfAllocated(); -} - -template -void Storage::InitFrom(const Storage& other) { - const SizeType n = other.GetSize(); - ABSL_HARDENING_ASSERT(n > 0); // Empty sources handled handled in caller. - ConstPointer src; - Pointer dst; - if (!other.GetIsAllocated()) { - dst = GetInlinedData(); - src = other.GetInlinedData(); - } else { - // Because this is only called from the `InlinedVector` constructors, it's - // safe to take on the allocation with size `0`. If `ConstructElements(...)` - // throws, deallocation will be automatically handled by `~Storage()`. - SizeType requested_capacity = ComputeCapacity(GetInlinedCapacity(), n); - Allocation allocation = - MallocAdapter::Allocate(GetAllocator(), requested_capacity); - SetAllocation(allocation); - dst = allocation.data; - src = other.GetAllocatedData(); - } - if (IsMemcpyOk::value) { - std::memcpy(reinterpret_cast(dst), - reinterpret_cast(src), n * sizeof(ValueType)); - } else { - auto values = IteratorValueAdapter>(src); - ConstructElements(GetAllocator(), dst, values, n); - } - GetSizeAndIsAllocated() = other.GetSizeAndIsAllocated(); -} - -template -template -auto Storage::Initialize(ValueAdapter values, SizeType new_size) - -> void { - // Only callable from constructors! - ABSL_HARDENING_ASSERT(!GetIsAllocated()); - ABSL_HARDENING_ASSERT(GetSize() == 0); - - Pointer construct_data; - if (new_size > GetInlinedCapacity()) { - // Because this is only called from the `InlinedVector` constructors, it's - // safe to take on the allocation with size `0`. If `ConstructElements(...)` - // throws, deallocation will be automatically handled by `~Storage()`. - SizeType requested_capacity = - ComputeCapacity(GetInlinedCapacity(), new_size); - Allocation allocation = - MallocAdapter::Allocate(GetAllocator(), requested_capacity); - construct_data = allocation.data; - SetAllocation(allocation); - SetIsAllocated(); - } else { - construct_data = GetInlinedData(); - } - - ConstructElements(GetAllocator(), construct_data, values, new_size); - - // Since the initial size was guaranteed to be `0` and the allocated bit is - // already correct for either case, *adding* `new_size` gives us the correct - // result faster than setting it directly. - AddSize(new_size); -} - -template -template -auto Storage::Assign(ValueAdapter values, SizeType new_size) - -> void { - StorageView storage_view = MakeStorageView(); - - AllocationTransaction allocation_tx(GetAllocator()); - - absl::Span> assign_loop; - absl::Span> construct_loop; - absl::Span> destroy_loop; - - if (new_size > storage_view.capacity) { - SizeType requested_capacity = - ComputeCapacity(storage_view.capacity, new_size); - construct_loop = {allocation_tx.Allocate(requested_capacity), new_size}; - destroy_loop = {storage_view.data, storage_view.size}; - } else if (new_size > storage_view.size) { - assign_loop = {storage_view.data, storage_view.size}; - construct_loop = {storage_view.data + storage_view.size, - new_size - storage_view.size}; - } else { - assign_loop = {storage_view.data, new_size}; - destroy_loop = {storage_view.data + new_size, storage_view.size - new_size}; - } - - AssignElements(assign_loop.data(), values, assign_loop.size()); - - ConstructElements(GetAllocator(), construct_loop.data(), values, - construct_loop.size()); - - DestroyAdapter::DestroyElements(GetAllocator(), destroy_loop.data(), - destroy_loop.size()); - - if (allocation_tx.DidAllocate()) { - DeallocateIfAllocated(); - SetAllocation(std::move(allocation_tx).Release()); - SetIsAllocated(); - } - - SetSize(new_size); -} - -template -template -auto Storage::Resize(ValueAdapter values, SizeType new_size) - -> void { - StorageView storage_view = MakeStorageView(); - Pointer const base = storage_view.data; - const SizeType size = storage_view.size; - A& alloc = GetAllocator(); - if (new_size <= size) { - // Destroy extra old elements. - DestroyAdapter::DestroyElements(alloc, base + new_size, size - new_size); - } else if (new_size <= storage_view.capacity) { - // Construct new elements in place. - ConstructElements(alloc, base + size, values, new_size - size); - } else { - // Steps: - // a. Allocate new backing store. - // b. Construct new elements in new backing store. - // c. Move existing elements from old backing store to new backing store. - // d. Destroy all elements in old backing store. - // Use transactional wrappers for the first two steps so we can roll - // back if necessary due to exceptions. - AllocationTransaction allocation_tx(alloc); - SizeType requested_capacity = - ComputeCapacity(storage_view.capacity, new_size); - Pointer new_data = allocation_tx.Allocate(requested_capacity); - - ConstructionTransaction construction_tx(alloc); - construction_tx.Construct(new_data + size, values, new_size - size); - - IteratorValueAdapter> move_values( - (MoveIterator(base))); - ConstructElements(alloc, new_data, move_values, size); - - DestroyAdapter::DestroyElements(alloc, base, size); - std::move(construction_tx).Commit(); - DeallocateIfAllocated(); - SetAllocation(std::move(allocation_tx).Release()); - SetIsAllocated(); - } - SetSize(new_size); -} - -template -template -auto Storage::Insert(ConstIterator pos, ValueAdapter values, - SizeType insert_count) -> Iterator { - StorageView storage_view = MakeStorageView(); - - SizeType insert_index = - std::distance(ConstIterator(storage_view.data), pos); - SizeType insert_end_index = insert_index + insert_count; - SizeType new_size = storage_view.size + insert_count; - - if (new_size > storage_view.capacity) { - AllocationTransaction allocation_tx(GetAllocator()); - ConstructionTransaction construction_tx(GetAllocator()); - ConstructionTransaction move_construction_tx(GetAllocator()); - - IteratorValueAdapter> move_values( - MoveIterator(storage_view.data)); - - SizeType requested_capacity = - ComputeCapacity(storage_view.capacity, new_size); - Pointer new_data = allocation_tx.Allocate(requested_capacity); - - construction_tx.Construct(new_data + insert_index, values, insert_count); - - move_construction_tx.Construct(new_data, move_values, insert_index); - - ConstructElements(GetAllocator(), new_data + insert_end_index, - move_values, storage_view.size - insert_index); - - DestroyAdapter::DestroyElements(GetAllocator(), storage_view.data, - storage_view.size); - - std::move(construction_tx).Commit(); - std::move(move_construction_tx).Commit(); - DeallocateIfAllocated(); - SetAllocation(std::move(allocation_tx).Release()); - - SetAllocatedSize(new_size); - return Iterator(new_data + insert_index); - } else { - SizeType move_construction_destination_index = - (std::max)(insert_end_index, storage_view.size); - - ConstructionTransaction move_construction_tx(GetAllocator()); - - IteratorValueAdapter> move_construction_values( - MoveIterator(storage_view.data + - (move_construction_destination_index - insert_count))); - absl::Span> move_construction = { - storage_view.data + move_construction_destination_index, - new_size - move_construction_destination_index}; - - Pointer move_assignment_values = storage_view.data + insert_index; - absl::Span> move_assignment = { - storage_view.data + insert_end_index, - move_construction_destination_index - insert_end_index}; - - absl::Span> insert_assignment = {move_assignment_values, - move_construction.size()}; - - absl::Span> insert_construction = { - insert_assignment.data() + insert_assignment.size(), - insert_count - insert_assignment.size()}; - - move_construction_tx.Construct(move_construction.data(), - move_construction_values, - move_construction.size()); - - for (Pointer - destination = move_assignment.data() + move_assignment.size(), - last_destination = move_assignment.data(), - source = move_assignment_values + move_assignment.size(); - ;) { - --destination; - --source; - if (destination < last_destination) break; - *destination = std::move(*source); - } - - AssignElements(insert_assignment.data(), values, - insert_assignment.size()); - - ConstructElements(GetAllocator(), insert_construction.data(), values, - insert_construction.size()); - - std::move(move_construction_tx).Commit(); - - AddSize(insert_count); - return Iterator(storage_view.data + insert_index); - } -} - -template -template -auto Storage::EmplaceBack(Args&&... args) -> Reference { - StorageView storage_view = MakeStorageView(); - const SizeType n = storage_view.size; - if (ABSL_PREDICT_TRUE(n != storage_view.capacity)) { - // Fast path; new element fits. - Pointer last_ptr = storage_view.data + n; - AllocatorTraits::construct(GetAllocator(), last_ptr, - std::forward(args)...); - AddSize(1); - return *last_ptr; - } - // TODO(b/173712035): Annotate with musttail attribute to prevent regression. - return EmplaceBackSlow(std::forward(args)...); -} - -template -template -auto Storage::EmplaceBackSlow(Args&&... args) -> Reference { - StorageView storage_view = MakeStorageView(); - AllocationTransaction allocation_tx(GetAllocator()); - IteratorValueAdapter> move_values( - MoveIterator(storage_view.data)); - SizeType requested_capacity = NextCapacity(storage_view.capacity); - Pointer construct_data = allocation_tx.Allocate(requested_capacity); - Pointer last_ptr = construct_data + storage_view.size; - - // Construct new element. - AllocatorTraits::construct(GetAllocator(), last_ptr, - std::forward(args)...); - // Move elements from old backing store to new backing store. - ABSL_INTERNAL_TRY { - ConstructElements(GetAllocator(), allocation_tx.GetData(), move_values, - storage_view.size); - } - ABSL_INTERNAL_CATCH_ANY { - AllocatorTraits::destroy(GetAllocator(), last_ptr); - ABSL_INTERNAL_RETHROW; - } - // Destroy elements in old backing store. - DestroyAdapter::DestroyElements(GetAllocator(), storage_view.data, - storage_view.size); - - DeallocateIfAllocated(); - SetAllocation(std::move(allocation_tx).Release()); - SetIsAllocated(); - AddSize(1); - return *last_ptr; -} - -template -auto Storage::Erase(ConstIterator from, ConstIterator to) - -> Iterator { - StorageView storage_view = MakeStorageView(); - - SizeType erase_size = std::distance(from, to); - SizeType erase_index = - std::distance(ConstIterator(storage_view.data), from); - SizeType erase_end_index = erase_index + erase_size; - - IteratorValueAdapter> move_values( - MoveIterator(storage_view.data + erase_end_index)); - - AssignElements(storage_view.data + erase_index, move_values, - storage_view.size - erase_end_index); - - DestroyAdapter::DestroyElements( - GetAllocator(), storage_view.data + (storage_view.size - erase_size), - erase_size); - - SubtractSize(erase_size); - return Iterator(storage_view.data + erase_index); -} - -template -auto Storage::Reserve(SizeType requested_capacity) -> void { - StorageView storage_view = MakeStorageView(); - - if (ABSL_PREDICT_FALSE(requested_capacity <= storage_view.capacity)) return; - - AllocationTransaction allocation_tx(GetAllocator()); - - IteratorValueAdapter> move_values( - MoveIterator(storage_view.data)); - - SizeType new_requested_capacity = - ComputeCapacity(storage_view.capacity, requested_capacity); - Pointer new_data = allocation_tx.Allocate(new_requested_capacity); - - ConstructElements(GetAllocator(), new_data, move_values, - storage_view.size); - - DestroyAdapter::DestroyElements(GetAllocator(), storage_view.data, - storage_view.size); - - DeallocateIfAllocated(); - SetAllocation(std::move(allocation_tx).Release()); - SetIsAllocated(); -} - -template -auto Storage::ShrinkToFit() -> void { - // May only be called on allocated instances! - ABSL_HARDENING_ASSERT(GetIsAllocated()); - - StorageView storage_view{GetAllocatedData(), GetSize(), - GetAllocatedCapacity()}; - - if (ABSL_PREDICT_FALSE(storage_view.size == storage_view.capacity)) return; - - AllocationTransaction allocation_tx(GetAllocator()); - - IteratorValueAdapter> move_values( - MoveIterator(storage_view.data)); - - Pointer construct_data; - if (storage_view.size > GetInlinedCapacity()) { - SizeType requested_capacity = storage_view.size; - construct_data = allocation_tx.Allocate(requested_capacity); - if (allocation_tx.GetCapacity() >= storage_view.capacity) { - // Already using the smallest available heap allocation. - return; - } - } else { - construct_data = GetInlinedData(); - } - - ABSL_INTERNAL_TRY { - ConstructElements(GetAllocator(), construct_data, move_values, - storage_view.size); - } - ABSL_INTERNAL_CATCH_ANY { - SetAllocation({storage_view.data, storage_view.capacity}); - ABSL_INTERNAL_RETHROW; - } - - DestroyAdapter::DestroyElements(GetAllocator(), storage_view.data, - storage_view.size); - - MallocAdapter::Deallocate(GetAllocator(), storage_view.data, - storage_view.capacity); - - if (allocation_tx.DidAllocate()) { - SetAllocation(std::move(allocation_tx).Release()); - } else { - UnsetIsAllocated(); - } -} - -template -auto Storage::Swap(Storage* other_storage_ptr) -> void { - using std::swap; - ABSL_HARDENING_ASSERT(this != other_storage_ptr); - - if (GetIsAllocated() && other_storage_ptr->GetIsAllocated()) { - swap(data_.allocated, other_storage_ptr->data_.allocated); - } else if (!GetIsAllocated() && !other_storage_ptr->GetIsAllocated()) { - Storage* small_ptr = this; - Storage* large_ptr = other_storage_ptr; - if (small_ptr->GetSize() > large_ptr->GetSize()) swap(small_ptr, large_ptr); - - for (SizeType i = 0; i < small_ptr->GetSize(); ++i) { - swap(small_ptr->GetInlinedData()[i], large_ptr->GetInlinedData()[i]); - } - - IteratorValueAdapter> move_values( - MoveIterator(large_ptr->GetInlinedData() + small_ptr->GetSize())); - - ConstructElements(large_ptr->GetAllocator(), - small_ptr->GetInlinedData() + small_ptr->GetSize(), - move_values, - large_ptr->GetSize() - small_ptr->GetSize()); - - DestroyAdapter::DestroyElements( - large_ptr->GetAllocator(), - large_ptr->GetInlinedData() + small_ptr->GetSize(), - large_ptr->GetSize() - small_ptr->GetSize()); - } else { - Storage* allocated_ptr = this; - Storage* inlined_ptr = other_storage_ptr; - if (!allocated_ptr->GetIsAllocated()) swap(allocated_ptr, inlined_ptr); - - StorageView allocated_storage_view{ - allocated_ptr->GetAllocatedData(), allocated_ptr->GetSize(), - allocated_ptr->GetAllocatedCapacity()}; - - IteratorValueAdapter> move_values( - MoveIterator(inlined_ptr->GetInlinedData())); - - ABSL_INTERNAL_TRY { - ConstructElements(inlined_ptr->GetAllocator(), - allocated_ptr->GetInlinedData(), move_values, - inlined_ptr->GetSize()); - } - ABSL_INTERNAL_CATCH_ANY { - allocated_ptr->SetAllocation(Allocation{ - allocated_storage_view.data, allocated_storage_view.capacity}); - ABSL_INTERNAL_RETHROW; - } - - DestroyAdapter::DestroyElements(inlined_ptr->GetAllocator(), - inlined_ptr->GetInlinedData(), - inlined_ptr->GetSize()); - - inlined_ptr->SetAllocation(Allocation{allocated_storage_view.data, - allocated_storage_view.capacity}); - } - - swap(GetSizeAndIsAllocated(), other_storage_ptr->GetSizeAndIsAllocated()); - swap(GetAllocator(), other_storage_ptr->GetAllocator()); -} - -// End ignore "array-bounds" -#if !defined(__clang__) && defined(__GNUC__) -#pragma GCC diagnostic pop -#endif - -} // namespace inlined_vector_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_INLINED_VECTOR_INTERNAL_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/layout.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/layout.h deleted file mode 100644 index a59a243..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/layout.h +++ /dev/null @@ -1,743 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// MOTIVATION AND TUTORIAL -// -// If you want to put in a single heap allocation N doubles followed by M ints, -// it's easy if N and M are known at compile time. -// -// struct S { -// double a[N]; -// int b[M]; -// }; -// -// S* p = new S; -// -// But what if N and M are known only in run time? Class template Layout to the -// rescue! It's a portable generalization of the technique known as struct hack. -// -// // This object will tell us everything we need to know about the memory -// // layout of double[N] followed by int[M]. It's structurally identical to -// // size_t[2] that stores N and M. It's very cheap to create. -// const Layout layout(N, M); -// -// // Allocate enough memory for both arrays. `AllocSize()` tells us how much -// // memory is needed. We are free to use any allocation function we want as -// // long as it returns aligned memory. -// std::unique_ptr p(new unsigned char[layout.AllocSize()]); -// -// // Obtain the pointer to the array of doubles. -// // Equivalent to `reinterpret_cast(p.get())`. -// // -// // We could have written layout.Pointer<0>(p) instead. If all the types are -// // unique you can use either form, but if some types are repeated you must -// // use the index form. -// double* a = layout.Pointer(p.get()); -// -// // Obtain the pointer to the array of ints. -// // Equivalent to `reinterpret_cast(p.get() + N * 8)`. -// int* b = layout.Pointer(p); -// -// If we are unable to specify sizes of all fields, we can pass as many sizes as -// we can to `Partial()`. In return, it'll allow us to access the fields whose -// locations and sizes can be computed from the provided information. -// `Partial()` comes in handy when the array sizes are embedded into the -// allocation. -// -// // size_t[1] containing N, size_t[1] containing M, double[N], int[M]. -// using L = Layout; -// -// unsigned char* Allocate(size_t n, size_t m) { -// const L layout(1, 1, n, m); -// unsigned char* p = new unsigned char[layout.AllocSize()]; -// *layout.Pointer<0>(p) = n; -// *layout.Pointer<1>(p) = m; -// return p; -// } -// -// void Use(unsigned char* p) { -// // First, extract N and M. -// // Specify that the first array has only one element. Using `prefix` we -// // can access the first two arrays but not more. -// constexpr auto prefix = L::Partial(1); -// size_t n = *prefix.Pointer<0>(p); -// size_t m = *prefix.Pointer<1>(p); -// -// // Now we can get pointers to the payload. -// const L layout(1, 1, n, m); -// double* a = layout.Pointer(p); -// int* b = layout.Pointer(p); -// } -// -// The layout we used above combines fixed-size with dynamically-sized fields. -// This is quite common. Layout is optimized for this use case and generates -// optimal code. All computations that can be performed at compile time are -// indeed performed at compile time. -// -// Efficiency tip: The order of fields matters. In `Layout` try to -// ensure that `alignof(T1) >= ... >= alignof(TN)`. This way you'll have no -// padding in between arrays. -// -// You can manually override the alignment of an array by wrapping the type in -// `Aligned`. `Layout<..., Aligned, ...>` has exactly the same API -// and behavior as `Layout<..., T, ...>` except that the first element of the -// array of `T` is aligned to `N` (the rest of the elements follow without -// padding). `N` cannot be less than `alignof(T)`. -// -// `AllocSize()` and `Pointer()` are the most basic methods for dealing with -// memory layouts. Check out the reference or code below to discover more. -// -// EXAMPLE -// -// // Immutable move-only string with sizeof equal to sizeof(void*). The -// // string size and the characters are kept in the same heap allocation. -// class CompactString { -// public: -// CompactString(const char* s = "") { -// const size_t size = strlen(s); -// // size_t[1] followed by char[size + 1]. -// const L layout(1, size + 1); -// p_.reset(new unsigned char[layout.AllocSize()]); -// // If running under ASAN, mark the padding bytes, if any, to catch -// // memory errors. -// layout.PoisonPadding(p_.get()); -// // Store the size in the allocation. -// *layout.Pointer(p_.get()) = size; -// // Store the characters in the allocation. -// memcpy(layout.Pointer(p_.get()), s, size + 1); -// } -// -// size_t size() const { -// // Equivalent to reinterpret_cast(*p). -// return *L::Partial().Pointer(p_.get()); -// } -// -// const char* c_str() const { -// // Equivalent to reinterpret_cast(p.get() + sizeof(size_t)). -// // The argument in Partial(1) specifies that we have size_t[1] in front -// // of the characters. -// return L::Partial(1).Pointer(p_.get()); -// } -// -// private: -// // Our heap allocation contains a size_t followed by an array of chars. -// using L = Layout; -// std::unique_ptr p_; -// }; -// -// int main() { -// CompactString s = "hello"; -// assert(s.size() == 5); -// assert(strcmp(s.c_str(), "hello") == 0); -// } -// -// DOCUMENTATION -// -// The interface exported by this file consists of: -// - class `Layout<>` and its public members. -// - The public members of class `internal_layout::LayoutImpl<>`. That class -// isn't intended to be used directly, and its name and template parameter -// list are internal implementation details, but the class itself provides -// most of the functionality in this file. See comments on its members for -// detailed documentation. -// -// `Layout::Partial(count1,..., countm)` (where `m` <= `n`) returns a -// `LayoutImpl<>` object. `Layout layout(count1,..., countn)` -// creates a `Layout` object, which exposes the same functionality by inheriting -// from `LayoutImpl<>`. - -#ifndef ABSL_CONTAINER_INTERNAL_LAYOUT_H_ -#define ABSL_CONTAINER_INTERNAL_LAYOUT_H_ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "absl/base/config.h" -#include "absl/meta/type_traits.h" -#include "absl/strings/str_cat.h" -#include "absl/types/span.h" -#include "absl/utility/utility.h" - -#ifdef ABSL_HAVE_ADDRESS_SANITIZER -#include -#endif - -#if defined(__GXX_RTTI) -#define ABSL_INTERNAL_HAS_CXA_DEMANGLE -#endif - -#ifdef ABSL_INTERNAL_HAS_CXA_DEMANGLE -#include -#endif - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -// A type wrapper that instructs `Layout` to use the specific alignment for the -// array. `Layout<..., Aligned, ...>` has exactly the same API -// and behavior as `Layout<..., T, ...>` except that the first element of the -// array of `T` is aligned to `N` (the rest of the elements follow without -// padding). -// -// Requires: `N >= alignof(T)` and `N` is a power of 2. -template -struct Aligned; - -namespace internal_layout { - -template -struct NotAligned {}; - -template -struct NotAligned> { - static_assert(sizeof(T) == 0, "Aligned cannot be const-qualified"); -}; - -template -using IntToSize = size_t; - -template -using TypeToSize = size_t; - -template -struct Type : NotAligned { - using type = T; -}; - -template -struct Type> { - using type = T; -}; - -template -struct SizeOf : NotAligned, std::integral_constant {}; - -template -struct SizeOf> : std::integral_constant {}; - -// Note: workaround for https://gcc.gnu.org/PR88115 -template -struct AlignOf : NotAligned { - static constexpr size_t value = alignof(T); -}; - -template -struct AlignOf> { - static_assert(N % alignof(T) == 0, - "Custom alignment can't be lower than the type's alignment"); - static constexpr size_t value = N; -}; - -// Does `Ts...` contain `T`? -template -using Contains = absl::disjunction...>; - -template -using CopyConst = - typename std::conditional::value, const To, To>::type; - -// Note: We're not qualifying this with absl:: because it doesn't compile under -// MSVC. -template -using SliceType = Span; - -// This namespace contains no types. It prevents functions defined in it from -// being found by ADL. -namespace adl_barrier { - -template -constexpr size_t Find(Needle, Needle, Ts...) { - static_assert(!Contains(), "Duplicate element type"); - return 0; -} - -template -constexpr size_t Find(Needle, T, Ts...) { - return adl_barrier::Find(Needle(), Ts()...) + 1; -} - -constexpr bool IsPow2(size_t n) { return !(n & (n - 1)); } - -// Returns `q * m` for the smallest `q` such that `q * m >= n`. -// Requires: `m` is a power of two. It's enforced by IsLegalElementType below. -constexpr size_t Align(size_t n, size_t m) { return (n + m - 1) & ~(m - 1); } - -constexpr size_t Min(size_t a, size_t b) { return b < a ? b : a; } - -constexpr size_t Max(size_t a) { return a; } - -template -constexpr size_t Max(size_t a, size_t b, Ts... rest) { - return adl_barrier::Max(b < a ? a : b, rest...); -} - -template -std::string TypeName() { - std::string out; - int status = 0; - char* demangled = nullptr; -#ifdef ABSL_INTERNAL_HAS_CXA_DEMANGLE - demangled = abi::__cxa_demangle(typeid(T).name(), nullptr, nullptr, &status); -#endif - if (status == 0 && demangled != nullptr) { // Demangling succeeded. - absl::StrAppend(&out, "<", demangled, ">"); - free(demangled); - } else { -#if defined(__GXX_RTTI) || defined(_CPPRTTI) - absl::StrAppend(&out, "<", typeid(T).name(), ">"); -#endif - } - return out; -} - -} // namespace adl_barrier - -template -using EnableIf = typename std::enable_if::type; - -// Can `T` be a template argument of `Layout`? -template -using IsLegalElementType = std::integral_constant< - bool, !std::is_reference::value && !std::is_volatile::value && - !std::is_reference::type>::value && - !std::is_volatile::type>::value && - adl_barrier::IsPow2(AlignOf::value)>; - -template -class LayoutImpl; - -// Public base class of `Layout` and the result type of `Layout::Partial()`. -// -// `Elements...` contains all template arguments of `Layout` that created this -// instance. -// -// `SizeSeq...` is `[0, NumSizes)` where `NumSizes` is the number of arguments -// passed to `Layout::Partial()` or `Layout::Layout()`. -// -// `OffsetSeq...` is `[0, NumOffsets)` where `NumOffsets` is -// `Min(sizeof...(Elements), NumSizes + 1)` (the number of arrays for which we -// can compute offsets). -template -class LayoutImpl, absl::index_sequence, - absl::index_sequence> { - private: - static_assert(sizeof...(Elements) > 0, "At least one field is required"); - static_assert(absl::conjunction...>::value, - "Invalid element type (see IsLegalElementType)"); - - enum { - NumTypes = sizeof...(Elements), - NumSizes = sizeof...(SizeSeq), - NumOffsets = sizeof...(OffsetSeq), - }; - - // These are guaranteed by `Layout`. - static_assert(NumOffsets == adl_barrier::Min(NumTypes, NumSizes + 1), - "Internal error"); - static_assert(NumTypes > 0, "Internal error"); - - // Returns the index of `T` in `Elements...`. Results in a compilation error - // if `Elements...` doesn't contain exactly one instance of `T`. - template - static constexpr size_t ElementIndex() { - static_assert(Contains, Type::type>...>(), - "Type not found"); - return adl_barrier::Find(Type(), - Type::type>()...); - } - - template - using ElementAlignment = - AlignOf>::type>; - - public: - // Element types of all arrays packed in a tuple. - using ElementTypes = std::tuple::type...>; - - // Element type of the Nth array. - template - using ElementType = typename std::tuple_element::type; - - constexpr explicit LayoutImpl(IntToSize... sizes) - : size_{sizes...} {} - - // Alignment of the layout, equal to the strictest alignment of all elements. - // All pointers passed to the methods of layout must be aligned to this value. - static constexpr size_t Alignment() { - return adl_barrier::Max(AlignOf::value...); - } - - // Offset in bytes of the Nth array. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // assert(x.Offset<0>() == 0); // The ints starts from 0. - // assert(x.Offset<1>() == 16); // The doubles starts from 16. - // - // Requires: `N <= NumSizes && N < sizeof...(Ts)`. - template = 0> - constexpr size_t Offset() const { - return 0; - } - - template = 0> - constexpr size_t Offset() const { - static_assert(N < NumOffsets, "Index out of bounds"); - return adl_barrier::Align( - Offset() + SizeOf>::value * size_[N - 1], - ElementAlignment::value); - } - - // Offset in bytes of the array with the specified element type. There must - // be exactly one such array and its zero-based index must be at most - // `NumSizes`. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // assert(x.Offset() == 0); // The ints starts from 0. - // assert(x.Offset() == 16); // The doubles starts from 16. - template - constexpr size_t Offset() const { - return Offset()>(); - } - - // Offsets in bytes of all arrays for which the offsets are known. - constexpr std::array Offsets() const { - return {{Offset()...}}; - } - - // The number of elements in the Nth array. This is the Nth argument of - // `Layout::Partial()` or `Layout::Layout()` (zero-based). - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // assert(x.Size<0>() == 3); - // assert(x.Size<1>() == 4); - // - // Requires: `N < NumSizes`. - template - constexpr size_t Size() const { - static_assert(N < NumSizes, "Index out of bounds"); - return size_[N]; - } - - // The number of elements in the array with the specified element type. - // There must be exactly one such array and its zero-based index must be - // at most `NumSizes`. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // assert(x.Size() == 3); - // assert(x.Size() == 4); - template - constexpr size_t Size() const { - return Size()>(); - } - - // The number of elements of all arrays for which they are known. - constexpr std::array Sizes() const { - return {{Size()...}}; - } - - // Pointer to the beginning of the Nth array. - // - // `Char` must be `[const] [signed|unsigned] char`. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // unsigned char* p = new unsigned char[x.AllocSize()]; - // int* ints = x.Pointer<0>(p); - // double* doubles = x.Pointer<1>(p); - // - // Requires: `N <= NumSizes && N < sizeof...(Ts)`. - // Requires: `p` is aligned to `Alignment()`. - template - CopyConst>* Pointer(Char* p) const { - using C = typename std::remove_const::type; - static_assert( - std::is_same() || std::is_same() || - std::is_same(), - "The argument must be a pointer to [const] [signed|unsigned] char"); - constexpr size_t alignment = Alignment(); - (void)alignment; - assert(reinterpret_cast(p) % alignment == 0); - return reinterpret_cast>*>(p + Offset()); - } - - // Pointer to the beginning of the array with the specified element type. - // There must be exactly one such array and its zero-based index must be at - // most `NumSizes`. - // - // `Char` must be `[const] [signed|unsigned] char`. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // unsigned char* p = new unsigned char[x.AllocSize()]; - // int* ints = x.Pointer(p); - // double* doubles = x.Pointer(p); - // - // Requires: `p` is aligned to `Alignment()`. - template - CopyConst* Pointer(Char* p) const { - return Pointer()>(p); - } - - // Pointers to all arrays for which pointers are known. - // - // `Char` must be `[const] [signed|unsigned] char`. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // unsigned char* p = new unsigned char[x.AllocSize()]; - // - // int* ints; - // double* doubles; - // std::tie(ints, doubles) = x.Pointers(p); - // - // Requires: `p` is aligned to `Alignment()`. - // - // Note: We're not using ElementType alias here because it does not compile - // under MSVC. - template - std::tuple::type>*...> - Pointers(Char* p) const { - return std::tuple>*...>( - Pointer(p)...); - } - - // The Nth array. - // - // `Char` must be `[const] [signed|unsigned] char`. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // unsigned char* p = new unsigned char[x.AllocSize()]; - // Span ints = x.Slice<0>(p); - // Span doubles = x.Slice<1>(p); - // - // Requires: `N < NumSizes`. - // Requires: `p` is aligned to `Alignment()`. - template - SliceType>> Slice(Char* p) const { - return SliceType>>(Pointer(p), Size()); - } - - // The array with the specified element type. There must be exactly one - // such array and its zero-based index must be less than `NumSizes`. - // - // `Char` must be `[const] [signed|unsigned] char`. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // unsigned char* p = new unsigned char[x.AllocSize()]; - // Span ints = x.Slice(p); - // Span doubles = x.Slice(p); - // - // Requires: `p` is aligned to `Alignment()`. - template - SliceType> Slice(Char* p) const { - return Slice()>(p); - } - - // All arrays with known sizes. - // - // `Char` must be `[const] [signed|unsigned] char`. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // unsigned char* p = new unsigned char[x.AllocSize()]; - // - // Span ints; - // Span doubles; - // std::tie(ints, doubles) = x.Slices(p); - // - // Requires: `p` is aligned to `Alignment()`. - // - // Note: We're not using ElementType alias here because it does not compile - // under MSVC. - template - std::tuple::type>>...> - Slices(Char* p) const { - // Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63875 (fixed - // in 6.1). - (void)p; - return std::tuple>>...>( - Slice(p)...); - } - - // The size of the allocation that fits all arrays. - // - // // int[3], 4 bytes of padding, double[4]. - // Layout x(3, 4); - // unsigned char* p = new unsigned char[x.AllocSize()]; // 48 bytes - // - // Requires: `NumSizes == sizeof...(Ts)`. - constexpr size_t AllocSize() const { - static_assert(NumTypes == NumSizes, "You must specify sizes of all fields"); - return Offset() + - SizeOf>::value * size_[NumTypes - 1]; - } - - // If built with --config=asan, poisons padding bytes (if any) in the - // allocation. The pointer must point to a memory block at least - // `AllocSize()` bytes in length. - // - // `Char` must be `[const] [signed|unsigned] char`. - // - // Requires: `p` is aligned to `Alignment()`. - template = 0> - void PoisonPadding(const Char* p) const { - Pointer<0>(p); // verify the requirements on `Char` and `p` - } - - template = 0> - void PoisonPadding(const Char* p) const { - static_assert(N < NumOffsets, "Index out of bounds"); - (void)p; -#ifdef ABSL_HAVE_ADDRESS_SANITIZER - PoisonPadding(p); - // The `if` is an optimization. It doesn't affect the observable behaviour. - if (ElementAlignment::value % ElementAlignment::value) { - size_t start = - Offset() + SizeOf>::value * size_[N - 1]; - ASAN_POISON_MEMORY_REGION(p + start, Offset() - start); - } -#endif - } - - // Human-readable description of the memory layout. Useful for debugging. - // Slow. - // - // // char[5], 3 bytes of padding, int[3], 4 bytes of padding, followed - // // by an unknown number of doubles. - // auto x = Layout::Partial(5, 3); - // assert(x.DebugString() == - // "@0(1)[5]; @8(4)[3]; @24(8)"); - // - // Each field is in the following format: @offset(sizeof)[size] ( - // may be missing depending on the target platform). For example, - // @8(4)[3] means that at offset 8 we have an array of ints, where each - // int is 4 bytes, and we have 3 of those ints. The size of the last field may - // be missing (as in the example above). Only fields with known offsets are - // described. Type names may differ across platforms: one compiler might - // produce "unsigned*" where another produces "unsigned int *". - std::string DebugString() const { - const auto offsets = Offsets(); - const size_t sizes[] = {SizeOf>::value...}; - const std::string types[] = { - adl_barrier::TypeName>()...}; - std::string res = absl::StrCat("@0", types[0], "(", sizes[0], ")"); - for (size_t i = 0; i != NumOffsets - 1; ++i) { - absl::StrAppend(&res, "[", size_[i], "]; @", offsets[i + 1], types[i + 1], - "(", sizes[i + 1], ")"); - } - // NumSizes is a constant that may be zero. Some compilers cannot see that - // inside the if statement "size_[NumSizes - 1]" must be valid. - int last = static_cast(NumSizes) - 1; - if (NumTypes == NumSizes && last >= 0) { - absl::StrAppend(&res, "[", size_[last], "]"); - } - return res; - } - - private: - // Arguments of `Layout::Partial()` or `Layout::Layout()`. - size_t size_[NumSizes > 0 ? NumSizes : 1]; -}; - -template -using LayoutType = LayoutImpl< - std::tuple, absl::make_index_sequence, - absl::make_index_sequence>; - -} // namespace internal_layout - -// Descriptor of arrays of various types and sizes laid out in memory one after -// another. See the top of the file for documentation. -// -// Check out the public API of internal_layout::LayoutImpl above. The type is -// internal to the library but its methods are public, and they are inherited -// by `Layout`. -template -class Layout : public internal_layout::LayoutType { - public: - static_assert(sizeof...(Ts) > 0, "At least one field is required"); - static_assert( - absl::conjunction...>::value, - "Invalid element type (see IsLegalElementType)"); - - // The result type of `Partial()` with `NumSizes` arguments. - template - using PartialType = internal_layout::LayoutType; - - // `Layout` knows the element types of the arrays we want to lay out in - // memory but not the number of elements in each array. - // `Partial(size1, ..., sizeN)` allows us to specify the latter. The - // resulting immutable object can be used to obtain pointers to the - // individual arrays. - // - // It's allowed to pass fewer array sizes than the number of arrays. E.g., - // if all you need is to the offset of the second array, you only need to - // pass one argument -- the number of elements in the first array. - // - // // int[3] followed by 4 bytes of padding and an unknown number of - // // doubles. - // auto x = Layout::Partial(3); - // // doubles start at byte 16. - // assert(x.Offset<1>() == 16); - // - // If you know the number of elements in all arrays, you can still call - // `Partial()` but it's more convenient to use the constructor of `Layout`. - // - // Layout x(3, 5); - // - // Note: The sizes of the arrays must be specified in number of elements, - // not in bytes. - // - // Requires: `sizeof...(Sizes) <= sizeof...(Ts)`. - // Requires: all arguments are convertible to `size_t`. - template - static constexpr PartialType Partial(Sizes&&... sizes) { - static_assert(sizeof...(Sizes) <= sizeof...(Ts), ""); - return PartialType(absl::forward(sizes)...); - } - - // Creates a layout with the sizes of all arrays specified. If you know - // only the sizes of the first N arrays (where N can be zero), you can use - // `Partial()` defined above. The constructor is essentially equivalent to - // calling `Partial()` and passing in all array sizes; the constructor is - // provided as a convenient abbreviation. - // - // Note: The sizes of the arrays must be specified in number of elements, - // not in bytes. - constexpr explicit Layout(internal_layout::TypeToSize... sizes) - : internal_layout::LayoutType(sizes...) {} -}; - -} // namespace container_internal -ABSL_NAMESPACE_END -} // namespace absl - -#endif // ABSL_CONTAINER_INTERNAL_LAYOUT_H_ diff --git a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/raw_hash_map.h b/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/raw_hash_map.h deleted file mode 100644 index c7df2ef..0000000 --- a/bu_passport/ios/Pods/FirebaseFirestoreAbseilBinary/abseil.xcframework/ios-arm64/abseil.framework/Headers/container/internal/raw_hash_map.h +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 2018 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef ABSL_CONTAINER_INTERNAL_RAW_HASH_MAP_H_ -#define ABSL_CONTAINER_INTERNAL_RAW_HASH_MAP_H_ - -#include -#include -#include - -#include "absl/base/internal/throw_delegate.h" -#include "absl/container/internal/container_memory.h" -#include "absl/container/internal/raw_hash_set.h" // IWYU pragma: export - -namespace absl { -ABSL_NAMESPACE_BEGIN -namespace container_internal { - -template -class raw_hash_map : public raw_hash_set { - // P is Policy. It's passed as a template argument to support maps that have - // incomplete types as values, as in unordered_map. - // MappedReference<> may be a non-reference type. - template - using MappedReference = decltype(P::value( - std::addressof(std::declval()))); - - // MappedConstReference<> may be a non-reference type. - template - using MappedConstReference = decltype(P::value( - std::addressof(std::declval()))); - - using KeyArgImpl = - KeyArg::value && IsTransparent::value>; - - public: - using key_type = typename Policy::key_type; - using mapped_type = typename Policy::mapped_type; - template - using key_arg = typename KeyArgImpl::template type; - - static_assert(!std::is_reference::value, ""); - - // TODO(b/187807849): Evaluate whether to support reference mapped_type and - // remove this assertion if/when it is supported. - static_assert(!std::is_reference::value, ""); - - using iterator = typename raw_hash_map::raw_hash_set::iterator; - using const_iterator = typename raw_hash_map::raw_hash_set::const_iterator; - - raw_hash_map() {} - using raw_hash_map::raw_hash_set::raw_hash_set; - - // The last two template parameters ensure that both arguments are rvalues - // (lvalue arguments are handled by the overloads below). This is necessary - // for supporting bitfield arguments. - // - // union { int n : 1; }; - // flat_hash_map m; - // m.insert_or_assign(n, n); - template - std::pair insert_or_assign(key_arg&& k, V&& v) { - return insert_or_assign_impl(std::forward(k), std::forward(v)); - } - - template - std::pair insert_or_assign(key_arg&& k, const V& v) { - return insert_or_assign_impl(std::forward(k), v); - } - - template - std::pair insert_or_assign(const key_arg& k, V&& v) { - return insert_or_assign_impl(k, std::forward(v)); - } - - template - std::pair insert_or_assign(const key_arg& k, const V& v) { - return insert_or_assign_impl(k, v); - } - - template - iterator insert_or_assign(const_iterator, key_arg&& k, V&& v) { - return insert_or_assign(std::forward(k), std::forward(v)).first; - } - - template - iterator insert_or_assign(const_iterator, key_arg&& k, const V& v) { - return insert_or_assign(std::forward(k), v).first; - } - - template - iterator insert_or_assign(const_iterator, const key_arg& k, V&& v) { - return insert_or_assign(k, std::forward(v)).first; - } - - template - iterator insert_or_assign(const_iterator, const key_arg& k, const V& v) { - return insert_or_assign(k, v).first; - } - - // All `try_emplace()` overloads make the same guarantees regarding rvalue - // arguments as `std::unordered_map::try_emplace()`, namely that these - // functions will not move from rvalue arguments if insertions do not happen. - template ::value, int>::type = 0, - K* = nullptr> - std::pair try_emplace(key_arg&& k, Args&&... args) { - return try_emplace_impl(std::forward(k), std::forward(args)...); - } - - template ::value, int>::type = 0> - std::pair try_emplace(const key_arg& k, Args&&... args) { - return try_emplace_impl(k, std::forward(args)...); - } - - template - iterator try_emplace(const_iterator, key_arg&& k, Args&&... args) { - return try_emplace(std::forward(k), std::forward(args)...).first; - } - - template - iterator try_emplace(const_iterator, const key_arg& k, Args&&... args) { - return try_emplace(k, std::forward(args)...).first; - } - - template - MappedReference