Skip to content

[Runtime] Fix guards around _swift_isBackDeploying call in SwiftObject.mm. #27962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/swift/Runtime/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
# else
# define SWIFT_CLASS_IS_SWIFT_MASK _swift_classIsSwiftMask
# define SWIFT_CLASS_IS_SWIFT_MASK_GLOBAL_VARIABLE 1
# define SWIFT_BUILD_HAS_BACK_DEPLOYMENT 1
# include "BackDeployment.h"

# endif
Expand Down
5 changes: 4 additions & 1 deletion stdlib/public/runtime/SwiftObject.mm
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ + (void)initialize {
// runs on older OSes in certain testing scenarios, so that doesn't matter.
// Only perform the check on newer OSes where the value should definitely
// match.
if (!_swift_isBackDeploying()) {
# if SWIFT_BUILD_HAS_BACK_DEPLOYMENT
if (!_swift_isBackDeploying())
# endif
{
assert(&objc_debug_isa_class_mask);
assert(objc_debug_isa_class_mask == SWIFT_ISA_MASK);
}
Expand Down