Skip to content

Instantly share code, notes, and snippets.

@colemancda
Created May 21, 2022 04:23
Show Gist options
  • Save colemancda/ed295f963493726b1c01a6bc97945a3d to your computer and use it in GitHub Desktop.
Save colemancda/ed295f963493726b1c01a6bc97945a3d to your computer and use it in GitHub Desktop.
swift-5.6.1-armv7
diff --git a/stdlib/public/runtime/Float16Support.cpp b/stdlib/public/runtime/Float16Support.cpp
index 817739d4cdf..b1896a4e364 100644
--- a/stdlib/public/runtime/Float16Support.cpp
+++ b/stdlib/public/runtime/Float16Support.cpp
@@ -29,7 +29,7 @@
// Android NDK <r21 do not provide `__aeabi_d2h` in the compiler runtime,
// provide shims in that case.
-#if (defined(__ANDROID__) && defined(__ARM_ARCH_7A__) && defined(__ARM_EABI__)) || \
+#if ((defined(__ANDROID__) || defined(__linux__)) && defined(__arm__)) || \
((defined(__i386__) || defined(__i686__) || defined(__x86_64__)) && !defined(__APPLE__))
#include "../SwiftShims/Visibility.h"
diff --git a/stdlib/public/SwiftShims/RefCount.h b/stdlib/public/SwiftShims/RefCount.h
index 5c8211f5e9f..fe54839aaae 100644
--- a/stdlib/public/SwiftShims/RefCount.h
+++ b/stdlib/public/SwiftShims/RefCount.h
@@ -1319,7 +1319,12 @@ class HeapObjectSideTableEntry {
public:
HeapObjectSideTableEntry(HeapObject *newObject)
- : object(newObject), refCounts()
+ : object(newObject),
+#if __arm__ // https://bugs.swift.org/browse/SR-5846
+ refCounts(SideTableRefCounts::Initialized)
+#else
+ refCounts()
+#endif
{ }
#pragma clang diagnostic push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment