Skip to content

Commit e4e2b23

Browse files
committed
[Compatibility50] Silence warning about taking the address of objc_setHook_getClass.
Add a & so the compiler doesn't think it always evaluates to true. rdar://144465537
1 parent 85faa52 commit e4e2b23

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/toolchain/Compatibility50/Overrides.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ static void installGetClassHook_untrusted() {
112112

113113
#pragma clang diagnostic push
114114
#pragma clang diagnostic ignored "-Wunguarded-availability"
115-
if (objc_setHook_getClass) {
115+
if (&objc_setHook_getClass) {
116116
objc_setHook_getClass(getObjCClassByMangledName_untrusted,
117117
&OldGetClassHook);
118118
}

0 commit comments

Comments
 (0)