Skip to content

Fix macOS build regression after #16212 #16221

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
Apr 27, 2018
Merged
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
24 changes: 16 additions & 8 deletions include/swift/Reflection/TypeRef.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,23 @@ enum class TypeRefKind {

// MSVC reports an error if we use "template"
// Clang reports an error if we don't use "template"
#if defined(__clang__) || defined(__GNUC__)
#define DEPENDENT_TEMPLATE template
#if __clang_major__ >= 7
#define DEPENDENT_TEMPLATE2
#if defined(__APPLE_CC__)
# define DEPENDENT_TEMPLATE template
# if __APPLE_CC__ >= 7000
# define DEPENDENT_TEMPLATE2
# else
# define DEPENDENT_TEMPLATE2 template
# endif
#elif defined(__clang__) || defined(__GNUC__)
# define DEPENDENT_TEMPLATE template
# if __clang_major__ >= 7
# define DEPENDENT_TEMPLATE2
# else
# define DEPENDENT_TEMPLATE2 template
# endif
#else
#define DEPENDENT_TEMPLATE2 template
#endif
#else
#define DEPENDENT_TEMPLATE
# define DEPENDENT_TEMPLATE template
# define DEPENDENT_TEMPLATE2
#endif

#define FIND_OR_CREATE_TYPEREF(Allocator, TypeRefTy, ...) \
Expand Down