Remove unsound caching in LanguageCategory

Analogous to https://reviews.llvm.org/D71233 it is not safe to cache
something that depends on the actual ValueObject in a cache then keys
only off the type name.

Differential Revision: https://reviews.llvm.org/D71297
This commit is contained in:
Adrian Prantl
2019-12-10 14:29:13 -08:00
parent b3801de7c5
commit 2fb07b90dc

View File

@@ -110,10 +110,6 @@ bool LanguageCategory::GetHardcoded(FormatManager &fmt_mgr,
break;
}
}
if (match_data.GetTypeForCache() &&
(!retval_sp || !retval_sp->NonCacheable())) {
m_format_cache.Set(match_data.GetTypeForCache(), retval_sp);
}
return (bool)retval_sp;
}