@@ -40,33 +40,20 @@ enum class TypeRefKind {
40
40
41
41
// MSVC reports an error if we use "template"
42
42
// Clang reports an error if we don't use "template"
43
- #if defined(__APPLE_CC__ )
43
+ #if defined(__clang__) || defined(__GNUC__ )
44
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
57
45
#else
58
- # define DEPENDENT_TEMPLATE template
59
- # define DEPENDENT_TEMPLATE2
46
+ # define DEPENDENT_TEMPLATE
60
47
#endif
61
48
62
49
#define FIND_OR_CREATE_TYPEREF (Allocator, TypeRefTy, ...) \
63
50
auto ID = Profile(__VA_ARGS__); \
64
- const auto Entry = Allocator.DEPENDENT_TEMPLATE2 TypeRefTy##s.find(ID); \
65
- if (Entry != Allocator.DEPENDENT_TEMPLATE2 TypeRefTy##s.end()) \
51
+ const auto Entry = Allocator.TypeRefTy##s.find(ID); \
52
+ if (Entry != Allocator.TypeRefTy##s.end()) \
66
53
return Entry->second; \
67
54
const auto TR = \
68
55
Allocator.DEPENDENT_TEMPLATE makeTypeRef<TypeRefTy>(__VA_ARGS__); \
69
- Allocator.DEPENDENT_TEMPLATE2 TypeRefTy##s.insert({ID, TR}); \
56
+ Allocator.TypeRefTy##s.insert({ID, TR}); \
70
57
return TR;
71
58
72
59
// / An identifier containing the unique bit pattern made up of all of the
0 commit comments