Skip to content

Commit 87012b8

Browse files
committed
Fix warning building with compiler without __has_feature
1 parent 7493fee commit 87012b8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stdlib/public/SwiftShims/Visibility.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#ifndef SWIFT_STDLIB_SHIMS_VISIBILITY_H
1919
#define SWIFT_STDLIB_SHIMS_VISIBILITY_H
2020

21-
#if defined(__has_feature) && __has_feature(nullability)
21+
#if !defined(__has_feature)
22+
#define __has_feature(x) false
23+
#endif
24+
25+
#if __has_feature(nullability)
2226
// Provide macros to temporarily suppress warning about the use of
2327
// _Nullable and _Nonnull.
2428
# define SWIFT_BEGIN_NULLABILITY_ANNOTATIONS \

0 commit comments

Comments
 (0)