Skip to content

Commit a2c8bfa

Browse files
davezarzyckiNathan Hawes
authored andcommitted
Fix macOS build regression after swiftlang#16212 (swiftlang#16221)
1 parent 9fa3961 commit a2c8bfa

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

include/swift/Reflection/TypeRef.h

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,23 @@ enum class TypeRefKind {
4040

4141
// MSVC reports an error if we use "template"
4242
// Clang reports an error if we don't use "template"
43-
#if defined(__clang__) || defined(__GNUC__)
44-
#define DEPENDENT_TEMPLATE template
45-
#if __clang_major__ >= 7
46-
#define DEPENDENT_TEMPLATE2
43+
#if defined(__APPLE_CC__)
44+
# define DEPENDENT_TEMPLATE template
45+
# if __APPLE_CC__ >= 7000
46+
# define DEPENDENT_TEMPLATE2
47+
# else
48+
# define DEPENDENT_TEMPLATE2 template
49+
# endif
50+
#elif defined(__clang__) || defined(__GNUC__)
51+
# define DEPENDENT_TEMPLATE template
52+
# if __clang_major__ >= 7
53+
# define DEPENDENT_TEMPLATE2
54+
# else
55+
# define DEPENDENT_TEMPLATE2 template
56+
# endif
4757
#else
48-
#define DEPENDENT_TEMPLATE2 template
49-
#endif
50-
#else
51-
#define DEPENDENT_TEMPLATE
58+
# define DEPENDENT_TEMPLATE template
59+
# define DEPENDENT_TEMPLATE2
5260
#endif
5361

5462
#define FIND_OR_CREATE_TYPEREF(Allocator, TypeRefTy, ...) \

0 commit comments

Comments
 (0)