1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

[Hexagon] Workaround for compilation error with VS2017

This commit is contained in:
Krzysztof Parzyszek 2020-12-11 12:15:53 -06:00
parent 0140db71cc
commit bc08eac614

View File

@ -292,8 +292,16 @@ template <> StoreInst *isCandidate<StoreInst>(Instruction *In) {
return getIfUnordered(dyn_cast<StoreInst>(In));
}
#if !defined(_MSC_VER) || _MSC_VER >= 1920
// VS2017 has trouble compiling this:
// error C2976: 'std::map': too few template arguments
template <typename Pred, typename... Ts>
void erase_if(std::map<Ts...> &map, Pred p) {
void erase_if(std::map<Ts...> &map, Pred p)
#else
template <typename Pred, typename T, typename U>
void erase_if(std::map<T, U> &map, Pred p)
#endif
{
for (auto i = map.begin(), e = map.end(); i != e;) {
if (p(*i))
i = map.erase(i);