Skip to content

Commit 70d58cb

Browse files
compnerdphausler
authored andcommitted
Base: always define HALT (swiftlang#391)
HALT is used in various places without a check for the target. There is nothing which is architecture specific. Remove the unnecessary architecture check.
1 parent cfff413 commit 70d58cb

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

CoreFoundation/Base.subproj/CFInternal.h

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,12 @@ CF_PRIVATE CFIndex __CFActiveProcessorCount();
164164
#endif
165165
#endif
166166

167-
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__) || (__arm__) || (__aarch64__)
168-
#if defined(__GNUC__)
169-
#define HALT do {__builtin_trap(); kill(getpid(), 9); __builtin_unreachable(); } while (0)
170-
#elif defined(_MSC_VER)
171-
#define HALT do { __builtin_trap(); abort(); __builtin_unreachable(); } while (0)
172-
#else
173-
#error Compiler not supported
174-
#endif
167+
#if defined(__GNUC__)
168+
#define HALT do {__builtin_trap(); kill(getpid(), 9); __builtin_unreachable(); } while (0)
169+
#elif defined(_MSC_VER)
170+
#define HALT do { __builtin_trap(); abort(); __builtin_unreachable(); } while (0)
171+
#else
172+
#error Compiler not supported
175173
#endif
176174

177175
#if defined(DEBUG)

0 commit comments

Comments
 (0)