File tree 1 file changed +4
-13
lines changed
1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -38,22 +38,13 @@ enum class TypeRefKind {
38
38
#undef TYPEREF
39
39
};
40
40
41
- // MSVC reports an error if we use "template"
42
- // Clang reports an error if we don't use "template"
43
- #if defined(__clang__) || defined(__GNUC__)
44
- # define DEPENDENT_TEMPLATE template
45
- #else
46
- # define DEPENDENT_TEMPLATE
47
- #endif
48
-
49
41
#define FIND_OR_CREATE_TYPEREF (Allocator, TypeRefTy, ...) \
50
42
auto ID = Profile(__VA_ARGS__); \
51
- const auto Entry = Allocator.TypeRefTy##s.find(ID); \
52
- if (Entry != Allocator.TypeRefTy##s.end()) \
43
+ const auto Entry = Allocator.TypeRefTy##s.find(ID); \
44
+ if (Entry != Allocator.TypeRefTy##s.end()) \
53
45
return Entry->second; \
54
- const auto TR = \
55
- Allocator.DEPENDENT_TEMPLATE makeTypeRef<TypeRefTy>(__VA_ARGS__); \
56
- Allocator.TypeRefTy##s.insert({ID, TR}); \
46
+ const auto TR = Allocator.template makeTypeRef<TypeRefTy>(__VA_ARGS__); \
47
+ Allocator.TypeRefTy##s.insert({ID, TR}); \
57
48
return TR;
58
49
59
50
// / An identifier containing the unique bit pattern made up of all of the
You can’t perform that action at this time.
0 commit comments