termux-packages/packages/swift/swift-fix-arm-stdlib.patch

31 lines
1.3 KiB
Diff
Raw Normal View History

2021-01-14 16:12:45 +01:00
diff --git a/swift/stdlib/public/runtime/Metadata.cpp b/swift/stdlib/public/runtime/Metadata.cpp
index 2e466715ffd..c870edc4507 100644
--- a/swift/stdlib/public/runtime/Metadata.cpp
+++ b/swift/stdlib/public/runtime/Metadata.cpp
@@ -754,6 +754,7 @@ MetadataResponse swift::swift_getCanonicalSpecializedMetadata(
MetadataState::Complete};
}
+#if !defined(__arm__)
if (auto *token =
description
->getCanonicalMetadataPrespecializationCachingOnceToken()) {
@@ -761,6 +762,7 @@ MetadataResponse swift::swift_getCanonicalSpecializedMetadata(
// NOTE: If there is no token, then there are no canonical prespecialized
// metadata records, either.
}
+#endif
const void *const *arguments =
reinterpret_cast<const void *const *>(candidate->getGenericArgs());
auto &cache = getCache(*description);
@@ -802,7 +804,9 @@ MetadataResponse swift::swift_getCanonicalPrespecializedGenericMetadata(
const TypeContextDescriptor *description, swift_once_t *token) {
description = swift_auth_data_non_address(
description, SpecialPointerAuthDiscriminators::TypeDescriptor);
+#if !defined(__arm__)
cacheCanonicalSpecializedMetadata(description, token);
+#endif
return _swift_getGenericMetadata(request, arguments, description);
}