Skip to content

Commit c6efe1d

Browse files
committed
---
yaml --- r: 347799 b: refs/heads/master c: f41aac9 h: refs/heads/master i: 347797: 502852f 347795: f5ee60d 347791: 2a26047
1 parent 5fa8752 commit c6efe1d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 120ca85a3a08d52ab26df817024e7db5b80a9a68
2+
refs/heads/master: f41aac9a3d81369316c08067d547e27eee01f116
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/stdlib/public/runtime/SwiftObject.mm

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,15 @@ Class _swift_classOfObjCHeapObject(OpaqueValue *value) {
195195

196196
@implementation SwiftObject
197197
+ (void)initialize {
198-
#if SWIFT_HAS_ISA_MASKING
199-
// Really old ObjC runtimes don't have this symbol, which is OK. If
200-
// the symbol exists, then our value must match.
201-
assert(&objc_debug_isa_class_mask == NULL ||
202-
objc_debug_isa_class_mask == SWIFT_ISA_MASK);
198+
#if SWIFT_HAS_ISA_MASKING && !NDEBUG
199+
// Older OSes may not have this variable, or it may not match. This code only
200+
// runs on older OSes in certain testing scenarios, so that doesn't matter.
201+
// Only perform the check on newer OSes where the value should definitely
202+
// match.
203+
if (!_swift_isBackDeploying()) {
204+
assert(&objc_debug_isa_class_mask);
205+
assert(objc_debug_isa_class_mask == SWIFT_ISA_MASK);
206+
}
203207
#endif
204208
}
205209

0 commit comments

Comments
 (0)