Skip to content

Commit e5d11ff

Browse files
committed
[Apple Silicon] [In-process memory reader] Adjust low-bits computation for arm64 macOS
1 parent 5566ace commit e5d11ff

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

include/swift/Remote/InProcessMemoryReader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class InProcessMemoryReader final : public MemoryReader {
3838
#else
3939
auto applePlatform = false;
4040
#endif
41-
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
41+
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
4242
auto iosDerivedPlatform = true;
4343
#else
4444
auto iosDerivedPlatform = false;
@@ -67,7 +67,7 @@ class InProcessMemoryReader final : public MemoryReader {
6767
case DLQ_GetObjCReservedLowBits: {
6868
auto result = static_cast<uint8_t *>(outBuffer);
6969
if (applePlatform && !iosDerivedPlatform && (sizeof(void *) == 8)) {
70-
// Obj-C reserves low bit on 64-bit macOS only.
70+
// Obj-C reserves low bit on 64-bit Intel macOS only.
7171
// Other Apple platforms don't reserve this bit (even when
7272
// running on x86_64-based simulators).
7373
*result = 1;

include/swift/SwiftRemoteMirror/SwiftRemoteMirrorLegacyInterop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ swift_reflection_interop_minimalDataLayoutQueryFunction8(
585585
#else
586586
int applePlatform = 0;
587587
#endif
588-
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
588+
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
589589
int iosDerivedPlatform = 1;
590590
#else
591591
int iosDerivedPlatform = 0;

stdlib/public/SwiftRemoteMirror/SwiftRemoteMirror.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static int minimalDataLayoutQueryFunction(void *ReaderContext,
7070
#else
7171
auto applePlatform = false;
7272
#endif
73-
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
73+
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
7474
auto iosDerivedPlatform = true;
7575
#else
7676
auto iosDerivedPlatform = false;

stdlib/tools/swift-reflection-test/swift-reflection-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static int PipeMemoryReader_queryDataLayout(void *Context,
147147
#else
148148
int applePlatform = 0;
149149
#endif
150-
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
150+
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
151151
int iosDerivedPlatform = 1;
152152
#else
153153
int iosDerivedPlatform = 0;

tools/swift-reflection-dump/swift-reflection-dump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ class ObjectMemoryReader : public MemoryReader {
458458
#else
459459
auto applePlatform = false;
460460
#endif
461-
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
461+
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
462462
auto iosDerivedPlatform = true;
463463
#else
464464
auto iosDerivedPlatform = false;

tools/swift-reflection-fuzzer/swift-reflection-fuzzer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ObjectMemoryReader : public MemoryReader {
6161
#else
6262
auto applePlatform = false;
6363
#endif
64-
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV))
64+
#if defined(__APPLE__) && __APPLE__ && ((defined(TARGET_OS_IOS) && TARGET_OS_IOS) || (defined(TARGET_OS_IOS) && TARGET_OS_WATCH) || (defined(TARGET_OS_TV) && TARGET_OS_TV) || defined(__arm64__))
6565
auto iosDerivedPlatform = true;
6666
#else
6767
auto iosDerivedPlatform = false;

0 commit comments

Comments
 (0)