File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -38,22 +38,13 @@ enum class TypeRefKind {
3838#undef TYPEREF
3939};
4040
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-
4941#define FIND_OR_CREATE_TYPEREF (Allocator, TypeRefTy, ...) \
5042 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()) \
5345 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}); \
5748 return TR;
5849
5950// / 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