Skip to content

Commit 22ef406

Browse files
authored
Merge pull request #37018 from mikeash/remove-dynamic-class-is-swift-mask
[Runtime] Remove the _swift_classIsSwiftMask variable.
2 parents 106f5a8 + 44d06a7 commit 22ef406

File tree

4 files changed

+7
-130
lines changed

4 files changed

+7
-130
lines changed

include/swift/Runtime/BackDeployment.h

Lines changed: 0 additions & 45 deletions
This file was deleted.

include/swift/Runtime/Config.h

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -100,34 +100,21 @@
100100
/// from ObjC classes?
101101
#ifndef SWIFT_CLASS_IS_SWIFT_MASK
102102

103-
// Non-Apple platforms always use 1.
104-
# if !defined(__APPLE__)
105-
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL
106-
107-
// Builds for Swift-in-the-OS always use 2.
108-
# elif SWIFT_BNI_OS_BUILD
109-
# define SWIFT_CLASS_IS_SWIFT_MASK 2ULL
110-
111-
// Builds for Xcode always use 1.
112-
# elif SWIFT_BNI_XCODE_BUILD
113-
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL
114-
115103
// Compatibility hook libraries cannot rely on the "is swift" bit being either
116104
// value, since they must work with both OS and Xcode versions of the libraries.
117105
// Generate a reference to a nonexistent symbol so that we get obvious linker
118106
// errors if we try.
119-
# elif SWIFT_COMPATIBILITY_LIBRARY
107+
# if SWIFT_COMPATIBILITY_LIBRARY
120108
extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTLY__;
121109
# define SWIFT_CLASS_IS_SWIFT_MASK __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTLY__
122110

123-
// Other builds (such as local builds on developers' computers)
124-
// dynamically choose the bit at runtime based on the current OS
125-
// version.
111+
// Apple platforms always use 2
112+
# elif defined(__APPLE__)
113+
# define SWIFT_CLASS_IS_SWIFT_MASK 2ULL
114+
115+
// Non-Apple platforms always use 1.
126116
# else
127-
# define SWIFT_CLASS_IS_SWIFT_MASK _swift_classIsSwiftMask
128-
# define SWIFT_CLASS_IS_SWIFT_MASK_GLOBAL_VARIABLE 1
129-
# define SWIFT_BUILD_HAS_BACK_DEPLOYMENT 1
130-
# include "BackDeployment.h"
117+
# define SWIFT_CLASS_IS_SWIFT_MASK 1ULL
131118

132119
# endif
133120
#endif

stdlib/public/runtime/BackDeployment.cpp

Lines changed: 0 additions & 64 deletions
This file was deleted.

stdlib/public/runtime/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ set(swift_runtime_sources
3030
AnyHashableSupport.cpp
3131
Array.cpp
3232
AutoDiffSupport.cpp
33-
BackDeployment.cpp
3433
Bincompat.cpp
3534
Casting.cpp
3635
CygwinPort.cpp

0 commit comments

Comments
 (0)